Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
views.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Oct 2018 at 19:27 UTC
Updated:
17 Sep 2019 at 16:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gmaka commentedAttached patch fixes the issue.
Comment #3
gmaka commented#2 was a bad patch, this is the corrected one.
Comment #4
mudassar774 commented#3 The patch was not applied for to 8.7.x branch
Comment #5
andileco commentedPatch #4 worked for me for updating from 8.6.(don't remember) to 8.7.3.
Comment #6
lendudeWhy would this not be an array? That sounds like broken config. So are we sure this is not just hiding a valid failing scenario?
Comment #7
gmaka commentedLendude,
I am not sure, I just ran into this again on a different project after 10 months and it looks like a whole lot are encountering this.
Take a look at this issue.
When the update fails with the the typeError mentioned in this issue, the subsequent updb's will fail with this issue https://www.drupal.org/project/drupal/issues/3039586
It looks like I may have been able to piece the two issues together. In any event, patch #4 applies for me and fixes all my woes.
Moving on.
Comment #8
gmaka commentedLendude,
You're correct, In my case it was failing because of a Broken/missing handler in a view. Removing that missing handler allowed the update to run cleanly without the need for this patch.
Thanks!
Comment #9
gmaka commentedComment #10
gmaka commentedComment #11
plachI think we should reopen this: we cannot risk to break the update process because a view cannot be resaved, we already committed similar fixes in the past weeks.
Comment #12
plachComment #13
plachComment #14
plachThis tries a slightly different approach, since each callback might decide to handle a NULL value differently.
Comment #15
plachComment #16
plachA conceptually similar fix was applied in #3052492: ViewsEntitySchemaSubscriber should not make an entity update fail if a view cannot be resaved.
Comment #17
amateescu commentedIt looks like we could use the view from
core/modules/views/tests/modules/views_test_config/test_views/views.view.test_view_broken.ymlfor the test coverage here.Comment #18
plachThis should provide test coverage, the test-only patch is the interdiff.
I could not rely on the broken view suggested by @amateescu because that does not return a NULL handler and it seems it is actually impossible to save a test view with a NULL handler value, so I had to work around that.
Comment #19
plachThe test-only patch was broken, reposting it.
Comment #20
plachFixed a couple of PHP docs issues.
Comment #21
plach... and the interdiff.
Comment #23
amateescu commentedLooks great to me! Thanks for sticking with this, @plach :)
Comment #24
amateescu commentedIt looks like this could fix a lot of the problems for people updating to Drupal 8.7.x (based on #7), so tagging accordingly.
Comment #26
catchCommitted/pushed to 8.8.x and cherry-picked to 8.7.x, thanks!