When I try to update Drupal from 8.4.0 to 8.6.1 I got the following error
Module Views
Updating table_display_cache_max_age
Fail: InvalidArgumentException: Placeholders must have a trailing [] if they are to be expanded with an array of values. in Drupal\Core\Database\Connection->expandArguments() (line 729 of /http/xxx/site/core/lib/Drupal/Core/Database/Connection.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #39 | drupal-2999869-fix-update-error-35.patch | 515 bytes | enrocean167 |
| #12 | page-with-custom-seven-theme.png | 91.76 KB | hans.p. |
| #12 | page-with-bartik-theme.png | 99.26 KB | hans.p. |
| #12 | page-with-corrupted-default-custom-theme.png | 218.7 KB | hans.p. |
| #12 | errormessage-admin-reports-dblog.png | 112.66 KB | hans.p. |
Comments
Comment #2
cilefen commentedComment #3
teddyvermeulinI have exactly the same error :
InvalidArgumentException : Placeholders must have a trailing [] if they are to be expanded with an array of values. dans Drupal\Core\Database\Connection->expandArguments() (ligne 729 de /Applications/MAMP/htdocs/ssam2019/core/lib/Drupal/Core/Database/Connection.php).
Any idea ?
Comment #4
cilefen commentedBased on "Updating table_display_cache_max_age" this is going to be related to #2932083.
Comment #5
teddyvermeulinThanks.
I just downgraded to 8.5.6 and after upgrade to 8.6.1 and error disappear.
Best,
Teddy
Comment #6
lendudeafter #2932083: Views Table style plugin breaks dynamic cache landed it got updated in #2949351: Add a helper class to make updating configuration simple to use
\Drupal\Core\Config\Entity\ConfigEntityUpdater. Might be that the problem resides somewhere in that class. No idea if that is the case, but might be worth looking at.Comment #7
lendudeMy first thought was that this might happen when there are no entities to update. But a quick test addition to
\Drupal\KernelTests\Core\Config\Entity\ConfigEntityUpdaterTestshowed that works fine.Since that update function does nothing more then trigger
save()on each table view, do you have any Views that are strange/special/invalid/broken? Any views that break when you save them manually?Just thinking out loud here.
Comment #8
Clauce commentedHello,
I have the same problem, update drupal core from 8.4.5 to 8.6.1 and all modules along.
The db update throws the same error and those two tasks are left in queue :
views module
Fix cache max age for table displays.
Include views data table provider in views dependencies.
Any other idea how this can be resolved ?
Thanks
Comment #9
cupcakemuncher commentedI can confirm this.
Also updating from 8.5.6 to 8.6.2. "drush updb && drush entup" run without a problem.
"drush cim" on the other hand throws
Comment #10
mpp commentedSame error occurs after upgrading from 8.4 to 8.6.2.
These are the views for which update returns TRUE:
The latter,
watchdogis causing the error, when saving the watchdog view I get the same error:I can't save the watchdog view, I can create a duplicate "watchdog_clone" and delete the original view. The config is identical with exception of the label & the uuid:
When I clone the view back to the original name I can no longer save it...
Removing the Views "No results text" under "No Results Behavior" in the "Watchdog" view fixed it.
Comment #11
mpp commentedComment #12
hans.p. commentedHi all, is this problem fixed?
I got the same error after updating drupal to 8.6.4.
Referring to errormessage-admin-reports-dblog.pngNone of the related issue are clear enough for a fix.
Removing the empty behavior in the watchdogs view doesn't fix the problem for me.
Updating drupal via update.php after the watchdogs fix gives that same error again:
The update also broke down my default theme to a non-css styled page.
Changing to another theme like Bartik doesn't have any problem, and shows as designed.
Referring to page-with-bartik-theme.pngTherefor i tried setting bartik as default & cleared the cache.
Change back to the custom theme and cleared the cache again. But this results back in the non-styled page with only the plain text.
Referring to page-with-corrupted-default-custom-theme.pngComment #13
hans.p. commentedChanging to the english default language seems to fix the error.
But left me with the corrupted custom theme.
any suggestions?
Comment #14
illutek commentedSame problem here after updating from 8.4.8 to 8.6.7
Comment #15
ricardo.faria commentedI also have this issue. Using core version 8.6.8. Got this error after upgrade from 8.6.4. Investigating.
Comment #16
jjancel commentedSame problem here after updating to 8.6.9
Comment #17
salihcenap commentedBump! Faced the same problem after updating to 8.6.9
Comment #18
cilefen commentedComment #19
b0gucki3 commentedUsing 8.6.10, Drupal throws an exception when sending more than are arguments to buildRenderable() function.
The following works:
The following doesn't work. It throws an exception Placeholders must have a trailing [] if they are to be expanded with an array of values. in Drupal\Core\Database\Connection->expandArguments()
Comment #20
unarain commentedSame problem as @illutek
Update from 8.4.1 to 8.6.10
[error] Placeholders must have a trailing [] if they are to be expanded with an array of values.
[error] Update failed: views_post_update_table_display_cache_max_age
[error] Update aborted by: views_post_update_table_display_cache_max_age
[error] Finished performing updates.
Anyone managed to solve this issue ?
Comment #21
baysaa commentedThere was a serialization bug issue created for hal and serialization core modules in #3037970: Custom serialized field's data should be normalized even if it's empty. It might be related to the issues people are having in the latest comments. Have a go at the patch in the linked issue.
Comment #22
Luc Dengis commentedI have the same issue: when running update.php there are 2 update:
Fix cache max age for table displays.
Include views data table provider in views dependencies.
the update process fails with this error: InvalidArgumentException: Placeholders must have a trailing [] if they are to be expanded with an array of values. in Drupal\Core\Database\Connection->expandArguments() (regel 729 van /data/sites/web/vvw-gent-leiebe/www/test/core/lib/Drupal/Core/Database/Connection.php).
tried to apply patch in #21 but it fails with 'patch does not apply'.
running now 8.6.10 on my test site and 8.6.0 on my prod site. Both have same issue.
Anyone an idea how to fix this?
Comment #23
baysaa commented@Luc the patch in #21 is against 8.6.x-dev, so most likely 'git apply' will complain. Can you try with 'patch -p1 < file.patch', if it's just fuzz then you can reroll a patch against 8.6.10 with git diff
Edit: Or just update to 8.6.11 :)
Comment #24
rolf van de krol commentedI got the same issue after an update. The problem seems to be that the content of the empty display of a view used to be an array with a value and a format key, but now should be just a string. In my installation, this was only an issue with the watchdog view. So i fixed it in
drush phpwith:It feels a bit hackish, but it works.
Comment #25
quotientix commentedThanks Rolf, uninstalling DB logging fixed it for me!
Comment #26
jmbsvicetto commentedI've been hit by both issues 2999869 and 3039586.
When updating from drupal 8.6.15 to 8.7.1, I initially hit issue 2999869 and on following attempts I hit issue 3039586.
I ended up tracing the issue to having only the PT language installed on the drupal instance. After installing the EN language (and after removing the tmp_* and old_* tables), I was finally able to update without hitting any issues.
Comment #27
greatmatter commentedI stumbled across this post after searching for the same error, so hopefully this helps someone...in my case, I was calling
{{ drupal_view('featured_masonry', 'block_1', [node.id]) }}instead of
{{ drupal_view('featured_masonry', 'block_1', node.id) }}Comment #28
tuwebo commentedHello,
I think this issue could be a duplicated of the related issue #2998103: dblog_update_8600() breaks views.view.watchdog config entity, leading to PHP warning on admin/reports/dblog and configuration import errors. The issue has been updated and it might be worth to take a look at it.
Basically it seems that dblog_update_8600() introduced a "wrong" configuration for views.view.watchdog empty area plugin type. This could lead to some errors mentioned in this issue.
Maybe just a quick "dirty" workaround for testing it is changing docroot/core/modules/dblog/config/optional/views.view.watchdog.yml configuration entity.
FROM
TO
Reviews or comments will be very welcome, it is something we are facing and hard to debug.
The issue came (in my use case) when installing a site in a non english language and enabling a custom module, which has nothing to do with watchdog but... then Locale module hooks into locale_modules_installed() and executes
locale_system_set_config_langcodes()trying to save the watchdog view component in french language as this piece of code statesleading to the
Placeholders must have a trailing [] if they are to be expanded with an array of valuesInvalidArgumentException error since the watchdog view has already a "wrong" configuration.Comment #29
andypostComment #31
brunogox commentedThanks TuWebO, replacing the word area for area_text_custom in docroot/core/modules/dblog/config/optional/views.view.watchdog.yml fixed it.
Comment #32
ArmondThank you very much TuWebO!
The workaround works.
Comment #33
damien laguerre commentedSame here, I got this error after upgrading from Drupal 8.5.3 to 8.8.1.
So thank you TuWeBo, your workaround do the job!
Comment #34
lowfidelityThanks so much @TuWebO. Ran into the problem upgrading 8.6.x to 8.8.1 and #28 fixed it for me.
After running drush updb I got the error message. I wasn't sure if I had to reroll to the backup that was created before running updb. But I just edited the mentioned .yml file without rerolling the backup first. Running drush updb again finished with success.
Comment #35
tritof commentedHi, same as before the "dirty" trick from TuWebO mentionned in #28 worked for me. Muchas gracias !
Comment #36
kecsi commented#28 worked in db upgrade to 8.8.1 here too. Correct I have duo site lang as well.
Thank you @TuWebO appreciate your effort to add this comment here!
Comment #37
bramdriesenThe latest patch in the issue mentioned in #28 also fixed this problem for me (https://www.drupal.org/project/drupal/issues/2998103)
Comment #39
enrocean167 commentedThe fix from #28 attached as a patch as this was still an issue in one of our installations.
Comment #40
kumar ashutosh commentedI am getting in Drupal 9.
Thanks in advance
Comment #41
peterszanto commentedI got this message after trying upgrade 8.6.1 to 8.9.2: "remove_core_key post-update Remove core key from views
configuration". This patch worked for me. After the drush updb the alert dissapeared. Thanks a lot.
Comment #42
ivnish#28 save my time
Comment #44
apolitsin commentedthe same
Comment #45
rcodina#28 and patch on #39 saved my time too. Thanks!
Comment #48
larowlanSounds like we got to the bottom of this for folks some updates ago
Thanks all
Comment #49
quietone commentedThis is more a duplicate of #2998103: dblog_update_8600() breaks views.view.watchdog config entity, leading to PHP warning on admin/reports/dblog and configuration import errors