givanz / Vvveb

Powerful and easy to use cms to build websites, blogs or ecommerce stores.
https://www.vvveb.com
GNU Affero General Public License v3.0
239 stars 49 forks source link

Issue with Menu Component #71

Closed Simthem closed 5 months ago

Simthem commented 5 months ago

Hello, At first, thanks a lot for all your great job for this tools ! :)

I'm facing of an little issue with the menu in editor. Some times it's appearing without any problem when I'm trying to change it in the header (move it, select another etc.) but some other times it's disappearing without error logged .. And after experience different situation, it seems to arrive after adding another custom submenu item or menu .. But I don't find any error in code so it's for that that I'm opening this issue.

Thanks in advance for your time and help and if you need more explanations/details, don't hesitate :)

givanz commented 5 months ago

Hi

Thank you :)

It disappears if a menu without items is selected or it's random?

When the page is saved the menu is visible?

The menu becomes visible again after adding new items in pages > menus?


I made some tests and found two possible causes.

1) Page editing might not be detected in some cases in menu component and for menus without items layout is lost on save.

For this issue I changed the code to prevent this from happening.

2) Php notices or warnings can break the content if they show during the menu change.

Screenshot_2024-01-26_23-44-20

If you have php notices enabled please disable them, you can also set

define('DEBUG', false);

in https://github.com/givanz/Vvveb/blob/master/env.php#L37 this is recommended if you don't use localhost or a development setup.

To apply the fix for 1) please redownload latest.zip and update at least app/template/components and clear cache.

If the issue still occurs please open developer tools (F12) and see in network tab like in the screenshot if there is a php error displayed when changing the menu.

Simthem commented 5 months ago

Thanks a lot ! I'll try and tell you if it's fixed :)

And for answer of the 3 questions :

It disappears if a menu without items is selected or it's random? No, for all menus (with or without items)

When the page is saved the menu is visible? No, even when sometimes it appear in editor and disappear on web classic page

The menu becomes visible again after adding new items in pages > menus? I'll try cause I did not yet

Thanks again :)