New Podcast

Posted Tuesday, July 27 at 2:29 pm

Ryan Price and Mike Anello recently talked with Jacob Redding (jredding), author of Beginning Drupal as well Treasurer and Interim General Manager of the Drupal Association.

Download Podcast 41
DrupalEasy_ep41_20100727.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

Mike quickly spotted several flaws in our Drupal configuration and was able to teach us how to correct them. His training style and solid knowledge of Drupal makes for an efficient and productive training session. I came away with full confidence in the data I learned that day.

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

Help! Anonymous User Comments Disappeared!

Average: 3.3 (3 votes)

Looks like some MySQL data export/import operations can fail for anonymous users. I just did a data dump from my local development server to the live site and all the comments by users who aren't logged in were not showing up. Gone. Missing. It turns out MySQL was trying to stick the autoincrement value in the `uid` field in the place of the supplied `0`.

mysql auto increment

When the users table got migrated, UID zero ended up being 23 instead, and it seemed like all my anonymous comments were deleted. I started turning off modules and more or less panicking. All my comments with UID 0 were still in the comments table, so I tried changing the UID of a few comments - they showed up.

This happens because Drupal can't join the database tables if there is not a proper row to join against.

phpMyAdmin edit screen
Eventually, I went to phpMyAdmin and found the offending record in the users table. Change the row with the blank username back to zero, and everything is back to normal. Just click the little pencil and type away.

Hope this helps some folks out there when they're migrating data back and forth. Personally, I use NaviCat, which is lots of fun, but just about any desktop or web-based tool is going to work for shifting data around. Just watch out for these pitfalls.

P.S. Thanks to nvahalik for a glance over my shoulder on this one.

Trackback URL for this post:

http://drupaleasy.com/trackback/17

4 comments

Jonathan Brown wrote 1 year 21 weeks ago

http://drupal.org/node/204411

http://drupal.org/node/204411
user picture
ryanprice wrote 1 year 24 weeks ago

Yeah, we have Mollom, but I

Yeah, we have Mollom, but I still notice some spam getting through. I wonder if we are hitting their throttling - I think they only inspect so many comments/submissions/spam in one day. I have another site where my organic groups contact form is constantly spammed, but comments are pretty normal.
Velvet wrote 1 year 24 weeks ago

You are having problems with

You are having problems with spam. Mollom it's not working ?
Payalnik wrote 1 year 32 weeks ago

This issue leads to many

This issue leads to many problems. If the id=0 row is absent in the users table, sessions are not kept for anonymous users so they can't do many things such as fill out multipage forms.

Add your comment

The content of this field is kept private and will not be shown publicly.
 
Syndicate content