Loading...
 
Features / Usability

Features / Usability


Problem editing large menus - 200 odd items 403 error

posts: 91

For some time I have had problems deleting from or adding items to a more or less standard menu. I can change properties ok but not the menu text or the url / action either. If i try these actions i get a 403 error on saving. I have tried creating a small menu (10 items) and this does not have the same problem. My mem setting in .htaccess is 1024M
I can do some of this with SQL, deleting is easy but adding more work, but this is a hassle.

Also does anyone know how you can specify a menu that the admin cant see? obviously set p by a user with admin privileges.

I'm using V24.2 btw

Rod

posts: 91
Robuste wrote:

For some time I have had problems deleting from or adding items to a more or less standard menu. I can change properties ok but not the menu text or the url / action either. If i try these actions i get a 403 error on saving. I have tried creating a small menu (10 items) and this does not have the same problem. My mem setting in .htaccess is 1024M
I can do some of this with SQL, deleting is easy but adding more work, but this is a hassle.

Also does anyone know how you can specify a menu that the admin cant see? obviously set p by a user with admin privileges.

Rod


posts: 8633 Israel

Some confusion for me here...

1/
It is not recommended (or possible) to modify the core Tiki menu (id 42)

I strongly suggest you duplicate the menu and work on the close.
You just have to set in your module the id of the cloned menu in place of the original menu.

2/ If this is what you are doing, setting a different menu, you shouldn't have such problem. (I do that all the time)

  • Create a new menu
  • Edit/create menu items (on the menu row => wrench => menu option
  • Drag a new item, modify and save
  • Edit using the "I" icon


Can you explain what you are doing and when the error happens exactly ?

posts: 91

HI there Bernard thanks for your reply

I have actually had this problem for a while through several versions of tiki.
I even did a fresh install with a new empty database as a trial at one point.

Bernard Sfez / Tiki Specialist wrote:

Some confusion for me here...

1/
It is not recommended (or possible) to modify the core Tiki menu (id 42)

I strongly suggest you duplicate the menu and work on the close.
You just have to set in your module the id of the cloned menu in place of the original menu.

Yes understood I am doing that.

2/ If this is what you are doing, setting a different menu, you shouldn't have such problem. (I do that all the time)

  • Create a new menu
  • Edit/create menu items (on the menu row = wrench = menu option
  • Drag a new item, modify and save
  • Edit using the "I" icon


Can you explain what you are doing and when the error happens exactly ?

I can create a brand new menu and add modify and delete items no problem
Have only gone to 10 or 15 options / items with this.

I have cloned menu id 42 and I can edit this in all the relevant ways but when i hit the "Save Options" button I get the message ". 403 error" I think the . is actually a bullet point,
and the changes are not saved.

This happens whether i edit the cloned version while it is the active menu or when it is just an additional menu in the database.

It is almost as if there is an inbuilt limit of around 180 / 190 / 200 items

This does not happen 100% of the time as i did manage to get a working modified
cloned menu at some point but can't now modify that.

Regards,

Rod


posts: 126886 United Kingdom
Robuste wrote:

I have cloned menu id 42 and I can edit this in all the relevant ways but when i hit the "Save Options" button I get the message ". 403 error" I think the . is actually a bullet point,
and the changes are not saved.


Error 403 means "forbidden" and the save function checks the permission tiki_p_edit_menu_option, which presumably you have to be able to load the page at all... so i don't understand why this should be related to the size of the menu.

Do you see anything related in the apache error_log?

Maybe raise a bug report set up a show instance on dev.tiki.org?


posts: 8633 Israel

Arhhh

Your answer is inside the quote and I missed it.

May be you have some "rejected" characters, or code, or very long string in your menu...
Can you try a new menu and adding item menu one by one using a simple word (no accent, no punctuation or exotic language) ?

posts: 91

Thanks you Bernard an John for your comments.

I created a new simple 260 item menu just unique name and the same url.
This works as expected when editing, deleting an item or adding a new item.

I created a new cloned menu id 42 in my live web site, also on a fresh V24.2 install new database, and also on a V 25.0Alpha install new database. In all cases i get a "leave site? dialog when trying to save an edit, delete or create new item.

When i try to edit my current menu created some time ago using Export of menu 42 clone and edit the .csv and then import, i get the 403 error previously mentioned.

I can't believe that i am the only one with this problem over the last 3 years or so, unless i am doing something wrong.... but what? :-)

Rod

posts: 126886 United Kingdom

Hi @Robuste

Ah, i didn't get that the 403 error was when you import a csv of menu items, i didn't try that.

And i tried with an old clone of menu 42, just tried it in 24.x with a fresh one and i get the "leave site" error too - will fix that quickly quick and report back...

posts: 126886 United Kingdom

I'm pretty certain i've fixed the issue with editing a clone of menu 42 being completely broken, and, for ones where it was working, fixed the "same-is" checkbox being ignored (which is for when you want several versions of an option to show up depending on preferences or permissions)

That's pushed to trunk, 25 and 24, so is available via git now, or as a daily tarball from dev.tiki.org tomorrow.

Hope it works for you!

posts: 91

OH great thanks very mush will let you know how i get on :-)

Rod

posts: 91

Unfortunately this has not sorted the problem for me, and the problems are a little browser dependent.
I delayed a little while in trying this as i am in NZ and not exactly sure when your "tomorrow" is.
So:
Windows 11 non complying hardware
Broswers latest versions
tiki V24.3 vcs .timestamp file 25/11/22 11:31 pm

Clean install new database no customization.


Browser Can Clone Can save clone on editing
.
Chrome No no dialog 403 error
Edge Yes 403 error
Opera Yes 403 error
Firefox Yes nothing happens

the chrome edit test was done after cloning on another browser

I have not tried export/ import yet as I don't really want to work that way.

Any suggestions please? :-)

Regards,
Rod

posts: 91

OK i have done some more trial and error on this.
Apart from the browser specific issues above, the problem seems to be that drag and drop to introduce a new option does not allow saving when either of the "Save Option" buttons are clicked.

If you create a new bare bones option using export / import you can then edit and save correctly using the "i" button and then the "Save" button at the bottom of that entry form.

Rod

posts: 126886 United Kingdom

This all sounds like something's wrong with your server, but also i'm not sure what you mean by non complying hardware?

If you could file a bug report here please https://dev.tiki.org/File-a-bug and set up an example "show instance" on tiki 24.x then maybe i can export that and work out what the problem is?

I'll try it all in Edge when i next get a chance, but its all works fine in Chrome and similar browsers for me...

posts: 126886 United Kingdom
Just tried importing an export of a clone of menu 42 and it worked fine on my localhost, no sign of any 403 Forbidden errors, so i suspect that might be a server thing, unless someone else can reproduce it? 🤓
posts: 91

Hi there John

It turns out it was an issue with my server.

"ModSec, a server protection service."

Apparently multiple white listings were needed to eliminate it.
Thanks for your help a long the way :-)

Regards,
Rod

posts: 126886 United Kingdom

Hi @Robuste

Thanks for letting us know, yes, ModSec has come up before, in fact there's a page about it here ModSecurity - is there anything you could add to that page that might help others in the future?

Very glad you found a fix, happy Tiki'ing!


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting