Posted by deviantintegral on January 26, 2009 at 6:39pm
| Project: | Drupal core |
| Version: | 6.x-dev |
| Component: | menu system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
| Issue tags: | Newbie |
Issue Summary
Yet another static cache problem. This time, the menu tree can become stale when inserting multiple book pages in a single request. As the menu tree is stale, children of children can't be inserted:
Example:
Parent
-- Child
-- Childworks but
Parent
-- Child
--- Childwill fail on the last page.
Patches are forthcoming. This affects Drupal 6 as well.
Comments
#1
Here are patches for 6.x and 7.x. Any suggestions for appropriate test cases? I could just verify that the cache is accurate after adding menu items, but that seems a little simple.
Also, I currently reset the cache in menu_rebuild(), and then leave it up to the calling code to call menu_rebuild(). I'm guessing that book.module should call that somewhere (it doesn't), but I think that should be a seperate patch as it probably occurs in other modules as well.
#2
I ran into this problem with my custom module in Drupal 6. The suggested patch fixes my problem, so I hereby vote to have it in the next Drupal 6 release.
#3
The last submitted patch failed testing.
#4
This has been dealt with in HEAD over at #422368: convert menu.inc to use new static caching API.
Anyone feel like giving the patch against 6.x another review?
#5
I simply added manually the change to the head, the last patch won't add everything.
#6
Re-roll looks good; don't want to RTBC it as I created it, but I'm marking as a newbie-friendly patch as it's a fairly simple and clear change.
#7
Here is a reroll to sync against DRUPAL-6.
#8
The last submitted patch, 364529_menu_tree_all_data_cache_6.x_7.patch, failed testing.