I am using Google API and a following string for QR-code generation in block setup section: [site-url]/items/[nid]
It works great when admin or registered user comes to page with QR: image is shown, url appears to be correctly encoded.
When unregistered user comes to page with QR, result is different: image is shown, but source token string is encoded instead of url.

Tried disabling cache, flushing QR cache and flushing imagecache - no result.

Thank you!

Comments

CarbonPig’s picture

Title: Tokens don't work for anonimous user » Tokens Not Embedding Properly in QR Code
Priority: Normal » Critical

**Title Change to make more accurate - doesn't only apply to anonymous users**

Bug Recreation Steps:

1) Enable all QR code modules
2) Enable Token module
3) Place the QR code block in the sidebar
4) Add a token value to the block to render within the QR code (e.g., [node-url])
5) Navigate to various pages/nodes within the drupal site and scan with a common QR code reader.

Outcome:

Some nodes deliver the URL that is embedded and other nodes siply return the token value when scanning - [node-url]

I've tried deleting and recreating nodes and it seems to be relatively random.

Therefore, I think (i'm novice) that it could be that a preproccess needs to be put in place. Maybe if the page were to load the token value earlier, then this wouldn't be an issue.

Overall, this module is awesome, but it is essentially useless if you can't feel confident that you can, at a minimum, render a QR code block on each node with the URL to that node.

If anyone can help sort this out, I would be greatly appreciative.

Cheers,

CarbonPig

CarbonPig’s picture

Update - this is specifically not working on specific node types. In my case it is a node type named profile, which is being used within the context of the content profile module.

In other words, the QR code block is working fine with tokens on nodes that are not being used as the content profile node type.

Any insight into how to fix this?

Thanks,

CarbonPig

AlexisWilke’s picture

Please see this issue as well:

#1219288: tokens and imagecache

The test to know whether the page is a node is standard albeit somewhat weak.

Thank you.
Alexis Wilke