When you change the field values on the menu item edit page (ex: admin/structure/menu/item/15483/edit)
The power menu cache is not cleared after submitting. People still see old values.
Adding a cache clear to menuFormSubmit, solved this for me.

Comments

weri’s picture

Assigned: Unassigned » weri
StatusFileSize
new27.01 KB

That's right, the cache should be cleared when a menu item form is saved. But I would not clear the cache only in the PowerMenuPathHandler, because this cache clear makes sense for every plugin.

It would be great when you can test my appended patch. After that, I would commit it.

Thanks!!

nils.destoop’s picture

Status: Needs review » Reviewed & tested by the community

The patch looks ok :)

nils.destoop’s picture

Status: Reviewed & tested by the community » Active

Found another issue.
When only editing the fields of power menu, no block cache is cleared.
This is because of this line in menu.inc

if (!$existing_item || (array_intersect_key($item, $existing_item) != $existing_item)) {
  update menu link in db
  _menu_clear_page_cache();
weri’s picture

Status: Active » Needs review
StatusFileSize
new3.17 KB

Yes the block cache should also be cleared. This is implemented.

I also have changed the power menu field entity caching behavior, because an entity was stored for every path. Now, the entity is only stored once per menu item and every path knows his lookup path (path for the menu item). Now it is possible to clear the cache for given menu item path. This was not possible before.

I have to test the changes before I commit it to the repo.

weri’s picture

Status: Needs review » Fixed

So, I tested this with different sites and it seems to work.

I will release a new beta soon. This includes also an important change in the naming of the bundles.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.