Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Feb 2015 at 06:11 UTC
Updated:
21 Mar 2015 at 17:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chx commentedComment #2
berdirThat's the calculate dependencies code, that has hardcoded assumptions that everything must be there when default views are imported, and it is not when the views data is not.
I'm not sure how to fix this myself, maybe we need some sort of dependency to skip those default views if the views data they need is not available?
Comment #3
dawehnerYeah, I guess we want to check for the base table in views data + the existance of the sql query plugin maybe?
Comment #4
alexpottDiscussed with @chx and @dawehner in IRC. The outcome of which is that we're going to add a new method to ConfigEntityBase called isInstallable() that will run before config entities are created by the installer. By default this returns TRUE but views will be able to determine if the base table exists and go from there.
Comment #5
chx commentedIssue summary updated
Comment #6
chx commentedLet's see if this blows up. Meanwhile I will look for a good place to add an assert.
Comment #8
chx commentedComment #9
chx commentedI think to test this we need an entirely new test module. Do we want to do that?
Comment #10
alexpott@chx just use the ConfigTest entity make it return false for isInstallable depending on state and then add to one of the existing config entity tests.
Comment #11
alexpottComment #12
dawehnerI always like if we explain a bit more why a config entity might not be installable, so for example has dependencies on more than just config_dependencies.
Let's directly cast it to bool here,
Nitpick: whitespace.
Comment #13
chx commentedComment #15
chx commentedNot sure what to do.
this passes just fine here.
Comment #16
chx commentedComment #17
dawehnerThank you for addressing my concerns!
Comment #18
catchGood find. I don't see another way around this.
Committed/pushed to 8.0.x, thanks!
Comment #21
chx commentedThe fun continues at #2456951: Impossible to enable views if entities are not in SQL: part 2