Closed kjmartens closed 4 years ago
Do you have a section that is somehow not enabled for any sites?
The site has a single site, with a single section (channel) that has a single Entry Type. :)
Can you send a DB backup from before attempting the update over to support@craftcms.com, along with your Composer files?
Thanks, sent!
You can close this one out. I tried the migration on this affected database in a different environment and it worked correctly. Not sure what was up...
Reopened as we've had a few other people experience the same error, though we have not been able to reproduce it yet, even with the backup/Composer files from affected installs.
I wonder if something related to this sort of bit me hard yesterday when I went to edit the option values of a Select dropdown field (field settings) (RC3). Upon saving the field, it appeared to wipe out all other fields in the database except that field and wiped other things like field layouts and groups, etc. The whole site became a disaster. I had a backup from previous day, but the client lost a solid 5hrs of data entry just before that.
Maybe it's completely unrelated, and/or maybe it's been fixed since, but I haven't had the guts to try it again yet. 😅 Feel very free to ignore this comment (as I have been able to sort of undo and move on), but thought I'd note this anyway. If the issue comes up again, I'll create a new GH issue.
2020-08-04 02:13:43 [-][1][9d5bb9402a3a15f3824bed8782648930][error][TypeError] TypeError: Argument 1 passed to craft\services\Fields::getGroupById() must be of the type integer, null given, called in /path/vendor/craftcms/cms/src/base/Field.php on line 554 and defined in /path/vendor/craftcms/cms/src/services/Fields.php:235
Stack trace:
#0 /path/vendor/craftcms/cms/src/base/Field.php(554): craft\services\Fields->getGroupById(NULL)
#1 /path/vendor/yiisoft/yii2/base/Component.php(139): craft\base\Field->getGroup()
#2 /path/vendor/craftcms/cms/src/helpers/Template.php(74): yii\base\Component->__get('group')
#3 /path/storage/runtime/compiled_templates/9d/9d72a9b9697a035ab1dc7c8575a3d0007dfeef3f8d691c68020ee61a4e35e63e.php(92): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\fields\Dropdown), 'group', Array)
#4 /path/vendor/twig/twig/src/Template.php(407): __TwigTemplate_9cb5303d604fb6ad5d22870c12ec6facfc36f556288ae685d7e9d6b3fb70922f->doDisplay(Array, Array)
#5 /path/vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#6 /path/vendor/twig/twig/src/Template.php(392): Twig\Template->display(Array)
#7 /path/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)
#8 /path/vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array)
#9 /path/vendor/craftcms/cms/src/web/View.php(391): Twig\Environment->render('settings/fields', Array)
#10 /path/vendor/craftcms/cms/src/web/View.php(452): craft\web\View->renderTemplate('settings/fields', Array)
#11 /path/vendor/craftcms/cms/src/web/Controller.php(243): craft\web\View->renderPageTemplate('settings/fields', Array, 'cp')
#12 /path/vendor/craftcms/cms/src/controllers/TemplatesController.php(97): craft\web\Controller->renderTemplate('settings/fields', Array)
#13 [internal function]: craft\controllers\TemplatesController->actionRender('settings/fields', Array)
#14 /path/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#15 /path/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#16 /path/vendor/craftcms/cms/src/web/Controller.php(181): yii\base\Controller->runAction('render', Array)
#17 /path/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('render', Array)
#18 /path/vendor/craftcms/cms/src/web/Application.php(295): yii\base\Module->runAction('templates/rende...', Array)
#19 /path/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('templates/rende...', Array)
#20 /path/vendor/craftcms/cms/src/web/Application.php(280): yii\web\Application->handleRequest(Object(craft\web\Request))
#21 /path/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#22 /path/public_html/index.php(21): yii\base\Application->run()
#23 {main}
2020-08-04 02:13:43 [-][1][9d5bb9402a3a15f3824bed8782648930][info][application] $_GET = [
'p' => 'admin/settings/fields'
]
I ran into this issue earlier as well (existing, heavily populated 3.4 site). If you want I can send over a DB and files?
Got same error on 3 different projects
@Sekonda please do! And reference this issue too, of course.
I'm having this issue, too
We haven’t been able to come up with reproducible steps for this in 3.5 yet, however we’ve managed to reliably reproduce it in 3.4. We just released Craft 3.5.1 with a fix based on what we found in 3.4, and hoping that will solve it for 3.5 as well. 🤞
If you’re still experiencing the issue after updating to 3.5.1, let me know and I’ll reopen this and we’ll continue looking into it.
Just updated to 3.5.1 via composer but unfortunately it doesn't help. Still same error
@Bronskiy Did you start from 3.4 or 3.5.0 when you tested the 3.5.1 update? We are hearing from one customer that 3.5.1 did in fact fix the bug, but only if they restored the DB/cache from 3.4.x.
@brandonkelly Going from the 3.4.X straight to 3.5.1 worked for us on any projects that 3.5 didn't.
We restored the 3.4.X DB and cleared all caches before doing the upgrade.
@Bronskiy Did you start from 3.4 or 3.5.0 when you tested the 3.5.1 update? We are hearing from one customer that 3.5.1 did in fact fix the bug, but only if they restored the DB/cache from 3.4.x.
I changed composer.json craft version to 3.4.30 and run composer update. Then I tried to run update from the dashboard but got the same error. Dashboard works in dev mode only otherwise it shows error. Frontend works in prod mode only. 3 different projects with same errors.
Sometimes during update it shows DB errors because there were some changes after 3.5 update. But it is fixable by removing 'elements' from fieldlayouttabs or adding 'titleLabel' to entrytypes tables and then I see 'Undefined index: siteSettings' error.
I don't have manual DB backup so I'm using DB that was restored by Craft
@Bronskiy can you send over the DB backup to support@craftcms.com and reference this GH issue? I'll see if I can get it to update on my end and then just send it back to you. Please, also include your composer.json and composer.lock files, so I don't run into any errors about missing plugins and the like.
@Bronskiy can you send over the DB backup to support@craftcms.com and reference this GH issue? I'll see if I can get it to update on my end and then just send it back to you. Please, also include your composer.json and composer.lock files, so I don't run into any errors about missing plugins and the like.
sent
Not sure if this helps but I tracked down a specific issue in Craft Commerce that results in this error.
It appears that running ./craft project-config/rebuild
helps with this as a bunch of the project config files aren't getting created.
Description
Trying to upgrade a site from Craft 3.4.29.1 to 3.5.0-RC3, and I am getting this error during migration:
Steps to reproduce
Additional info