I'm getting this error when testing the upgrade path:
Error: Call to undefined method Drupal\Core\Config\Schema\Undefined::get() in Drupal\Core\Config\StorableConfigBase->castValue() (line 179 of [error]
Backtrace:
#0 web/core/lib/Drupal/Core/Config/Config.php(212): Drupal\Core\Config\StorableConfigBase->castValue('bc_primitives_a...', false)
#1 web/core/modules/serialization/serialization.install(45): Drupal\Core\Config\Config->save(false)
#2 vendor/drush/drush/commands/core/drupal/update.inc(60): serialization_update_8302(Array)
#3 vendor/drush/drush/commands/core/drupal/batch.inc(163): drush_update_do_one('serialization', 8302, Array, Object(DrushBatchContext))
#4 vendor/drush/drush/commands/core/drupal/batch.inc(111): _drush_batch_worker()
#5 vendor/drush/drush/includes/batch.inc(98): _drush_batch_command('9')
#6 vendor/drush/drush/commands/core/drupal/update.inc(193): drush_batch_command('9')
#7 vendor/drush/drush/commands/core/core.drush.inc(1227): _update_batch_command('9')
#8 vendor/drush/drush/includes/command.inc(422): drush_core_updatedb_batch_process('9')
#9 vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#10 vendor/drush/drush/includes/command.inc(199): drush_command('9')
#11 vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#12 vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#13 vendor/drush/drush/drush.php(12): drush_main()
This happens before the schema cache is updated I guess, but what I don't understand is why this update function *explicitly* passes FALSE, clearly the data that we change is trusted?
It works fine then on a second run.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | trust-the-data-2867113-4.patch | 789 bytes | berdir |
| #2 | trust-the-data-2867113-2.patch | 790 bytes | berdir |
Comments
Comment #2
berdirComment #3
wim leersSyntax error :)
RTBC after that's fixed.
Comment #4
berdirI managed to get that in there between checking the diff and writing it into a file...
Comment #5
berdir@Wim: See IRC discussion, do you know if there is a reason for that FALSE?
Comment #6
wim leersI agree with @catch's suspicion at 17:47:44.
But I still did some issue archeology. Turns out that the patch at #2751325-179: All serialized values are strings, should be integers/booleans when appropriate had this right (
->save(TRUE)). Then #2751325-182: All serialized values are strings, should be integers/booleans when appropriate removed that hunk completely. (Both of those patches by @tedbow.) Then @alexpott restored this hunk in #2751325-188: All serialized values are strings, should be integers/booleans when appropriate after discussing it with @catch. But it inverted the value. Why? I suspect because we changed the default value fori.e. I'm willing to bet that @alexpott simply search-and-replaced
TRUEwithFALSEand replaced one thing too many.Comment #7
catchNice archaeology.
Committed/pushed to 8.4.x and cherry-picked to 8.3.x. Thanks!
Comment #8
catchComment #11
MmMnRr commentedHi,
I am trying to update from Drupal 8.1.1 to the latest Drupal 8.3.0 stable version but I am receiving that error message:
I have checked the
serialization_update_8302()function inserialization.installbut it has already->save(TRUE)call.I am unable to update to 8.3.0 and I would like not to use the 8.3.x unstable version.
Is there a solution for 8.3.0 or are you going to release a new stable version?
Comment #12
catch@MmMnRr are you able to provide a backtrace? It's possible a different update has a similar problem to the one fixed here.
Comment #13
berdirAnd while it would be very helpful to know which update function triggered this for you (we should also have a separate issue to make such a case *not* fail with a fatal error), you should be able to get around it with a drush cr before running the updates. If you can use drush, otherwise you can also clear the cache_discovery table by hand.
Comment #14
wim leersThat seems unlikely, I grepped the entire codebase for
->save(FALSE), and the only remaining occurrences are inConfigEntityStorageTest.Besides, #11 says they traced it to this
->save(TRUE)call. It seems that #11 is a different error. AFAICT this must be happening in here:It's the only
->get(call inStorableConfigBase.Without more information/steps to reproduce, I don't think we'll be able to help here.
Comment #15
MmMnRr commentedI tried to run update.php again and for no reason it worked perfectly now.
So the issue is solved.
I tried multiple times to run update.php and I always received the same error. But now it worked.
I do not have drush installed in my server yet.
The trace came from the Apache log.
I checked the specific line referenced in the trace and it is the following:
/.../core/lib/Drupal/Core/Config/StorableConfigBase.php
It is the same code as explained in comment #14.
The error appeared when I try to run update.php. But now it disappeared.
The only difference since the last try is that I have navigated through the website pages, although the update did not work.
Maybe that navigation triggered something. But I have no proof.
Thank you and sorry for the inconvenience.
Comment #16
alexpottCreated #2867444: Configuration schema errors whilst updating to 8.3.0
Comment #17
berdir@MmMnRr, it would be very helpful if you could join us over in #2867444: Configuration schema errors whilst updating to 8.3.0 and provide anything that might be useful in figuring out more about this: From which version you upgrade, if you know which updates were remaining on later runs that had the be executed again, what contrib modules you use, ...
Comment #18
alexpott@MmMnRr also if you have anymore of the backtrace of #11 it would be really great to see it.
Comment #19
MmMnRr commented@alexpott Unfortunately, as I did not update from drush I do not have more trace information. Furthermore, as the update worked now, I am unable to reproduce the issue again.
Comment #21
ajay gadhavana commentedI have same issue.
BTW first i was working on drupal 8.1 and I updated to 8.3.4
Files updated but when trying to run update.php its giving below errors.
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /update.php/start?id=14&op=do_nojs&op=do
StatusText: OK
ResponseText:
Fatal error: Call to undefined method Drupal\Core\Config\Schema\Undefined::get() in /core/lib/Drupal/Core/Config/StorableConfigBase.php on line 179
Comment #22
ajay gadhavana commentedHello all,
My error also solved.
I also tried to run update.php multiple times but its not helped.
after that I have cleared the caches and run again update.php all the errors got disappeared.
I have list of errors if anyone want to check more.