Hi all,

I need to assign a particular node ID to a page that doesn't exist. For example, I need to assign www.mywebsite.com/?q=node/494 to a already-marketed-page (ID 494 is vacant). If I create a new page, it has ID 498. So I modify "node_counter" and "node" tables through phpMyAdmin in mywebsite DB. But It doesn't work. Even if I delete 498to493nid row in node_counter table, when I create a new page it has 499 ID (incremented +1). How can I do?

I have already sent a newsletter that promoted a page with ID 494 !!

|strexy

Comments

sampelo’s picture

you take the site offline,
set node increment to zero
and then assign? then change increment back
I'm sure there are better ways but this is quick

strexy’s picture

..deleting all the rows of node_counter table in my DB?

I have already deleted the last five rows of node_counter table (493 to 498 nid) but drupal increment the ID node normally (499, 450..) like I never deleted thats rows.

|strexy

geohelper’s picture

The `node_revisions` table is critical to change too.

nancydru’s picture

Go through all your table structures and see just how many of them include "nid" as a field. It's just not a simple thing. Sure, I'd like to be able to reuse empty node numbers and have even looked into it, but it is a real nightmare. Things like taxonomies and access control can make the spider web even wider.

In the future, send out your newsletter with a URL alias that can be easily updated.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

dman’s picture

Silly silly silly.

First, it's not node_counter you need to hack, it's 'sequences'. That'll let you restart the counter.
I've had to do manual nid synching a few times (over mirror sites) and it's not that bad, but should be avoided :)

Second, did you try assigning an alias from node/494 to node/499 ? Don't see why that wouldn't work.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

strexy’s picture

that's the table I was looking for.
Thanx a lot
:)

|strexy