Questions on menu order setting in admin interface

dh

Member
Questions on the "menu order" setting (using left-hand default):

(1) If I use a container (which is a great feature!), then changing menu ordering produces unexpected results. I'm not certain how to order items within a container while also controlling the macro-ordering of the containers themselves. I'm sure I'm not understanding the setting where containers are involved. Can you give more guidance?

(2) When you start changing the default ordering from 1 for some pages when also using containers, you also get unexpected (seemingly random) placement of the static page (which I use as a help page), and I can't find a way to force the static page item back down to the bottom of the menu where I want it. Is there?

(3) There seems to still be a default opening page (the page that's highlighted with a vertical bar if you just enter /index.php) that cannot be changed by the menu order in admin. Is it the case that this is controlled by an alphabetical sort by underlying MySQL table name and cannot be changed in the admin interface?

Thanks

---
You are using DaDaBIK version 8.0-Lerici enterprise, installed on 04-29-2017 (installation code: 919954d8cace06819), the latest version of DaDaBIK is released on --

You are not running the last release of DaDaBIK, the release you are running might have bugs and security holes, see the official change log for further information. You can upgrade DaDaBIK here.

PHP Version: 7.0.18

mysql version: 5.6.35

Web server: Apache

Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30
 

eugenio

Administrator
Staff member
Hello,

1) You should use the "general" order value, without considering the fact that an item is or not in a container. Not sure it this is clear, maybe if you give an example I'll tell you how to set the order fileld

2) I am not sure if I have understood the problem, if you give me an example I can help

3) You are right, because of the way the menu is built, it is the first (in alphabetical order) that it is not in a container. Currently the best way to force a default page is to use an home (custom) page.

Best,
 

simpletheu

New member
Actually, I also have a problem with the "menu order", which does not seem to be working on my new installation. Menu items get ordered alphabetically, although I have set different numbers on the menu order page. The Group and User pages get listed in two distinct containers Admin, for instance. Any idea where to look to correct this?
Thanks!


----------
You are using DaDaBIK version 8.0-Lerici pro, installed on 05-11-2017 (installation code: 12476591485f6a8701), the latest version of DaDaBIK is 8.0-Lerici released on 04-24-2017

You are runnning the last release of DaDaBIK

PHP Version: 5.3.3

mysql version: 5.1.73-log

Web server: Apache

Client: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
 

eugenio

Administrator
Staff member
Hello,
this is strange, the items should respect the orders; did you change orders or other parameters directly from the database? There is no way to change the order of the two admin links from the admin interface.

Best,
 

simpletheu

New member
thanks for the feedback! No, I haven't change any data directly in mysql database. I've started with a fresh install of dadabik 8 but since the outset the menu order follows an alphabetical order, without taking into account the number in the menu order setting nor the container setting: the two admin links are ordered alphabetically in two containers admin. Any advice where to look to debug this is most welcomed...
Best, Th.
 

eugenio

Administrator
Staff member
If you started with a new installation it is very strange; I have no clue about what could have happened, if the application is publicly accessible I can have a look.

Best
 

simpletheu

New member
ok, bug solved, problem was related to php version: with php 7, my menu ordering is correct, in PHP 5.3.3, the ordering is alphabetical only. No idea why...
Th.
 

eugenio

Administrator
Staff member
I don't think it is possible, the development has been done with PHP 5 and then tested with 5 and 7 and the results are the same.
 

simpletheu

New member
Puzzling...It's probably related to a specific configuration of my academic server:
it is currently running php 5.3.3. With php ini set on 'display_errors', dadabik indicates the following error:
Parameter 1 to array_multisort() expected to be a reference, value given in /data/chroot/data/prod/esag/test/include/general_functions.php on line 669
This does not occur when running my installation with php7.
 

eugenio

Administrator
Staff member
Hello,
after a long research I think what you are experiencing is related to a PHP bug that has been fixed in PHP 5.3.1:
https://bugs.php.net/bug.php?id=61273
is there a way for you to upgrade your 5.3.3 installation to a more recent 5.3.x version? If yes, can you tell me if that fixes the problem?
 

simpletheu

New member
Thanks for your time, Eugenio! Unfortunately, I don't have access to the PHP installation of my academic institution, it's either 5.3.3 or 7. Sorry about that...
 

eugenio

Administrator
Staff member
No problem, it's finally confirmed it should depend on a PHP bug fixed in php 5.3.11, see my other post at the end of this thread:
https://dadabik.com/forum/read.php?1,18892
 

dh

Member
Follow up to Eugenio's answer to my original question #3 (skipping the php bug reported by the other user)

> 3) You are right, because of the way the menu is built, it is the first (in alphabetical order) that it is not in a container. Currently the best way to force a default page is to use an home (custom) page.

I discovered a workaround without resorting to a custom home page. If an awkward Table or View is ending up as the default opening, then push that name to the bottom of the sort list by prepending a first character that sorts at the end of the alphabet in UTF. For example, the Japanese character `一`or something less obtrusive that still works . Keep doing that until the Table or View name that you want to open as default rises to the top of the alphabetic sort order. These small changes to Table or View name will not affect the specified "menu order" but they *will* affect the default opening page.

See generic advice on sort order at https://stackoverflow.com/a/29563948/1248789 . I like this answer. Some of the other answers on that page included characters like the hyphen or tilde that did *not* push the name to the end of the sort order, in my experiments. At any rate, I'm satisfied with the workaround for now, though I think designating the default Page/View is probably still a feature request.
 

dh

Member
I should add, with respect to my last reply above, that this workaround does not require hacking business_logic and can be done entirely in the admin interface table/view naming page without touching the underlying MySQL database.
 
Top