New Podcast

Posted Tuesday, January 31 at 3:28 pm
  Thomas Turnbull (tom_o_t on drupal.org) and Alan Palazzolo (zzolo on drupal.org) join Mike Anello to talk about their new book from O’Reilly Media, Mapping with Drupal. Mike’s usual co-hosts, Andrew and Ryan, were both unable to participate in the podcast, leaving Thomas and Alan subject to Mike’s long-winded (but extremely interesting by some accounts) questions.
Download Podcast 73
DrupalEasy_ep73_20120131.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

Spending the day with you guys really helped me realize that Drupal allows me to do many of the same things I manually did, but in a nice little package already to go. I look forward to attending the next class you have.

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 39 weeks 2 days ago

Thank you! This was my exact

5

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

user picture
ryanprice wrote 2 years 51 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 2 years 51 weeks ago

You are having problems with

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

Payalnik wrote 3 years 8 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