MantisBT - Piwigo
View Issue Details
0001077Piwigoconfigurationpublic2009.07.26 14:212011.09.16 09:38
grum 
rvelices 
normalminorrandom
closedfixed 
2.0.3 
2.1.0 
any
Apache 1.3.x
0001077: The "config / menu" functionnality allowing to manage the order & visibility of menu blocks don't work everytime
When using the "config / menu" functionnality in the admin part, allowing to manage the order & visibility of menu blocks.

Sometimes, the order is not saved correctly.

One example :

---set with interface---
mbSpecials:10
mbAdditionalPages:20
mbMYPOLLS_menu:30
mbAMM_personalised1:40 (hidden)
mbTags:50
mbLinks:60
mbAMM_personalised2:70
mbCategories:80
mbMenu:90
mbAMM_randompict:100 (hidden)
mbAMM_links:110
mbIdentification:120
mbTranslator_register:130

---saved---
mbSpecials:10
mbAdditionalPages:20
mbMYPOLLS_menu:30
mbAMM_personalised1:40 (hidden)
mbTags:50
mbLinks:60
mbAMM_personalised2:70
mbCategories:80
mbMenu:90
mbAMM_links:100
mbAMM_randompict:110 (hidden)
mbIdentification:120
mbTranslator_register:130



When I take a look in the code, I see (in admin/menubar.php file) this comment :
// BEGIN OPTIM - DONT ASK ABOUT THIS ALGO - but optimizes the size of the array we save in DB

As noticed in the code, I don't ask how this algo works.
But when I disable it, everything works fine....


The order is saved in then config table ("blk_menubar" record)
Here the records :

---with OPTIM ALGO---
a:12:{s:10:"mbSpecials";i:441;
s:17:"mbAdditionalPages";i:442;
s:14:"mbMYPOLLS_menu";i:443;
s:19:"mbAMM_personalised1";i:-444;
s:6:"mbTags";i:445;
s:7:"mbLinks";i:446;
s:19:"mbAMM_personalised2";i:447;
s:12:"mbCategories";i:448;
s:6:"mbMenu";i:449;
s:16:"mbAMM_randompict";i:-500;
s:16:"mbIdentification";i:600;
s:21:"mbTranslator_register";i:650;}

---without OPTIM ALGO---
a:13:{s:10:"mbSpecials";i:50;
s:17:"mbAdditionalPages";i:100;
s:14:"mbMYPOLLS_menu";i:150;
s:19:"mbAMM_personalised1";i:-200;
s:6:"mbTags";i:250;
s:7:"mbLinks";i:300;
s:19:"mbAMM_personalised2";i:350;
s:12:"mbCategories";i:400;
s:6:"mbMenu";i:450;
s:16:"mbAMM_randompict";i:-500;
s:11:"mbAMM_links";i:550;
s:16:"mbIdentification";i:600;
s:21:"mbTranslator_register";i:650;}

As we can see :
 - the mbAMM_links value doesn't exist in saved data with the OPTIM ALGO
 - size of the two saved arrays : optim=337char , not optim=361char

So, the algorithm is complex, don't works very well, and optimized size is not very optimized : is it necessary to keep it ?
No tags attached.
Issue History
2009.07.26 14:21grumNew Issue
2009.07.26 14:21grumbrowser => any
2009.07.26 14:21grumWeb server => Apache 1.3.x
2009.07.27 18:34ddtddtNote Added: 0002718
2009.07.27 22:10plgStatusnew => assigned
2009.07.27 22:10plgAssigned To => Pat
2009.07.27 22:10plgNote Added: 0002719
2009.07.28 21:48PatNote Added: 0002728
2009.07.28 21:52PatAssigned ToPat => rvelices
2011.09.16 09:38rvelicesNote Added: 0005528
2011.09.16 09:38rvelicesStatusassigned => closed
2011.09.16 09:38rvelicesResolutionopen => fixed
2011.09.16 09:38rvelicesFixed in Version => 2.1.0

Notes
(0002718)
ddtddt   
2009.07.27 18:34   
The problem occurs when there are more than 10 menu block
(0002719)
plg   
2009.07.27 22:10   
Pat, ddtddt told me you were the right guy for this problem :-)
(0002728)
Pat   
2009.07.28 21:48   
I comfirm that optimization cause problems...
(0005528)
rvelices   
2011.09.16 09:38   
close old bug