I got the following notice message after executing views bulk operation actions on Views:

Notice: Undefined property: stdClass::$revision in userpoints_nc_revision_node_update() (line 12 of /***/sites/all/modules/contrib/userpoints_nc/userpoints_nc_revision/userpoints_nc_revision.module).

Drupal 7.8

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Refineo’s picture

Status: Active » Closed (cannot reproduce)

I cannot reproduce this issue after installing userpoints_nc-7.x-1.0-rc1. Issue solved.

euginewm’s picture

I have a rule in which is adding a new node.
The action of this rule is accruing points for the user.
Each time a rule is triggered, I get this error.

Refineo’s picture

@eugen-black I am also interested in finding out what is the root cause here.
Did you test the latest dev ? If so, maybe you could reopen this issue for 7.x-1.x-dev attaching more details?
What versions of Drupal, Rules , Userpoints do you use?
Can you attach the rule that causes this error message for you?

euginewm’s picture

Status: Needs work » Closed (cannot reproduce)
FileSize
929 bytes

Please, see my patch.

I use v. 1.0

euginewm’s picture

Status: Closed (cannot reproduce) » Needs review

Status: Needs review » Needs work

The last submitted patch, Issue_ID_202967_1.patch, failed testing.

euginewm’s picture

Status: Closed (cannot reproduce) » Needs review
FileSize
932 bytes

Status: Needs review » Needs work

The last submitted patch, revision_not_empty-1294648-4.patch, failed testing.

euginewm’s picture

euginewm’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, revision_not_empty-1294648-4.patch, failed testing.

euginewm’s picture

Version: 7.x-1.0-beta2 » 7.x-1.0
Status: Needs work » Needs review
berdyshev’s picture

#9: revision_not_empty-1294648-4.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, revision_not_empty-1294648-4.patch, failed testing.

Refineo’s picture

Status: Needs work » Needs review

Please see the test error log:

[08:52:07] Command [git apply --check -p1 /var/lib/drupaltestbot/sites/default/files/review/revision_not_empty-1294648-4_0.patch 2>&1] failed
Duration 0 seconds
Directory [/var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/userpoints_nc]
Status [1]
Output: [error: userpoints_nc/userpoints_nc_revision/userpoints_nc_revision.module: No such file or directory].

Is the userpoints_nc_revision.module file missing in the qa repository ?

Berdir’s picture

Status: Needs review » Needs work

You need to create the patch from within the userpoints_nc module, so that userpoints_nc is *not* part of the path in the patch. You probably need to adjust your --relative option as this usually doesn't show up if you have a git checkout of the actual module.

euginewm’s picture

Status: Needs work » Needs review
FileSize
680 bytes

Yes, the property is "--relative" was helpful. I finally understood how to use the command git diff

I state in root dir of project and use follow command:
git diff --relative=sites/all/modules/contrib/userpoints_nc/userpoints_nc_revision > [description]-[issue-number]-[comment-number].patch

Status: Needs review » Needs work

The last submitted patch, undefined_property-1294648-1.patch, failed testing.

euginewm’s picture

Status: Needs work » Needs review

#17: undefined_property-1294648-1.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, undefined_property-1294648-1.patch, failed testing.

euginewm’s picture

Status: Needs work » Needs review

Why? please, tell me, what wrong in my patch format?

Berdir’s picture

Now you're one level too deep. the userpoints_nc_revision directory must be part of the path. Patches always need to apply from the root of the project, not the module.

Berdir’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Needs review » Needs work
euginewm’s picture

euginewm’s picture

Status: Needs work » Needs review
itz_andr3’s picture

I added some info:

Undefined property: stdClass::$revision in userpoints_nc_revision_node_update() (line 12

this also happend on working with module node convert:
http://drupal.org/project/node_convert

when convert from 1 type to another, after save that will accured,
maybe it trigers a revision action

the good thing, user point not change.

**the more advance flow, i think, the point category should change too, equal to category points setting in the convert node target.

Refineo’s picture

Status: Needs review » Reviewed & tested by the community

Patch #24 tested successfully and corrects the issue.

Before applying the patch in #24

when I go to view Content (Emulates the Drupal content administration page.) /admin/content2
I select a Basic Page node (test) using the bulk operations checkbox and choose operation: unpublish content

You selected the following item:
test

I click "Confirm" button.

The node is updated however I get notice:

Notice: Undefined property: stdClass::$revision in userpoints_nc_revision_node_update() (line 12 of /***/userpoints_nc/userpoints_nc_revision/userpoints_nc_revision.module).

After I apply patch from #24

Bulk operations work as expected without error notice messages.

I tested:

  • Basic Page, Article and one custom content type.
  • publish, unpublish, make content sticky, make content unsticky, delete
  • tested bulk operations on 1 and on 5 nodes.

Tested on Drupal 7.12

Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for testing, commited.

Status: Fixed » Closed (fixed)

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