Menu token module adds extra properties to menu items and there could be thousands of items with token support, that data should be stored in a database instead of a system variable. Use cache functions to improve performance.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | menu_token_db_storage.patch | 4.93 KB | develcuy |
Comments
Comment #1
develcuy commentedThere is still some work to do: Make sure that menu_token data is deleted when the menu item is deleted. Improvements welcome.
Comment #2
develcuy commentedThis issue is being worked at branch feature-1087212.
Comment #3
dealancer commentedCool, I am testing it now, however version (of module 6.x-1.x) is not in the branch name .
Comment #4
dealancer commentedGreat job Fernando. The idea with using static var is really good. Here is my feedback:
1) I've got menu transfered from variables to database after secound or third update. I don't know the reason of that yet.
2) I would like to rename menu_token_update_6001 to menu_token_update_6000, cause many modules has update like last one.
3) Probably we should also delete all variables
This fix needed to be also ported to Druplal 7, before other issues should be fixed.
Comment #5
dealancer commentedTo solve it I have split creating table and performing queries in two different hooks, and for the second hook I am checking return values for that queries. If those queries was not performed it stops executing of them, and user probably knows about it. See http://drupalcode.org/project/menu_token.git/commitdiff/bbe7d2e6ea2428e6....
However when the first time performing drupal_write_record it returns false. This should be fixed.
Comment #6
dealancer commentedFinally I get rid of those errors and updated has been done in single update. See changes: http://drupalcode.org/project/menu_token.git/commitdiff/6a2fd6732f268c6a...
This could be merged with main repository.
Comment #7
dealancer commentedWe need to have many reviews about this issue, please update Menu Token module to latest dev version for Drupal 6 as it has new functional added for this issue. There are some feedbacks for new functional http://drupal.org/node/1095556#comment-4251878, but we are appreciate if you leave comments here.
Comment #8
dealancer commentedI have completely rewrote update function, see http://drupal.org/node/1095556#comment-4389146
Comment #9
dealancer commentedComment #10
dealancer commentedComment #11
dealancer commentedComment #12
dealancer commentedWe need to port this issue to D7 version of this module, so I am creating new brunch 7.x-1.x-feature-1087212
Comment #13
dealancer commentedIn D7 version I have moved variable to db, have made minor fixes, refactored some code and added comments.
In D6 version I have also made some changes: refactored code, minor fixes and added Hicomments.
Hi @Yuri, could you please review this changes, test installation and test update from alfa version: variable -> db.
http://drupalcode.org/project/menu_token.git/shortlog/refs/heads/7.x-1.x...
http://drupalcode.org/project/menu_token.git/shortlog/refs/heads/6.x-1.x
Comment #14
dealancer commentedI have merged branch 7.x-1.x with 7.x-1.x-feature-1087212. So now all changes should be in dev.
Comment #15
develcuy commentedJust did an update test from 6.x-1.0-alpha1, it works great!
Comment #16
dealancer commentedcool :)