Hi,

node_load expects the nid of the node as default parameter, so if we are going
to call node_access('view', node_load($ids[0])) like in nodewords_get_tags() we
have to return the nid, and not the vid in node_nodewords_type_id() called
from _nodewords_detect_type_and_ids().

I thought that checking access on node nid was enough, and there was no need to
rely on vid, am I wrong?

This bug prevents node specific keywords to be rendered at all.

Patch attached.

Thanks,
Antonio

(KiamLaLuno, are you on IRC?)

Comments

avpaderno’s picture

StatusFileSize
new557 bytes

That's my mistake; as I keep to back-port code from another branch, I sometimes forget to modify the ported code.

Branch 6.x-1 uses only the node ID, and the code should indeed return the node ID (or there could not be a match between the saved data, and the node being shown).

The fact the code doesn't uses the version ID doesn't allow to the module to support the revisions. In other words, if you create a new revision, change the meta tags content, then delete that revision, the module would still show the meta tags content associated to the removed revision. This has been changed in the other branch.

The patch I attach in this comment is relative to the module directory.

avpaderno’s picture

Title: Node specific keywords are not rendered. » Code incorrectly uses the revision ID instead of the node ID
Version: 6.x-1.3 » 6.x-1.x-dev
Status: Needs review » Fixed

The code has been changed, and committed in CVS for the development snapshot.

Thank you for your help.

Status: Fixed » Closed (fixed)

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