I'm building a new forum with the D6.2 core forum.
When I create a forum topic, the new node paths are incrementing automatically from the numbers already in the system paths. But it's not recognizing that some of these numbers are already being used as aliases for some of the existing nodes.

So when I click on a topic, instead of opening the topic it opens a story or a page already on the site with the same path number (as an alias) as the topic.

These aliases are listed in the database "url_alias" section, but I can't figure out why they are being used again as new system paths.

Any idea?
Thanks!

Comments

cog.rusty’s picture

Probably the developers did not expect that someone would want to use path aliases of the form "node/xx", since the whole idea of aliases was to avoid using "node/xx".

I don't expect this to be fixed either, but that's just my guess.

roaming’s picture

Yes, that probably the problem.
And I can't change the aliases to a more meaningful name, because they are there as a redirect for old path on a previous site; so they are important for SEO. I believe others use it this way, too, from what I've read in posts.

Now, what's surprising is that it doesn't happen with stories and pages.
Since I rebuilt my site, all new stories and pages never get node numbers already in use as aliases.
It's only for the forum topics.
Any reason for that?

Edit:
The thing I realized I that stories and pages are listed in pathauto, but not the forum topics.
If they are content, I don't understand why they don't go through the same process as other content.

cog.rusty’s picture

There is a (not very slick) workaround. The "next node id to be assigned" is in the sequences table in the database, in the row for nids.

Find the highest alias nid that you are using on the site. Then go to the sequences table and enter a value higher than that. So, you will leave those nids behind when creating new nodes of any type.

roaming’s picture

It's not very slick, but for me it is.
I don't know MySQL but it seems simple enough that I can figure it out.

I'll wait until tomorrow when my mind clears-up (hopefully), after a long day of trying to figure this one out; just to make sure I don't screw-up. And I'll do a backup first!
Thanks!

roaming’s picture

Thanks, cog.rusty!

It works very well and my new node path numbers are now starting with the number I entered.
If any one else has this problem, here are the details on how to get to it:

FIRST, BACKUP YOUR DATABASE.

- In phpMyadmin, select your database.
- In the "Table" column, find "node".
- Select the "structure" icon. (to the right of "node").
- Select the field "nid".
- In the top tabs, select "operations".
- Go to "table options".
- In "auto-increment", change the number to the one above the highest path number in the site.

The new node paths will start with this number.

Keep in mind that I don't know much about MySQL.
So if anyone more experienced finds something wrong with the way I explain the process, please post it.
Thanks!

cog.rusty’s picture

So, I learned something too. Apparently Drupal 6 has abandoned the "sequences" table and now uses autoincrements.

roaming’s picture

Unless I missed something obvious, I couldn't find a "sequences" table, but after some digging I found the way as stated above.
That's why I'm not 100% sure that it's the best way.
But it works.
Thanks!