First of all, let me say how pleased I am to see how far this module has progressed since last year. This is one of the most useful modules out there.
I have encountered a bug in the latest dev version when saving an existing revision that is in "pending moderation" state.
Error message
Notice: Use of undefined constant COMMENT_NODE_HIDDEN - assumed 'COMMENT_NODE_HIDDEN' in revisioning_entity_prepare_view() (line 447 of /data/var/www/.../sites/all/modules/revisioning/revisioning.module).

Because there is no actual check whether the comment module is enabled it keeps throwing this notice. I propose to do a check whether the module is enabled so we can use the constant. I don't see any immediate drawbacks to this. Find proposed patch attached.

Comments

rdeboer’s picture

Assigned: Unassigned » rdeboer
Status: Active » Fixed

Thanks so much for your encouraging words moonstorm/Maarten! Much appreciated, as I did put quite a bit of work in cleaning up the issue queue recently.

As far as the patch is concerned. You're absolutely right... didn't think that someone may switch off the Comment module, did I?

As COMMENT_NODE_HIDDEN equals 0, we might as well use 0 rather than use module_exists(), I reckon.

Checked in with attribution to you.

Thanks again,
Rik

Status: Fixed » Closed (fixed)

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

stephen ollman’s picture

I am now getting this error after upgrading to 7.x-1.5 (D7.22)

Comments module is disabled.

Steps to reproduce.

1. Edit current published page.
2. Select the 'Create new revision and moderate'
3. Save

Get x 2

Notice: Use of undefined constant COMMENT_NODE_HIDDEN - assumed 'COMMENT_NODE_HIDDEN' in revisioning_entity_prepare_view() (line 447 of /sites/all/modules/revisioning/revisioning.module).

Anyone else still getting this error?

Was the patch been rolled into the latest release?

rdeboer’s picture

Fixed in dev snapshot as mentioned in above comment.
Rik