Forums / General / updateniceurls.php and __1

updateniceurls.php and __1

Author Message

Grégoire Paris

Thursday 09 October 2008 6:44:42 am

Hello,
I'm trying to fix a problem with ugly urls on a website using eZ Publish 3.6.1
Some url are ending with __1, so I wrote a shell script in order to list them, and see which are caused by duplicates, and which are not. Here is the SQL request the script is performing

SELECT chemin_version_$DBSUP
        EXISTS (	SELECT path_identification_string
		FROM $DBSOURCE.ezcontentobject_tree  
		WHERE path_identification_string LIKE SUBSTRING(chemin_version_$DBSUP,1,LENGTH(chemin_version_$DBSUP)-3)) AS doublon
FROM (
            SELECT path_identification_string AS chemin_version_$DBSUP
            FROM $DBSOURCE.ezcontentobject_tree
            WHERE path_identification_string LIKE '%\_\_1'
            ) AS tab_1;

I ran my script before and after running updateniceurl.php and only one path was fixed. I tried analysing the code, but I could not understand the code in ezchartransform.php...
So the question is : Is my request good enough to detect duplicates I should delete before running updateniceurls.php (i.e. is there another table I should check) ? Or is there a bug which makes this difficult to fix?

EDIT : For one of these objects with __1 in their alias, removing the __1 resulted in a redirection to another node in the same directory :s:s:s
Thanks in advance for your help.