This may not be an issue with this module, but I'm trying to find out. Here's my somewhat complex setup:
I have a node creation form with a number of fields that take user input. This input is concatenated into a string of values by another field using tokens to get their replacement values. This field takes tokens using thew Token Filter module. This field is also a PHP text input type & includes some PHP to conditionally select a token from one of two select list fields.
[node:created:custom:YmdHi] [node:author:uid] <?php
if ($node = menu_get_object()) {
$field1 = field_get_items('node', $node, 'field_gaylord_location_boz001');
$field2 = field_get_items('node', $node, 'field_gaylord_location_bil001');
if (!empty($field1)) {
print '[node:field_gaylord_location_boz001]';
}
if (!empty($field2)) {
print '[node:field_gaylord_location_bil001]';
}
}
?> [node:field-gaylord-weight] [node:field_gaylord_serial]Only one of these select list fields is presented to the user based on UID. So on submission one field will be left blank & the other will have a value. The one with the value will be included in the concatenated string of values.
Then this string is fed into a field for the Barcode module using its own token. On form submission, the concatenated string is encoded into a barcode.
All functioning great. However, when I try to use the Print module to print the node, the barcode on the print page is different; missing the replacement values of the token from the select list.
Any idea why the print page can't see this token value while the node page can?
Comments
Comment #1
jcnventuraI believe it may be because you're using menu_get_object() to get the node.
The result of this call is different when being called from the node or from the print page.. As it uses the current path, and the path for the print page is different.
Comment #2
jcnventuraNo further info in two weeks. Closing the issue.
Comment #2.0
jcnventuraFixing some grammatical errors & adding a left-out sentence of relevant information.