I have upgraded from D6.24 to D7.12 (the same happened when I tried to upgrade from D6.22 to D7.10).
This is what I get on a node that contains one comment:
Notice: Undefined variable: key in comment_prepare_thread() (line 900 of /home1/mysite/public_html/test7/modules/comment/comment.module).
EntityMalformedException: Missing bundle property on entity of type comment. in entity_extract_ids() (line 7501 of /home1/mysite/public_html/test7/includes/common.inc).
If a node contains more than one comment, no error is shown, but only one comment is displayed, others are not.
Before upgrading I disabled and uninstalled all non-core modules.
Trying to fix this error, I uninstalled the comment module and installed it back again. But when anonymous comment is posted, the same error occurs again: the page is broken and the abovementioned error is displayed.
Is there anyway how this could be resolved? I would be very grateful for any assistance! Thanks!
Comments
Comment #1
xjmThanks @endrus. The best thing to do would be to narrow down the minimum steps to reproduce the problem. For example, if you install a fresh version of Drupal 6.24 with no contributed modules, create a node with one comment, and then upgrade to 7.12, do you get the error? If not, is there a contributed module that causes it? Etc.
There's also some other troubleshooting you can try in some other posts (similar to but different from the issue you posted on previously):
http://drupal.org/search/apachesolr_multisitesearch/%22Missing%20bundle%...
Maybe those posts can help narrow the issue down. E.g., there is an open issue with a similar error for the comment notify module.
Comment #2
endrus commentedRerolled back to D6.24 and started debugging. Uninstalled modules relevant to commenting and found out that the problem with comments was occurring in D6, as well. Comments by anonymous users were not shown. Quick search on d.o helped find the solution - http://drupal.org/node/957050#comment-3644772.
Inserting user with UID 0 to 'users' table in the DB fixed the problem in D6. Upgrade to D7 worked without glitches. All comments are shown correctly. Whoohooo! Drupal rocks!
P.S.: I had the following comment-relating modules installed on D6:
AJAX Comments 6.x-1.8
CAPTCHA 6.x-2.4
Captcha Riddler 6.x-1.2
Comment notify 6.x-1.6
User Comment 6.x-2.0
I assume it was one of the latter two modules that caused this problem. Maybe when I uninstalled them before upgrade, the anonymous user was deleted from the database.
Comment #4
ayalon commentedThis happend to me when my anonymous user in the table "users" did not have the id 0! This can happen if you import a backup sql file. Try setting it to 0.