On one copy of my site several nodes do not have any entry in the protected_node table. I enabled Protected Node Views. A views query filtered to show a node which is not protected is:
WHERE protected_nodes.protected_node_is_protected = '0'
If the nid is not present in protected_node table, that query does not return the node.

It is not clear to me how nodes which have never been protected are added to protected_node table? If they are not added, then this Views filter breaks.

Comments

John_B created an issue. See original summary.

grimreaper’s picture

Category: Bug report » Support request

Hello John_B,

I have tested your case and yes if the node is not in the protected_node table it will not appear in your view even if you want unprotected nodes.

It is the behaviour of Views.

Nodes are inserted in this table when creating or updating its. So you can fix your issue by bulk editing your nodes with the VBO modules for example.

john_b’s picture

Thanks.

grimreaper’s picture

Status: Active » Fixed

I close the issue, feel free to re-open if there is still a problem.

Status: Fixed » Closed (fixed)

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

joelstein’s picture

I've found that when creating Views with a "Node is protected" exposed filter, if you make it optional and set the default value to "- Any -", then you should be able to see nodes that don't have a corresponding value in the protected_node table.

grimreaper’s picture

Thanks @joelstein for the information.