Hi!
Hope you would be so kind to point me in the right direction on how to find content that came with my upgrade from D6 to D7 that is causing errors ..
I've tried for several weeks now to find the offending problem, even rebuilding a vanilla site and then importing the 30 000+ nodes and yet still have several errors on cron run:
Errors:
Search is stuck at 2% ..
Notice: Trying to get property of non-object in _node_index_node() (line 2632 of /home/public_html/modules/node/node.module).
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7405 of /home/public_html/includes/common.inc).
Notice: Undefined property: stdClass::$type in _node_extract_type() (line 370 of /home/public_html/modules/node/node.module).
Results in sql and views:
All nodes are related to a nid, vid, type and uid in sql
In views no orphaned nodes when 'filter is not of content type' (so all nodes are related to a content type)
What it might be was the conversion of image fields in D6 to managed files in D7, could that be it? Yet the error claims to be a node?
Most most appreciate any help, and thank you.
Lilian
Comments
=-=
you want to read and follow through on http://drupal.org/node/1277376
Thank you so much for your
Thank you so much for your reply VM, and yes I have read that thread before as well
I have found by disabling modules one by one to rule out Views, Aggregator and Taxonomy.
It happens with the Search module when cron is run.
Please what does that mean
Trying to get property of non-object in _node_index_node() (line 2632 of /home/public_html/modules/node/node.module).?and how can I start tracking down what is causing the error? I don't think it's a bug in a module, it could be a bad node or something to do with the files attached to nodes that got corrupt in the upgrade.
Most appreciate any direction on how to find the troubled content :)
=-=
That error when used as a google search term target at d.o. reveals this thread http://drupal.org/node/1028230 which you may want to read through and if necessary reopen.
On a test site, I'd empty the search index table and try reindexing
thanks, this one worked for me
i just empty 2 tables from the DB
search_dataset
search_index
and then re-indexing the site content via cron run - solved the prublem for me!
THX!
This one worked for me! Had
This one worked for me! Had tried almost everything else - thanxs for posting!
search_dataset
search_index
I think I found the way to
I think I found the way to find bad content in the database as mine was the cause of an upgrade from D6 to D7 with over 30 000 nodes.
Create a view with http://drupal.org/project/views_bulk_operations
that contains 'title' | (sort by) 'nid' | 'file usage' | (sort by) 'entity type' | 'edit'
found that when I tried to edit the node that had a nid of '0' receive 'page not found'. Great! so I know that is not a good bunny.
Copied all those that I want to delete (with '0' nid) into mysql database as
So far all looking good, search is running at cron with no errors.
Please share your view
Hi Liliplanet -- Would you kindly export your view or put a screen shot online to take a look at. Having the same problem as I posted about here
http://drupal.org/node/1360034
Thanks!
Hg
Making Progress
Hi -- Okay I think I was able to set up the view. I did not install VBO (yet) just trying to make a table to see if I can find the problems first. Then either use VBO or do manually (ouch)
Now I have the view generating the same error I was seeing before, when I an trying to sort by "entity type"
-- So I can see I am getting closer to finding the bad 'nodes'. But am a bit stuck.
Also I have noted that some of the items in the view have no vale for "entity type" "module" and "use count".
Suggestions please?
Thanks for your previous post.
Hi Hyperglide, I quick
Hi Hyperglide,
I quick created a view for you without VBO. Any nodes with an empty nid you should delete. If you can't delete in on the system you need to go to your sql database and delete as described earlier in this thread.
Hope this helps some ..
Making progress...
Found 4 nodes without a node type (how did that happen?) and deleted them but now, whenever I get to a page with what must be a problematic Nid, the view craps out. Looking through the node table, everything looks fine -- every record seems to have a normal integer for a Nid entry with no "0"s. Now what? Any ideas?
Thanks for posting this
Thanks for posting this view..
When I run it, almost half of my nodes show up.
They all have nodeids... please see the below shot.
http://i.imgur.com/zr2Zo.jpg
Solved! -- THANK YOU!
Subject says it all!
Oooooo
Oooooo, this is good. (I haven't even tried it yet but I've been struggling with this kind of thing for a while and it's looking very much like you've found a solution.)
What about a module that would do some consistency checks on the node data and offer options for dealing with it? ...already sounds like a good candidate for inclusion in core. ;-)
Yep
If need more help let me know.
Please help !
I've exactly this error, but I'm a begginer with Drupal. Please help me ...
I've added the view of "Liliplanet on December 4, 2011 at 5:44am". Thank you Liliplanet !
I have that (traducted from my french install of Drupal) :
Here is a problem : for the topic "Welcome forums" of "Advanced Forums module's", content type is blank. There is no content type.
How can I modify my content type to define my content to one specific "content type" ?
I have no "content type" for all new content that is actually created on my site ! How this can happens ? (maybe I've done a error with Organic Groups?)
Please, help !!
Hi nothinghere, Hmm, it
Hi nothinghere,
Hmm, it definitely needs to be a 'content type'. When you look at the view, make sure you are looking at 'type' for content and not 'entity type' (which are for images and files).
What happens when you click on the link, does it exist? If you receive 'not found', go into the phpmyadmin and delete the node there.
A screenshot would help.
Thank you to get some time to help me
Here is a screenshoot :
http://imageshack.us/photo/my-images/522/drupalbug.png/
Yes, when I click on the link it exist. I don't have any "not found" error.
So, my bug don't come from problem described here?
hi nothinghere, yes when you
hi nothinghere, yes when you click on the link and it does not exist, we are on the right path :)
when you mouse over the edit link for that node, see the node id, write that down
go into your phpadmin, see the node table, find the node id (from above) and delete it.
if you have many nodes you want to delete, just
DELETE from node where nid IN (111, 222, 333, etc )replace 111, 222, 333 etc with your node id's
Check your node table for
Check your node table for content without a content type. This fixed my problem.
I had a single node created when I had the OG Example feature enabled. Later I turned off the feature , the node stayed, and caused the permission rebuild to hang. I removed the node and the permission rebuild ran smoothly.
Fixed for me
I'll tell you how I fixed it.
I got EntityMalformedException: Missing bundle property on entity of type node error in my watchlog (recent log messages) after trying to index search (so after cron run). Before my index was let's say 48%, after cron run it stayed same.
I did lots of things, other suggestions didn't help me, but finally I did this and suggest you too:
0. Backup your database!!!
1. Go to phpMyAdmin, to "run sql" section.
2. Put here "SELECT n.nid FROM node n LEFT JOIN search_dataset d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC LIMIT 0,1"
if you have table prefix, don't forget to put it here.
3. As result you'll get one row with nid, pick it mind.
4. go to node table and run here "SELECT * FROM node WHERE nid=your-nid" where your-nid is nid from step 3
5. Try to open your-website/node/your-nid - for me I got "404 error"
6. Go back to phpMyAdmin and delete this row
7. Run cron again
AS for me I did this 7-8 times to delete all "bad" nodes from database and finally get 100% index
if you don't have access to phpMyAdmin I guess you can do this:
0. Turn on PHP filter module and backup database
1. create node type of page for example, to body add code
choose "PHP Filter" of course
2. Click "Preview"
3. You should see node id on the screen. Test it like in step 5 of directions for phpMyAdmin and pick in mind
4. Now you can delete it with
5. Run Cron again
Code above I didn't test, so if you'll use it please post here if it works
Thank you and happy indexing ;)
Great, thanks Paradoxetion
The procedure above solved it for me. Although it seems to be much handwork at a glance, it's the way to find out the bad node directly responsible for crashing the indexer. You can then remove it carefully without affecting anything else.
Please note, the query is copied from the Search module itself! It's exactly the way the indexer fetches the next node during cron and points out who's the malformed entity.
Thank you so much for posting this!
I had tried a bunch of things from several other threads and issues of this type, but your method was what enabled me to eliminate the offending nodes. Thanks for taking the time to detail the process.
+1 to this solution. This
+1 to this solution. This happened for me after upgrading from D6 to D7. Not sure what caused it but the site is fully indexed again.
Additional information
Thanks to Paradoxetion for pointing me in the right direction. A malformed node does cause all sorts of problems. Here are a few queries to help others identify them.
Make sure all nodes have a node type. This will give you a quick report of how many nodes your site has for each type, including those without a type.
SELECT COUNT(*) AS nodes, type FROM node GROUP BY type;
Find nodes that don't have at least one node revision, as all nodes should in Drupal 7. This will identify nodes can't be added to the search index.
SELECT nid FROM node WHERE nid NOT IN (SELECT nid FROM node_revision);
Then either fix these nodes or delete them.
Still stuck
I'm still stuck on this. When I run the code (PHP filter enabled) I get.
Recoverable fatal error: Object of class DatabaseStatementBase could not be converted to string in eval() (line 3 of /var/www/xxx/modules/php/php.module(80) : eval()'d code).
Also I I look in the database under node I did have one entry that had 0 I removed that but the problem still persists. There are no other nodes without content types specified. Not sure what else to do.
History - Can't build permissions when I enable CONTENT ACCESS : FORUM ACCESS AND/OR ACL. All or singularly permissions fails to build 0 out of 1
This really helped!! Had some
This really helped!! Had some nodes that didn't have revisions. Deleting them solved the problem. Thanks a lot, you really saved the day.
Shabana Navas
snavas@acromedia.com
Software Developer
Acro Media
https://www.acromedia.com
1-800-818-4564
Skype: super.shaba
SQL helped me find empty node type - thanks!
Thanks, thumb! Your tip about group nodes by type helped me find an empty one - and solved my problem!
I had missing node types too and fixed it with bulk operations.
In views, use fields title, nid and added a bulk operation. Filter results by content type but select node that are not any of the content types you currently have on the site.
Example - listed content types are all of my current ones
I used title and node id, and I found nodes with no content type and no title, but did have a node id. Some deleted easily, others required deleting the node content in phpMyAdmin
Worked!
Good hint! Thank you for this. My site stopped indexing at 76% and was throwing the same error until I found a ghost node and deleted it.
Thank you!
Thank you very much, Paradoxetion! I've deleted "bad" node with PhpMyAdmin and now Cron runs without any errors.
Wow, thank you so much for
Wow, thank you so much for this.
I really hope to see a module for this one day. I run a few sites with feeds. And this scenario basically happens every day on every website. I've been fighting with this forever as it's nearly impossible to debug.
It's a major downer for D7 that this sort of stuff happens and breaks the search API. Great to see this solution, sad it will have to be a daily routine.
Thanks Paradoxetion!
----
"People make mistakes. To really mess something up you need a computer."
Mine was doing the same! Had
Mine was doing the same! Had 3 bad nodes that went to "page not found"
Different Approach
I added
dpm($node);at the first line of the functionfunction _node_index_node($node)in the "node.module" file.After the cron job crashed, I got just one item with a nid displayed in the message section. After deleting that node everything was fine.
Php My admin query and delete solved this
• Notice: Trying to get property of non-object in _node_index_node() (line 2782 of /home/reimagi8/public_html/new/modules/node/node.module).
I used the php query from the post above
Fixed for me
Paradoxetion
"SELECT n.nid FROM node n LEFT JOIN search_dataset d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC LIMIT 0,1
found an event node from an event calendar module that was installed in drupal 5 . We had deleted all content and all fields no issues until we migrated 6>7 in not a single bound. .... I also getting some cron errors from RSS feeds. easier to fix cause the error message indicates which feed item is the problem...ok now back to trying to index the site.
Thank a lot Paradoxetion it's worked
i tried your method ,Paradoxetion and it's worked
but i noticed that some working node are in the sql result ; i didn't delete them
how could we explained that ?
The discussion in #1299530:
The discussion in #1299530: php errors triggered during search indexing if content contains broken internal links might be relevant.