how to get rid of __1

Author Message

Jacek S

Tuesday 30 January 2007 11:01:13 am

I have problem with __1 in urls in my ez publish installation. I have red some posts in this forum about this problem and I have tried solutions which was described there. But I still have this __1.
I tried:
- change root node name, delete cache, delete trash and run updateniceurls.php
- change root node name, delete cache, delete trash, delete archived version and drafts and run updateniceurls.php
nothing has changed.

Is there any other solution for __1 problem?

Timmothy Green

Tuesday 30 January 2007 12:40:58 pm

Only time I have seen this happen is when I have a trailing space in the node name.

For example

"News " would generate "/news_1"
"News" would generate "/news"

Automation Technologies, Inc.
http://www.ati4it.com

Jacek S

Tuesday 30 January 2007 1:25:20 pm

i got it instead of root node name. I think it happened when i change this name.

Now i have
root node name(ex.): "rootnode"
but all urls looks like:
__1/secondlevel
__1/secondlevel/thirdlevel

and so on.

Hans Melis

Tuesday 30 January 2007 1:56:32 pm

First the problem:

This only happens when you edit the RootNode of a siteaccess in that siteaccess, the exception to the rule being the admin siteaccess. Why? Upon publishing an object, the kernel will publish node locations as nodes in the tree. If Node A is configured as the RootNode of siteaccess A, the kernel sets the node's path to an empty string when it's published within siteaccess A. Then it checks if the node's path exists and adds __(number) if it does. Every default installation already has a node with an empty path: Node 2 (the root of the content tree). So your Node A gets the empty path plus the __(number) extension. That's also why editing Node 2 in the admin siteaccess doesn't cause the same problem: it's the original node with an empty path.

Now the solution:

1. Don't touch the RootNode setting. That will keep you out of trouble in the future. If you need the different settings, create your own ini file and change the setting per siteaccess.

2. When it's too late (read: __1 appears), edit the node (the one configured as root node) in the admin siteaccess to give it the normal node path again.

3. Run updateniceurls.php

4. Depending on your configuration, you may need to clear some caches.

5. If that didn't help, clear the table containing the url aliases and rerun updateniceurls.php

That's how I got everything back to normal. I hope it works for you too.

More info:
http://lists.ez.no/pipermail/sdk-public/2006-July/002183.html
http://lists.ez.no/pipermail/sdk-public/2006-July/002184.html

Hans
http://blog.hansmelis.be

Jacek S

Wednesday 31 January 2007 2:04:04 am

Thanks for answer.

I did what you described but it had no effects:
Root node name changed.
Cache cleared.
updateniceurls.php doesn't have any effect - __1 sill in root node name.

Maybe you know any other solutions?

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