Hi i got this error in views.
My user can publish their own nodes but then they are not supposed to be able to unpublish them since unpublishing is set by schedule.
I got this error in a view when the user don't have the unpublish permission.

Notice: Undefined variable: op in publishcontent_views_handler_field_node_link->render() on line 61 of publishcontent_views_handler_field_node_link.inc

The module is trying to set the unpublish link attributes based on not existing $op variable which is empty in this case. I just moved it inside the if() check the line below.

CommentFileSizeAuthor
fix_empty_op_var.patch767 bytesgionnibgud

Comments

gionnibgud’s picture

Title: Error in views when no action i permitted to the user » Error in views when no action is permitted to the user
gionnibgud’s picture

Status: Active » Needs review
aaronbauman’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the patch.
I've committed this locally and I'll include this patch in the next release, 1.0, which I'll roll pending resolution of #1170962: Broken/missing handler trying to add a "Publish link" in my view

gionnibgud’s picture

Cool.
You are very welcome.

aaronbauman’s picture

Status: Reviewed & tested by the community » Fixed

New release minted. thanks again

Status: Fixed » Closed (fixed)

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