Hi - I'm running Drupal 7 on Ubuntu 14.04 server, core and all modules up to date as of today (7th May). We have noticed today that zeros (0) are not displaying correctly in blocks that have a custom token. They are being substituted for the word 'custom'.
For example, "7,500" displays as "7,5customcustom".
I'm not sure how long it has been doing this, as we have only just noticed it today. In blocks without Custom Tokens, the zeros display correctly. This is a relatively recent issue, as it was not a problem a couple of months ago when our site was reviewed by our solicitors.
The source for the content is correct - so it appears to be a display issue. Any ideas?
I've attached 2 screenshots - the first is from a block with a custom token, the second from a block without. The custom token is separate from these figures (i.e. it has nothing to do with the custom token itself)...
[UPDATE] - I've added another 2 screenshots, this time of the Custom Token module configuration, as the tokens are not displaying correctly on this screen...despite being setup correctly.
Comment | File | Size | Author |
---|---|---|---|
#4 | Custom Token setup.png | 11.53 KB | Anonymous (not verified) |
#4 | Custom Token setup 2.png | 29.69 KB | Anonymous (not verified) |
Screenshot2.PNG | 11.04 KB | Anonymous (not verified) | |
Screenshot1.PNG | 27.02 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedWondering if this could be a Regex issue, perhaps due to an update in PHP? Or another component on which Drupal relies? Am running on PHP 5.5.9-1ubuntu4.9, MySQL 5.5.43-0ubuntu0.14.04.1, and Apache/2.4.7 (Ubuntu), as it not just limited to blocks with Custom Tokens....it also happens in emails submitted from a webform, with different substitutions (0 becomes "submission" and 1 becomes "date")?
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedRe-assigned to Core rather than Custom Token, as I think this could be a regex issue?
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedI have managed to get around the issue by removing any reference to Custom Tokens - this seems to stop any erroneous text substitutions. Interestingly, we are using the Revisions module, and when one of the Moderators went to approve the revision, we had the same problem with a '0' in the node URL being substituted for 'custom' - by manually changing the URL we were able to approve the revision. Even more confused now...! I have raised the same issue on StackExchange, and another user, Diego, is having the same problem...
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedReassigning back to the Custom Tokens project, as it only seems to happen when there are Custom Tokens being displayed - if they are removed from the block in question the issue goes away...but this undermines the purpose of the module itself (hence I've taken the liberty of updating the Priority to Major).
Comment #6
corranh CreditAttribution: corranh commentedI am the other SE user with this problem, but I don't think it is a Custom Tokens issue since I don't have that installed. I am having the exact same substitution as strin with WebForms, and any time I try to use a Token to get the Page Title it replaces the number '1' with the word 'node', this mostly happens when setting the tag and URL alias.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #8
priceh CreditAttribution: priceh commentedI'm also having this issue. It's happening with 0s and 1s, and I don't have custom tokens installed. All I'm doing it putting the UTC version of a Date/Time field into the url. and it comes back with node and entity in place of 0s and 1s.
Comment #9
corranh CreditAttribution: corranh commentedI moving it to the Token project instead of Custom Tokens since 2 of use don't even have Custom Tokens installed and are having this issue.
Comment #10
corranh CreditAttribution: corranh commentedSo I just updated the Webform module and it seems to have fixed this issue. I no longer have the issue on my test system where I preformed the update, but I still do on the prod system that hasn't been updated yet. There were a few things in that update that referenced tokens, but I didn't see anything obvious that would explain why updating that module fixed things.
Comment #11
priceh CreditAttribution: priceh commentedI updated webform and it didn't fix my issue, I figured it wouldn't becuase the tokens I'm calling have nothing to do with webforms.
Comment #12
Dave ReidComment #13
priceh CreditAttribution: priceh commentedIt looks like after I updated webforms and re-imported all of my nodes that it fixed itself. An odd bug indeed.
Comment #14
Dave ReidOk, I'm going to mark this as fixed then since it doesn't seem to be an issue with Token itself.