Training

Our next U.S. stop:

Mike Anello and Andrew Riley from Mediacurrent are teaming up to offer the first Blue Collar Git workshop on Friday, June 8 as part of DrupalCamp Charlotte (also part of the Southeast LinuxFest). The cost is only $149 for the full day if you register during the month of May ($199 otherwise). 

New Podcast

Posted Wednesday, May 9 at 7:50 am
Brandon Morrison (Brandonian on drupal.org) joins Andrew Riley and Mike Anello on the first post-DrupalCon Denver edition of the podcast to talk about all things Geo in Drupal 7. Brandon is one of the maintainers of the GeoField module and is an active member of the Drupal Geo community.
Download Podcast 82
DrupalEasy_ep82_20120509.mp3
Syndicate content

Newsletter

Stay up-to-date on DrupalEasy workshops and other events. On average, we send about one newsletter per month.

Testimonial

Mike is a great teacher!

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!

No votes yet

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

5 comments

Stefan wrote 1 year 1 week ago

Thank you! This was my exact

5

Thank you! This was my exact issue and I'm so glad it has been resolved!

ryanprice wrote 3 years 13 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 3 years 14 weeks ago

You are having problems with

You are having problems with spam. Mollom it's not working ?

Payalnik wrote 3 years 22 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.
 
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • Lines and paragraphs break automatically.

More information about formatting options

Syndicate content