OK, this is my very first post here, and pretty new to Drupal (allthough I did read the manual, looked at the help files and have been searching for the last few hours).

Here is my case.

I used to have geeklog, and follow the geeklog migration strategy outlined here on drupal.
I imported my old stories from Geeklog successfully in the node, node_comment_statistics, and node_revisions, all with an increasing NID / VID.
So far so good, and I can see these old stories, edit them, ... all nice and shiny with the correct UID, Date, etcetera.

The problem comes when I create a new story / blog / ... it is created with NID zero (0) and any follow up gives a duplicate error.
Old posts referenced a table called sequences, but this table is obsolote and replaced by the db_last_insert_db #149176: Getting rid of the sequences table, using db_last_insert_id() instead of db_next_id()

I have been trying to get my head around the API's and which table I am missing, but cannot find the culprit.

Also, when I log out, the main page of the site is stating that it is still new (welcome to your new drupal site ...), but I am pretty sure that when I find the above culprit, it will work as well.

Any help, guidance, pointers greatly appreciated.

Thanks a lot,
Boris

Comments

Anonymous’s picture

You need to update your sequenses table. The table keeps track of the latest nodes, comments etc, and if you add content manually, you need to update this table manually too.

knuff’s picture

Hi Fyrsten, thanks for the swift response, but as I mentioned it seems the sequence table no longer exists as such in drupal 6.x

Unless offcourse there is another table with a different name that acts as "sequence" table.

I understood from searching here, that php will get the next NID automatically from SQL.
But or it asks it from a different table as the node tables, or I am lost why.
I noted the NID attribute on node is not set to autoincrement, but if I understand the logic behind the changed module, this should not be needed.

Thanks,
Boris

Anonymous’s picture

Oh, sorry, I was too fast, I had the same issue when I did a manual migration, but that was with D5, where the sequenses table mattered.

knuff’s picture

OK.

Did a full clean install.
Added the history table to it.

All looks good untill I create a new story after the upload, and it gets created with NID zero.
Why ?
Original clean install creates the very first with NID 1.
Once I upload all historical stories, and try to create a new one it reverts to zero, while I did create two initial stories on initial install.

Can it be the Unix date ?
Can it be the cache tables ?

Some of the experienced gurus should be able to point me in the right directions, no ?

Thanks,
Boris

knuff’s picture

Problem solved.

Since I dropped and inserted the tables, the autoincerement option was lost in the restore excercise.
Did a full reinstall, and just a truncate of the tables, made my day.