__1 or __2 appears in url

Author Message

Montel Sébastien

Tuesday 05 September 2006 2:07:28 am

Hello,

I encounter a problem with 4 sites ezp (version 3.8.3) I manage ; __1 or __2 appeared in the url. For example :
instead of
http://www.unr-unire.fr/index.php/les_partenaires
the url becomes
http://www.unr-unire.fr/index.php/__2/les_partenaires
the problem is not isolated, it appears on several sites (another site seems to have the same virus :) http://www.micro-optics.org/__1/news ) and there's no obvious reason.
Two tables in the database seems to be involved in this issue , ezcontentobject_tree (field path_identification_string) and ezurlalias (fields destination_url and source_url) ; but i don't know exactly how to manipulate this data to obtain correct path without __1 or __2.
This problem is very embarrassing, we need asap to propose these sites to our users.

Any ideas ?

Thanks a lot,
merci d'avance,

Sébastien

Svitlana Shatokhina

Tuesday 05 September 2006 2:13:26 am

Hi,

I'm not involved in this stuff but maybe you will find a solution here:
http://ez.no/community/forum/general/getting_rid_of_1_in_urls
http://ez.no/community/forum/developer/whats_1_in_url
http://lists.ez.no/pipermail/sdk-public/2006-July/002183.html
http://lists.ez.no/pipermail/sdk-public/2006-July/002184.html

Best regards,
Sveta

André R.

Tuesday 05 September 2006 2:34:56 am

could it be that you have an empty name on your root node ??

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Fabio Carissimi

Tuesday 05 September 2006 6:42:22 am

Hello, (I Work with Sébastien on this issue),

on ezpublish Sdk-public mailing list, somebody told us the problem comes from this part of code in the function pathWithNames in kernel/classes/ezcontentobjecttreenode.php :

$ini =& eZINI::instance( 'content.ini' );
$contentRootID = $ini->variable( 'NodeSettings', 'RootNode' );
if ( $node->attribute( 'node_id' ) != $contentRootID )
{
<snip>
}
else
{
  $nodePath = '';
}

because when somebody edit the root node, it is like having an empty name on the root node.
If I edit the root node (change name 'ezpublish' to 'Home page' for ex.) I can reproduce the bug on an ezp 3.8.3 installation but on another server with ezp 3.8.1, there is no problem.
Do you know why and how to repair it ?

Thanks for help

Softriva .com

Tuesday 05 September 2006 9:54:28 pm

I am not sure if this issue is related to my issue which because the object name is in arabic, the url_alias for that object is made as node_54, etc. I wish somebody from eZ can tell us about this.

http://ez.no/community/forum/setup_design/why_mylinks_to_nodes_appears_as_node_45_node_55_node_56/re_why_mylinks_to_nodes_appears_as_node_45_nod__3

zurgutt -

Friday 15 September 2006 6:05:53 pm

I have a experience which is related to above problem i think.

I am setting up a multisite system on one database.

Each subsite gets assigned a separate subtree and siteaccess. IndexPage, DefaultPage and PathPrefix are used to make each subsite to start on its own indexpage and to remove /subsitename/ path from URLs.

Also I did set RootNode in content.ini to point on the subsite indexpage, as I thought this was its function. That ini setting is totally undocumented though. I was using it in templates to make menus start at right level etc.

However this appears to have been a mistake. At first look everything worked fine until I edited the subsite root page (in user siteaccess, where RootNode setting was in power. After that the path for all nodes in subtree was broken. Subsite root that used to be "/subsite/rootpage" had become "__1" and pages under it "/subsite/rootpage/subpage" -> "__1/subpage" etc.

The mangled paths can be fixed again by editing that node in admin where RootNode still points to 2.

Apparently the RootNode setting should not be used by developers for anything at least until its function is documented and clear. I will also file a bug on this.

Certified eZ developer looking for projects.
zurgutt at gg.ee

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.