Unexpected PHP error [Undefined property: stdClass::$vid] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/node/node.module line 889] [PHP] Exception
Unexpected PHP error [Undefined property: stdClass::$vid] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/node/node.module line 889] [PHP] Exception
Unexpected PHP error [Undefined property: stdClass::$vid] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/node/node.module line 889] [PHP] Exception
Unexpected PHP error [Undefined property: stdClass::$vid] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/node/node.module line 889] [PHP] Exception
Unexpected PHP error [Undefined property: stdClass::$vid] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/node/node.module line 889] [PHP] Exception
Unexpected PHP error [Undefined property: stdClass::$vid] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/node/node.module line 889] [PHP] Exception
Unexpected PHP error [Undefined property: stdClass::$vid] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/node/node.module line 889] [PHP] Exception
Unexpected PHP error [Undefined property: stdClass::$vid] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/node/node.module line 889] [PHP] Exception

CommentFileSizeAuthor
#7 node-revisions-test-cleanup.patch6.84 KBboombatower
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

yes, I see this too - using the patched CLI script from: http://drupal.org/node/254166

$ php scripts/run-functional-tests.sh --url http://127.0.0.1/drupal-7 Node
Tests to be run:
- Node revisions
- Node teaser
- Page edit test
- Page preview test
- Page node creation
- Unauthorized node view

Drupal Unit Tests
E_NOTICE: Undefined property:  stdClass::$vid in /Users/Shared/www/drupal-7/modules/node/node.module on line 889
E_NOTICE: Undefined property:  stdClass::$vid in /Users/Shared/www/drupal-7/modules/node/node.module on line 889
Exception 1!
Unexpected PHP error [Undefined property:  stdClass::$vid] severity [E_NOTICE] in [/Users/Shared/www/drupal-7/modules/node/node.module line 889]
        in testNodeRevisions
        in Node revisions
        in Node
Exception 2!
Unexpected PHP error [Undefined property:  stdClass::$vid] severity [E_NOTICE] in [/Users/Shared/www/drupal-7/modules/node/node.module line 889]
        in testNodeRevisions
        in Node revisions
        in Node
E_NOTICE: Undefined property:  stdClass::$vid in /Users/Shared/www/drupal-7/modules/node/node.module on line 889
E_NOTICE: Undefined property:  stdClass::$vid in /Users/Shared/www/drupal-7/modules/node/node.module on line 889
Exception 3!
Unexpected PHP error [Undefined property:  stdClass::$vid] severity [E_NOTICE] in [/Users/Shared/www/drupal-7/modules/node/node.module line 889]
        in testLogMessage
        in Node revisions
        in Node
Exception 4!
Unexpected PHP error [Undefined property:  stdClass::$vid] severity [E_NOTICE] in [/Users/Shared/www/drupal-7/modules/node/node.module line 889]
        in testLogMessage
        in Node revisions
        in Node
E_NOTICE: Undefined property:  stdClass::$vid in /Users/Shared/www/drupal-7/modules/node/node.module on line 889
E_NOTICE: Undefined property:  stdClass::$vid in /Users/Shared/www/drupal-7/modules/node/node.module on line 889
Exception 5!
Unexpected PHP error [Undefined property:  stdClass::$vid] severity [E_NOTICE] in [/Users/Shared/www/drupal-7/modules/node/node.module line 889]
        in testRevisionRevert
        in Node revisions
        in Node
Exception 6!
Unexpected PHP error [Undefined property:  stdClass::$vid] severity [E_NOTICE] in [/Users/Shared/www/drupal-7/modules/node/node.module line 889]
        in testRevisionRevert
        in Node revisions
        in Node
E_NOTICE: Undefined property:  stdClass::$vid in /Users/Shared/www/drupal-7/modules/node/node.module on line 889
E_NOTICE: Undefined property:  stdClass::$vid in /Users/Shared/www/drupal-7/modules/node/node.module on line 889
Exception 7!
Unexpected PHP error [Undefined property:  stdClass::$vid] severity [E_NOTICE] in [/Users/Shared/www/drupal-7/modules/node/node.module line 889]
        in testRevisionDelete
        in Node revisions
        in Node
Exception 8!
Unexpected PHP error [Undefined property:  stdClass::$vid] severity [E_NOTICE] in [/Users/Shared/www/drupal-7/modules/node/node.module line 889]
        in testRevisionDelete
        in Node revisions
        in Node
FAILURES!!!
Test cases run: 6/6, Passes: 245, Failures: 0, Exceptions: 8
webchick’s picture

Just affriming that this is still the case.

webchick’s picture

Priority: Normal » Critical

Still an issue.

boombatower’s picture

Just a thought, but it would seem like

if (empty($node->nid)) {

should be

if (isset($node->nid)) {

Maybe not that simple?

webchick’s picture

Nah, empty() does an isset() and != 0 check, afair.

I think the answer might actually be getting node.module to initialize these properties when it creates a node object. A bunch of if (!isset($property)) set $property type of logic in every single place that does something similar to the test sounds like a silly thing to do.

That said, though, I didn't get a chance to take a closer look at this yet.

boombatower’s picture

Sorry thought that was the line, but node.module was updated and the above stack trace is out of data, make sure you run the tests on your own machine. The code causing notice is:

elseif (!empty($node->revision)) {
  $node->old_vid = $node->vid;
}

I agree with webchick, if possible they should be initialized, but I never get these warning when creating nodes through interface?? So is this something related to test environment or the error reporting outside of SimpleTest. I checked in common.inc and it is set to E_ALL as expected, but not sure if there are other conditions.

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Active » Needs review
FileSize
6.84 KB

This was an issue with the test itself not passing full node objects to the node API.

I have re-written the test to fit a more standard approach, use less database activity, and check operations more thoroughly.

I have run the complete node test suite and it now passes with NO EXCEPTIONS!

Dries’s picture

Status: Needs review » Fixed

Tested, reviewed and committed. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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