While working in a nearly fresh install of Drupal 7 I'm encountering these errors:
* Notice: Undefined variable: node in eval() (regel 3 van /var/www/vhosts/vandemaele.be/httpdocs/modules/php/php.module(75) : eval()'d code).
* Notice: Trying to get property of non-object in eval() (regel 3 van /var/www/vhosts/vandemaele.be/httpdocs/modules/php/php.module(75) : eval()'d code).
The closest match with an already mentionned issue is this post in the topic "Deleting a content type leaves orphaned fields". As I deleted the two default content types of D7 indeed, I thought applying the patch mentionned in the related topic ("Deleting node type with only instance of a field leaves the field in a strange zombie state") would solve the problem, but unfortunately it didn't. The patching-process returned this message in Terminal:
patching file field.crud.inc
Reversed (or previously applied) patch detected! Assume -R? [n]
So the patch didn't resolve the issue since the file is already modified since the build of dec. 15th 2010 (using the D7 version of jan. 5th 2011 atm).
The error persists though.
I've disabled modules like "Translation management", and "Chaos Tools" (the only two relevant modules on my install afaik). No result.
I'm also using the Omega 960-theme, but switching to a default theme (like "Stark") results in the same error.
I'm out of ideas. Does someone have an idea what else could be the issue?
Comment | File | Size | Author |
---|---|---|---|
#7 | Amplifier - WyreStorm 2014-08-11 13-56-57.png | 251.39 KB | Rohit_Rajput |
Afbeelding 2.png | 38.22 KB | knalstaaf |
Comments
Comment #1
knalstaaf CreditAttribution: knalstaaf commentedAnother thing: the website will officially be located at domain.com (as mentionned in the error, but there's a plain html site there atm), but is currently located at subdomain.domain.com. If this could be of any relevance, is there a way I can solve this error without publishing the website at its future destination?
Comment #2
Morbus IffYou're using the php.module, which suggests you've got some PHP custom code you've written somewhere. Based on the
error message, I'd say some of your PHP custom code is attempting to use $node at a time when $node isn't defined.
Comment #3
knalstaaf CreditAttribution: knalstaaf commentedThat was the cheeky bugger that caused all the trouble indeed, thanks!
I was using this code in a block:
This doesn't work in a block apparently. What if I need to render this image in the page.tpl.php (this code doesn't work in page.tpl.php either, only in node.tpl.php)?
Comment #4
Kars-T CreditAttribution: Kars-T commentedDear fellow Drupal enthusiasts,
this issue is now lasting for a very long time in the issue queue and was unfortunately never solved. As Drupal is a open source project everyone is helping on voluntary basis. So that this is was not solved is nothing personal and means no harm. But perhaps no one had time to deal with this issue, maybe it is too complex or did not pose the problem comprehensible.
But this issue is not the only one. There are thousands of issues on Drupal.org that have never been worked on or could not be processed. This means that we are building a wave that is unmanageable and just a problem for the Drupal project as a whole. Please help us keep the issue queue smaller and more manageable.
Please read again, "Making an issue report" and see if you can improve the issue. Test the problem with the current Core and modules. Maybe the problem doesn't exist anymore, is a duplicate or has even been solved within this issue but never closed.
Help can also be found for it on IRC and in the user groups.
In order this issue no longer remains, I put this issue to "fixed".
If there is new information, please re-open the issue.
Comment #7
Rohit_Rajput CreditAttribution: Rohit_Rajput commentedNotice: Trying to get property of non-object in eval() (line 2 of /home/projectname/public_html/modules/php/php.module(80) : eval()'d code).
I'm using views the output on the page is correct, but I still get the following error: