Path is corrupt, the object won't be saved.

18 views
Skip to first unread message

kevin uittenbosch

unread,
Mar 20, 2014, 10:11:42 AM3/20/14
to ariad...@googlegroups.com
Hi there,

for information i'm running:
Ariadne Version 2.7.8

I've got a problem creating an object 'ppage' within an 'particle' in the back-end of ariadne.

The complete tree structure looks like this:
psite > psection > pdir > particle > *ppage (here starts the trouble)


The first ppage i create works perfectly fine, no errors nothing. when i check on my website it's visible due a query.
But... I need more ppages here but when i create another ppage i get this error: 

Path is corrupt, the object won't be saved.

Here comes the fun part... The object is visible in ariadne & on my website! but when i click on it, it gives me a pop-up:

================================
THE PAGE AT ARIADNE.*******.nl SAYS:
The path you requested could not be found.
================================

So i try to create the ppage again with the same name and get this: 

ERROR: Mysql: 1062: Duplicate entry '/MySiteURL' for key 'PRIMARY'

 Any solutions?

Auke Van Slooten

unread,
Mar 21, 2014, 3:40:46 AM3/21/14
to ariad...@googlegroups.com
Op donderdag 20 maart 2014 15:11:42 UTC+1 schreef kevin uittenbosch:
I've got a problem creating an object 'ppage' within an 'particle' in the back-end of ariadne.
<snip> 

The first ppage i create works perfectly fine, no errors nothing. when i check on my website it's visible due a query.
But... I need more ppages here but when i create another ppage i get this error: 

Path is corrupt, the object won't be saved.

Here comes the fun part... The object is visible in ariadne & on my website! but when i click on it, it gives me a pop-up:

================================
THE PAGE AT ARIADNE.*******.nl SAYS:
The path you requested could not be found.
================================

So i try to create the ppage again with the same name and get this: 

ERROR: Mysql: 1062: Duplicate entry '/MySiteURL' for key 'PRIMARY'

Hi,

This is an interesting one. The 'Path is corrupt' error occurs only when you try to save an existing object with an incorrect path. E.g. you change the path from an existing object and then call save(). It should never occur when just creating a new object. Is there a user.workflow.pre.html or user.workflow.post.html template that is triggered when saving an object there? Or do you have any onBeforeSave or onSave event listeners defined? The problem might be there.

However the MySQL error is even more interesting. Could it be that your mysql database definition has a maximum path length of 128 characters and that the second objects path is just slightly longer than that, while the first objects path is slightly shorter?

MySQL has the nasty habit of just cutting of the part of a string that won't fit into the column. Ariadne tries to check if it will fit, but in recent Ariadne releases we set the limit to 255. If you haven't run the upgrade scripts, your database might still be set to 128 characters.

Hope this helps,
Auke van Slooten
Muze


kevin uittenbosch

unread,
Mar 21, 2014, 5:11:34 AM3/21/14
to ariad...@googlegroups.com
Thanks for the reply, 

But still no succes, I don't use any template to create the ppages, I do it back-end in ariadne. and still getting the errors. even if I flush the pdir from it's objects and try to add them all over again, every second attempt fails and gives me this error. 100% sure there is no duplicate or something.

we allready have the 255 limit but thats not the problem. if i create a 4 character word or a 15 character word it does the same thing. and only after adding the first wich works fine no matter what string length.
even the complete path to the object is only 117 characters long so I am confused.

regards,
kevin

 

Auke Van Slooten

unread,
Mar 24, 2014, 6:24:17 AM3/24/14
to ariad...@googlegroups.com
Op vrijdag 21 maart 2014 10:11:34 UTC+1 schreef kevin uittenbosch:

But still no succes, I don't use any template to create the ppages, I do it back-end in ariadne. and still getting the errors. even if I flush the pdir from it's objects and try to add them all over again, every second attempt fails and gives me this error. 100% sure there is no duplicate or something.

we allready have the 255 limit but thats not the problem. if i create a 4 character word or a 15 character word it does the same thing. and only after adding the first wich works fine no matter what string length.
even the complete path to the object is only 117 characters long so I am confused.


Hm,

the only other option I can think of is that somehow the case of the path is saved incorrectly. In the mysql table the path of an object is saved in full, as is the path of the parent. These must have the same case ( uppercase/lowercase ). If not strange things may happen. I know that in an earlier version of Ariadne there was a bug in the move() method, that could create this problem. Your best bet is to check in the database backend what is actually stored. You'll need to check the store_nodes table and search for all path's starting with the parent path which has this problem. Make sure to search case independant.

The problem is fixed in recent releases, so be sure to update soon :)

~
Auke 
Reply all
Reply to author
Forward
0 new messages