WebsiteBaker Support (2.13.x) > General Help & Support

Wrong menu id of a new created subpage

<< < (2/3) > >>

hgs:
Okay, then I'm out. I really don't understand the problem.

Should I create a subpage with a form from a page, regardless of which module was used?

or

Should I create a subpage from your form page?


Maybe there is a user who understands it better and can check it.

crnogorac081:
In Frontend Template, there should be multiple menus, and multiple menus enabled
example:

--- Code: ---$menu[1] =        'Mainmenu';
$menu[2] =        'Topbarmenu';
$menu[3] =        'Sidebarmenu';

--- End code ---

1. Below page tree, use Add Page, and create new page called example Page123 (select any module, set parent = none)
2. Open settings for this page, set menu = 'Topbarmenu' (menu id = 2). Now for this Page123, in database Menu id = 2, which coresponds to 'Topbarmenu'
3. Now back to Page tree page, and create new page called Subpage (select any module, set parent = Page123 ).

The problem is when this Subpage is added, in database fileld menu id for subpage is set to 1 by default, and should be inherited from parent page - menu id = 2

I hope it is now clear.



dbs:

--- Quote from: crnogorac081 on February 05, 2024, 08:13:48 PM ---one more bug to fix that I just noticed:

in Pages, when you create new page from Form ,and select as Parent some page (which is in different MenuId), if will assign MenuId = 1 in DB to new page instead  MenuId from Parent page that is selected.

--- End quote ---
Can confirm. Seems the menu id from the first menu in list is standard if a new page was created.

crnogorac081:
I have created test code that dumps pages From DB, then checks of there Are multiple menu_id's and create array like menu_id => array _tree(); menu_id => array _tree().. , where array tree Is parent-,> child multiLevel array

In my output it looks like this (separated lists)
https://ibb.co/py9cnTx

And this Is default view (currntly)
https://ibb.co/fHtVcQn

It Is not possible with phplib and i AM doing migration for complete backand to twig. But I need to create and load class to Handle Pages and Media ( the Rest of the code Can be reusable)

hgs:
I rebuilt this with WebsiteBaker 2.8.3 with php 5.6. The behavior is already wrong.

I will post a ticket here
https://project.WebsiteBaker.org/projects/wb-2-13/issues
Done
https://project.WebsiteBaker.org/issues/147

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version