Problem/Motivation

See this issue here #3129179: Provide some way to rebuild the persistent bundle field map

There have been several occasions while developing a site that I've has to rebuild the field map using the code snippet in that issue. Usually when dealing with migrations or importing/deleting field configs.

I think that admin_toolbar_tools should provide a link to do this, like the other flush cache and theme registry rebuild links.

Proposed resolution

Add the code snippet from #3129179: Provide some way to rebuild the persistent bundle field map into a method of the ToolbarController in admin_toolbar_tools
and add a link under the flush caches menu for "Rebuild entity bundle field map"

I will post a patch in a bit.

Comments

loze created an issue. See original summary.

adriancid’s picture

Assigned: Unassigned » adriancid
loze’s picture

Status: Active » Needs review
StatusFileSize
new4.85 KB

here's a patch.

romainj’s picture

I'm not sure that we should add this type of link to the Admin Toolbar module. Maybe it's more of a Drush command that should be implemented. As it could be a dangerous change to your site, I think that it should not be available through the UI. But yes it's quite usefull in certain circumstances.

romainj’s picture

Status: Needs review » Closed (won't fix)