- Merge request !10Issue #3271467: Add menu link to section library β (Closed) created by Grimreaper
- π§πͺBelgium tim-diels Belgium π§πͺ
You could also copy paste the config from the install to your exported config file and reimport it. Make sure you didn't change anything on the view or you'll need to re-add those.
- First commit to issue fork.
- πΊπΈUnited States jastraat
I rebased this against 1.2.x and added a post update hook to update the view config for sites that already have section library installed.
- πΊπΈUnited States jastraat
Just merged β¨ Make section library template fieldable Active which defines an explicit menu item in the admin menu for the section library view which makes this approach outdated.
- π«π·France Grimreaper France π«π·
Hello,
Sorry to re-open, but with β¨ Make section library template fieldable Active , there is no more tab on admin content view to go to the section library collection.
Yes, there is now a menu link, but with Navigation module it is not displayed.
So should we use this issue to provide a root level menu link for navigation "content" menu? Or create a dedicated one? Or not supported?
I will create another issue to re-provide the tabs.
- πΊπΈUnited States jastraat
Yes, I did swap the tab for a menu item under content; that's what I understood this issue to be doing but I may have misunderstood. Could you clarify where you think the view makes sense?
- π«π·France Grimreaper France π«π·
Regarding other Core views, the behavior is not consistent:
- content: the view provide the tab (as default menu tab), removing the tab in the view makes admin/content to still the the tab and fallback to the content entity type list builder, no more the view
- blocks: the view provide the tab, but also code in block_content.links.task.yml
- comments: the view provide the tab, but also code in comment.links.task.yml
- files: the view provide the tab, but no additional code, removing the tab in the view remove the tab.
- media: the view provide the tab, but also code in media.links.task.ymlIf the path is /admin/content/section-library, the tab from the view is not working. Because it fallbacks to the entity list collection route, no more the view. I guess that's why Core modules add the tab with code, and tab is removed for Files because file entity type does not have a collection route declared in the entity annotation.
So I would say, let's remove the tab from the view as it has no effect, use code in links.task.yml.
And for admin menu link, let's also use code.
Also when saving the section library view I have this PHP error:
Deprecated function: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Core\Config\Entity\Query\Condition->compile() (line 39 of core/lib/Drupal/Core/Config/Entity/Query/Condition.php).
- πΊπΈUnited States jastraat
Given the work being done in β¨ Restore the tab to section library collection Active , perhaps we should close this ticket in favor of that one?