Fatal error: Cannot access empty property in /home//public_html/modules/node/node.module on line 549

i get this message after submitting a node

i find the node later later in the admin/content
if i try to delete it or access it i get this error again

this happens with embed video and embed image

this all happened after upgrading

Comments

alex ua’s picture

Abqaria-

As I suspected, you have bigger issues than emfield.

Do you have the update_status module installed? You should install and make sure that all of your other modules are up to date.

I'm pretty sure that this is not an emfield specific error (even though it happens with content types that have emfield fields enabled), you should ask this question in the general forums so that you can get more people's input on your error.

aaron’s picture

Priority: Normal » Critical

could you print_r($node) for me on one of the troublesome nodes? let me know if you don't know how to do that. (easiest way is probably to install the devel module, although there are a few more steps after that. also possible to create a node with php filter, then $node = node_load(NID); print_r($node); replacing NID with the bad node.

thanks,
aaron

vaish’s picture

I experienced exactly the same problem and after some debugging came to this solution:

emthumb module line 129:
return array($fieldname => $items);

$fieldname is not defined and therefore an array with empty key is returned to node_load which causes the fatal error.

Replacing above line with this code fixes the problem:
return array($field['field_name'] => $items);

alex ua’s picture

Status: Active » Needs review

Awesome. Thanks! I'll e-mail Abqaria and ask him to try it out.

abqaria’s picture

i did disable the the embedthumb and everythig worked okay regarding the fatal error however the IE aborted operation is still there

abqaria’s picture

Title: Fatal error » i created a page

i created a page with the code you provided you can access it here

http://www.i-bloggers.com/tester

the original node causes an error in IE

I do have the update module installed and all the latest modules

thanks

abqaria’s picture

Title: i created a page » not related to embed media

i have another site that does not use embed media and gives the same error on IE on displaying a youtube code shown in a block

http://www.tagnsniff.com

but i do not know how to solve it

abqaria’s picture

well guys , sorry for everything

i found did , its related to the javascript tools .dev

i disabled it and it worked on IE

aaron’s picture

Title: not related to embed media » Fatal error
Component: Code » Embedded Media Thumbnail
Assigned: Unassigned » aaron
Status: Needs review » Fixed

thanks for spotting that bug, vnd. i committed the fix just now.

glad to see your page is working now, abqaria.

closing this issue now.

aaron winborn

drupalnewbiehaha’s picture

Component: Embedded Media Thumbnail » Embedded Image Field

I am getting the same error for this module. The error pops up after I added two new fields (Embedded Video & External Image) the page type (or any other content type),

Fatal error: Cannot access empty property in /home/myusername/where/drupal_5_5/modules/node/node.module on line 549
Also another fatal error for missing 3rd and 4rd arguments (cant reproduce the exact error message)
I have all modules and drupal in the most recent versions, for debugging purpose, I have only installed cck, image and this modules. Please post your solution if you have solved this problem.

Thanks

aaron’s picture

the fix for this was posted earlier this morning. it probably won't be in the release for another 12 hours or so. you can apply the fix from comment #3 if you need it sooner than that, or download the file directly from cvs. sorry

aaron

drupalnewbiehaha’s picture

Hi aaron,
I grabbed the latest version from the cvs (1.12), and created a new drupal site for debugging purpose. I am using drupal 5.5, cck-5.x-1.6-1, and only turned on clean url and reset the path for file system. No any other modules and neither touch anything else. But I got this error after I created a new field with external image.

Fatal error: Call to undefined function imagefield_check_directory() in /home/name/where/drupal_5_5/sites/all/modules/emfield/contrib/emthumb/emthumb.module on line 63

aaron, you mentioned I can applied the fix from comment#3, I cant find "return array($fieldname => $items);" in line 128, neither the entire emfield.module. Do I miss something or mis-configure something? Please give me some help.

p.s: aaron, would you mind to give me your email or something else so I can reach you immediately? I am in a hurry to get the project done.

Thanks a lot

vaish’s picture

It seems that you didn't install imagefield module.

Path to emfield module should be something like this:
/sites/all/modules/emfield/emfield.module

Hope this helps,

drupalnewbiehaha’s picture

Hi vnd,
Thanks for your help.I installed imagefield and that error message was gone (emfield.module is in the correct path), which is good. However, it still doesn't display the image after I put some image url from flickr or picasa. Generated html doesn't contain any image url as well, I guess I bit confused as I have no idea what to do.

Thanks for your patience

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.