Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
field_ui.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2013 at 11:08 UTC
Updated:
29 Jul 2014 at 23:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aspilicious commentedHappens on any entity apparantly
Comment #2
swentel commentedComment #3
alphawebgroupthe problem is in object to array conversion in those functions:
entity_get_form_modes()
entity_get_view_modes()
Comment #4
alphawebgroupi think it's critical issue after #2111823: Convert field_ui / Entity local tasks to YAML definitions is resolved
Comment #5
tim.plunkettThere's no problem with entity_get_form_modes() or entity_get_view_modes() here.
The problem is in
\Drupal\field_ui\Access\FormModeAccessCheckand\Drupal\field_ui\Access\ViewModeAccessCheckWhen on a path like
admin/structure/types/manage/article/display, it uses the route from\Drupal\field_ui\Routing\RouteSubscriber, which has the 'entity_type' added to the $defaults. But when on a module defined route likeadmin/structure/types/manage/article, it does not have the entity type specified, and those access checks fail immediately.Comment #6
tim.plunkettComment #7
alphawebgroup@tim.plunkett
it fails on any path after the cache flushing
also, it sets a wrong cache value to "entity_view_mode_info:en"
that value wouldn't be unserialized next time
Comment #8
alphawebgroupahhh, yep, understood...
please ignore my #7 comment
Comment #9
swentel commentedThis fixes it for content types, accounts and taxonomy vocabularies.
Comment #10
tim.plunkettThat's one way to fix that, but how would you know to do that? Only Field UI needs it.
Comment #11
swentel commentedRight, different approach, works fine too.
Comment #12
tim.plunkettThat is *much* better! Now we just need tests.
Comment #13
swentel commentedComment #14
amateescu commentedThe test and the fix looks good, sorry for breaking this :)
Comment #15
dawehnerThis fix makes totally sense.
Comment #17
webchickNice catch!
Committed and pushed to 8.x. Thanks!