WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • General Help & Support »
  • Wrong menu id of a new created subpage
  • Print
Pages: [1]   Go Down

Author Topic: Wrong menu id of a new created subpage  (Read 22049 times)

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Wrong menu id of a new created subpage
« 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.
« Last Edit: February 10, 2024, 09:01:12 AM by dbs »
Logged
Web developer

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1892
    • EFG MG
Re: Re: Questions about alternative backend theme
« Reply #1 on: February 06, 2024, 07:49:51 AM »
My test was as follows:
A form page under a wysiwyg page

and it works for me.
see

https://82.umojasingers.de/pages/home/form-unter-wysiwyg.php
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: Re: Questions about alternative backend theme
« Reply #2 on: February 06, 2024, 08:52:57 AM »
Can you check in database too ?
If there are multiple menus and parent page Is Menu id =2 ( not 1 by default) and you add subpage using form on the bottom of the /admin/pages/index.php  (Add Page form below the menu tree) in the menu there is sub page displayed as child of parent page , but in database it will have menuId = 1 instead 2 , which Is menu id from parent page
Logged
Web developer

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1892
    • EFG MG
Re: Re: Questions about alternative backend theme
« Reply #3 on: February 06, 2024, 09:20:15 AM »
page_id     parent     root_parent     level     link                                          page_trail     position     menu     language     page_code     visibility     target     page_title                             
  30           1                     1                 1        /home/form-unter-wysiwyg       1,30                 2             1                DE                0                 public     _top          Form unter wysiwyg               
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: Re: Questions about alternative backend theme
« Reply #4 on: February 06, 2024, 11:22:10 AM »
Maybe I wasnt clear

Check images





Logged
Web developer

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1892
    • EFG MG
Re: Re: Questions about alternative backend theme
« Reply #5 on: February 06, 2024, 01:26:12 PM »
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.
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: Re: Questions about alternative backend theme
« Reply #6 on: February 06, 2024, 02:08:43 PM »
In Frontend Template, there should be multiple menus, and multiple menus enabled
example:
Code: [Select]
$menu[1] =        'Mainmenu';
$menu[2] =        'Topbarmenu';
$menu[3] =        'Sidebarmenu';

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.



Logged
Web developer

Offline dbs

  • Betatester
  • **
  • Posts: 8920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Re: Questions about alternative backend theme
« Reply #7 on: February 09, 2024, 07:20:10 PM »
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.
Can confirm. Seems the menu id from the first menu in list is standard if a new page was created.
Logged
https://onkel-franky.de

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: Re: Questions about alternative backend theme
« Reply #8 on: February 09, 2024, 08:47:21 PM »
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)

« Last Edit: February 09, 2024, 08:52:51 PM by crnogorac081 »
Logged
Web developer

Offline hgs

  • WebsiteBaker Org e.V.
  • **
  • Posts: 1892
    • EFG MG
Re: Wrong menu id of a new created subpage
« Reply #9 on: February 10, 2024, 11:19:40 AM »
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
« Last Edit: February 10, 2024, 11:27:39 AM by hgs »
Logged
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

"Never begin to stop - never stop beginning." Marcus Tullius Cicero (106-43 BC)

Offline crnogorac081

  • Posts: 2163
  • Gender: Male
Re: Wrong menu id of a new created subpage
« Reply #10 on: February 10, 2024, 03:19:14 PM »
Yes it's easy fix , if parent is set, use menu_id From parent.

Probably YUI couldnt Handle multiple lists or multiLevel lists. So i am moving to Sortable.js (vanila js)
Logged
Web developer

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • General Help & Support »
  • Wrong menu id of a new created subpage
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2