-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Notice – yii\base\ErrorException Undefined offset: 1 #5525
Comments
Do you have a stack trace in your log files? |
Yes.
|
Ah okay, that was fixed today. To fix this,change your "require": {
"craftcms/cms": "dev-develop#67d2a4aa7724189682897035c1b90baeb358ebf7 as 3.4.0.2",
"...": "..."
} Then run And then perform the update again? I'm afraid there was a small oversight in how Project Config changes were migrated which borked plugin settings that used associative arrays. Sorry about that! |
Still not working. |
Did you perform the update on a pre-3.4 update database? |
Yes i think so.. |
@brambeekman in that case, can you send over the pre-update database, your composer.json, and composer.lock files to [email protected] and reference this issue, please? |
I'm not sure if i did, can you explain what it means? |
I mean can you zip up your pre-update database (from the installation that was before you updated to 3.4.x) and send it over email to [email protected]. Also, please attach the composer.json and composer.lock files, so I can install the site locally and see what problem you're having. Make sure to mention this Github issue in the subject, so we know what that is all about :) |
Done |
Closing this; we’ll get this resolved offline. |
I'm getting this error as well (Craft 3.4.5). Looks like something went wrong when project config tried to store an associative array from a config file where the value was a function. return [
'geoLocationAutoRedirect' => true,
'geoLocationRedirectMap' => [
'example' => [ 'isEU' => function ($isEu) { return $isEu; } ],
// ^ looks like this is causing the error
'default' => '*',
],
];
|
@Tam Hm yeah… that shouldn’t have been saved to begin with. Can you send your |
@brandonkelly That's sent, let me know if you need anything else! |
This just happened to me in my local environment after I had removed a language-based site from the system, running Craft CMS version 3.4.15. The issue seems to have been caused by the associated row in the Here's the table contents after the site had been deleted already: As a result, code where the site IDs were being iterated over would throw this error. I was able to fix it by manually removing the dead site row from the Hope this helps someone! |
@mizziness Sites only get soft-deleted initially. Shouldn’t result in any errors though. Do you still have a database backup from before you went in and deleted that row? If so can you please send into [email protected]? |
Apologies for the slow reply! I do believe I may have the database backups from around then - I will go spelunking and see if a) I do and b) if I can recreate the issue - if so, I'll send it all over to you :) Thanks! |
@brandonkelly People are seeing this issue here as well, when saving settings in the CP: studioespresso/craft-scout#152. I presume this is due to having complex data types in the |
For what it's worth, I've modified the function
|
What exactly is Scout doing with the project config that is messing things up? |
@brandonkelly Scout isn't doing anything explicit with project config. The setting that is causing the error is When the settings are saved in the CP, the instances are converted to yaml, and then we get the |
Ahh, gotcha. |
The way Scout 2 is storing nested objects in its field settings would have been problematic even before project config. I’ve just submitted studioespresso/craft-scout#162 which should fix this error going forward. |
Thanks @brandonkelly. Is/should there be something in the docs stating plugin settings shouldn't contain values like this, or should explicitly exclude them as you PR'd? |
Probably! cc @mattstein |
Added a note to the Plugin Settings page, @timkelty. |
I'm getting the same error related to the TotalRevenue commerce widget.
|
After update i get this error
The text was updated successfully, but these errors were encountered: