Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
CarbonPig CreditAttribution: CarbonPig commented**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
Comment #2
CarbonPig CreditAttribution: CarbonPig commentedUpdate - 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
Comment #3
AlexisWilke CreditAttribution: AlexisWilke commentedPlease 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