Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
26 Jan 2013 at 18:26 UTC
Updated:
29 Jul 2014 at 21:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sundrupal8.entity-uris.0.patch queued for re-testing.
Comment #3
tim.plunkettAlso, from #1826602-122: Allow all configuration entities to be enabled/disabled
Comment #4
jibranRelated #1803586: Give all entities their own URI
Comment #5
sundrupal8.entity-uris.0.patch queued for re-testing.
Comment #6
sunOK, incorporated #3.
Would be lovely to move forward here :)
Comment #7
andypostMaybe better to document why we have to use "uri_callback" annotation (@see menu_entity_info_alter()) and overriden everywhere uri() method with absent sane parent implementation for example #1803586: Give all entities their own URI
Looks like code-duplications. Maybe better to fix #1803586: Give all entities their own URI
Looks like Needs tests for both cases
Comment #8
sunOut of scope for this issue.
Out of scope.
There is no way to test this in core, since Drupal core does not expose the menu item/link label for an administrative user role path anywhere.
The static 'title' and lack of a proper dynamic link label gets only exposed by admin_menu, which expands the dynamic routes into actual menu links, by generating the Cartesian product of registered dynamic routes and available config entity ID arguments.
Comment #9
fagoThis patch does not respect the uri-callback of those entity-types. What about following the way of the d7 entity module?
- Default to the callback Entity::defaultUri() in entity::uri()
- Default to NULL in the callback such that the default handling does not change
- Override defaultUri() for each entity type?
Comment #10
sunre: #9: That's not invented here.
Comment #11
fagoIndeed, opened #1907208: Some config entities do not respect uri callbacks.
Comment #12
sunThanks! :)
So what's left here? Can we move forward?
Comment #13
sun#6: drupal8.entity-uris.6.patch queued for re-testing.
Comment #15
sun#3 landed separately.
Comment #16
tim.plunkettI still don't get why this is in this issue. If it weren't for that hunk, it'd be RTBC. But that has nothing to do with Entity URIs from what I can see.
Comment #17
sunDrupal core does not expose the menu item/link label for an administrative user role path anywhere.
The static 'title' and lack of a proper dynamic link label gets only exposed by admin_menu, which expands the dynamic routes into actual menu links, by generating the Cartesian product of registered dynamic routes and available config entity ID arguments.
Comment #18
sunAny chance to move forward here? :)
Comment #19
andypost@sun user_menu() hunk really out of scope of the issue. Role edit form shows "Edit role" title so file follow up for #1479454: Convert user roles to configurables
Comment #20
sunSeriously. I'll create a new issue for that user_menu() hunk, but the pedantry is a little beyond me.
Comment #20.0
sunUpdated issue summary.
Comment #21
jibran19: d.patch queued for re-testing.
Comment #23
gábor hojtsyIs this issue still relevant? We put in annotations for these a while back.
Comment #24
andypostDo we use annotations for config entities as well?
At least this issue could be used as clean-up for partially converted entities
Comment #25
gábor hojtsyIndeed we do, see their code :)
Comment #26
gábor hojtsyConfig translation is chock full of code and tests that are based on the edit-form annotations, so I think this is resolved. See http://drupalcode.org/project/config_translation.git/blob/refs/heads/8.x... where config entities are discovered based on their annotations and above where fields config entities are integrated (which do have a uri() callback instead of annotations since they derive their uri from their parent entities).
Tests ensuring these work are at http://drupalcode.org/project/config_translation.git/blob/refs/heads/8.x...
So marking this a duplicate of #2083615: Use links annotation for config entity URI like for content entities.