Closed (duplicate)
Project:
Nodewords: D6 Meta Tags
Version:
6.x-1.12-beta9
Component:
Third-party modules integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Jun 2010 at 22:34 UTC
Updated:
28 Jun 2010 at 21:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedIt would be possible if the code could get a node object, or a taxonomy object.
Comment #2
Brian294 commentedI will submit a patch that fixes this problem.
Comment #3
Brian294 commentedThis patch doesn't work as expected, and should not be used; see the following comment.
Using the most recent -dev version (dated 6/15/2010), I created a patch. I am also attaching the nodewords.module (archived to nodewords.zip) file for anyone who wants to swap in the code changes with a simple file copy.
Peace,
Brian
Comment #4
Anonymous (not verified) commentedThe patch is not in the correct format; see http://drupal.org/patch/create to understand how a patch is created.
The code as changed from the patch doesn't work.
In the case of custom pages,
$options['id']is not a user ID, nor a node ID; the calls to_nodewords_node_load($options), anduser_load($options['id'])would return a random node, and a random user object that are not related with the page being viewed.Comment #5
Brian294 commentedYes, you're correct with all of those observations. A perfect patch would need to take into consideration the type of path being accessed and then make sure only the relevant tokens are being loaded. This patch makes the assumption that the person creating the custom page knows which tokens are appropriate. For example, I would never use the user tokens if I am building a custom page for a node.
I'll give some more thought into how to address this issue.
Comment #6
Brian294 commentedCVS Patch attached using -dev version. Thank you for your patience as I figure things out.
Comment #7
Anonymous (not verified) commentedThe patch is still using
$options, but for custom pages that array doesn't contain any node ID, nor user ID.Comment #8
Anonymous (not verified) commentedThis is actually a duplicate of #781440: Missing tokens.