Okay, this one has me stumped.
_______________________________________
Drupal 6.22
Access to update.php Protected
Configuration file Protected
Cron maintenance tasks Last run 1 sec ago
You can run cron manually.
Database updates Up to date
Drupal core update status Up to date
File system Writable (public download method)
Module and theme update status Up to date
MySQL database 5.0.51a
PHP 5.2.6-1+lenny9
PHP memory limit 512M
PHP register globals Disabled
Page title version Enabled (page_title table contains 270 rows)
Unicode library PHP Mbstring Extension
Update notifications Enabled
Web server Apache
________________________________________

I just upgraded to 6.x from 5.x, and everything has been going well, when suddenly I start finding nodes with what appear to error messages for titles. They have no content, and are uneditable in the normal sense -- I can click on the edit tab, but I just get a completely blank screen below the tab.

The site is a blog site, but these aren't blog nodes. They are, however, nodes--and they claim to be posted by me as administrator -- only, of course, I did no such thing.

example: node/2139 Title: "Can't add javascript to header in hook_footer()"

Does anyone have any idea where these might be coming from, and how to fix them?

Thanks,

Ken

Comments

brycesenz’s picture

Ok, so I have no idea what might have caused these nodes to be created. It sounds though like (1) All of the nodes that *should* be there are unaffected, and (2) All of the erroneous nodes should just be deleted.

If the above is true, I think that the easiest way is going to be to run some SQL code to cleanup your database. Something like the following should work:

/* You determine the WHERE clause which identifies the bad nodes */
DELETE FROM node WHERE type = '';

/* Repeat the following for each content_field_* table in your database */
DELETE FROM content_field_XYZ WHERE (nid NOT IN (SELECT DISTINCT nid FROM node));

/* Repeat the following for each content_type_* table in your database */
DELETE FROM content_type_XYZ WHERE (nid NOT IN (SELECT DISTINCT nid FROM node));

DELETE FROM node_comment_statistics WHERE (nid NOT IN (SELECT DISTINCT nid FROM node));
DELETE FROM node_counter WHERE (nid NOT IN (SELECT DISTINCT nid FROM node));
DELETE FROM node_revisions WHERE (nid NOT IN (SELECT DISTINCT nid FROM node));

You're going to have to examine the database manually and determine the best way to identify these nodes. A list of nids would work, but might be somewhat time consuming. If they are all of the same type, that would be a lot easier.

Obviously, back up EVERYTHING before you mess with the database, just as a precaution.

Ken Watts’s picture

Thanks for the advice and especially for the SQL code.

If anyone else has any idea where this came from, I would love to hear your thoughts -- both because I am now afraid it will continue to happen, and also just because I hate a mystery of this kind.

Thanks again, brycesenz.