Problems with name lengths

Skip to first unread message

Lorenzo Cioni

Jan 9, 2014, 6:52:26 AM1/9/14
Hi everibody... first of all let me I apologize with you for my English...then here is my problem... I have a hierarchy of folders and I want to put a download folder in one of my html pages with either a shortcut to a file in another folder or a file within that folder but even if I create an element with a name of only one character I get an error message of 404 page not found and this prevents me frmo modifying the element and if I go on the browser side I see that the path of the same element seems to be truncated in some way... I suspect that the problem is in the allowed maximum length of the pathnames...  I would like to know if I am right, if there is any solution (without modifying the structure of thehierarchy) on which is the value of this maximum length...
many thanks and best regards.. ops, I forgot saying that I am using Version 2.7.8 of Ariadne...

Auke van Slooten

Jan 9, 2014, 8:07:22 AM1/9/14

there is a maximum pathlength, but you shouldn't hit that unless you're creating some outlandishly large paths. The maximum length should be set to 255 characters. Earlier versions of Ariadne had this set to 128, which you can hit with relatively sane paths. It might be that you haven't properly upgraded Ariadne. In the www/install/upgrade/ directory is a script to automatically run all upgrades that you may have missed. It should also make sure that the maximum path length is set to 255 characters.

If you need more than that, you should reconsider your site structure, but with a modern MySQL or mariadb database, and possibly with PostgreSQL as well, you should be able to configure your database to accept longer paths. The table to alter is the ariadne_nodes table, where you need to increase the length of the path and parent columns.

Something like:

alter table ariadne_nodes modify path varchar(1024), modify parent varchar(1024);

This is from memory, so you should check your database manual for the correct syntax :)

However, by making the path and parent columns bigger, the path index will need more memory and become slower, so my original advice stands, keep path lengths below 255, smaller is always better.


PS. if you aren't sure if this is the problem, check the contents of the database. The structure isn't hard to understand, the full path is stored in the table ariadne_nodes in the column path. If it is truncated, check the definition of the column, if it is set to varchar(128) you'll need to run the upgrade script.
Reply all
Reply to author
0 new messages