Tokens that are registered in the allowed_tokens settings but have no value do not get replaced. IMO The expected behaviour would be for any token registered by this module to get replaced 1) by the value 2) by a blank space if no value was given. We should not be allowing the raw token to be rendered.

CommentFileSizeAuthor
#2 replace_all_known_values-2861549-2.patch993 byteskalpaitch

Comments

kalpaitch created an issue. See original summary.

kalpaitch’s picture

StatusFileSize
new993 bytes

Would be great to get this in, thanks.

  • kalpaitch authored e57493d on 8.x-1.x
    Issue #2861549 by kalpaitch: Replace all known values
    
davidgrayston’s picture

Status: Active » Fixed

Token Filter module is replacing the tokens but not clearing empty values – there is an issue open #2331901 to allow this to be optional.

We want the default behaviour to clear the empty tokens so I've applied the patch, which is working as expected. If #2331901 is applied and ported to 8.x of Token Filter we may want use that option instead.

  • a6f6f39 committed on 8.x-1.x
    Issue #2861549 preventing PHP notice
    
davidgrayston’s picture

PHP notice was being generated when $replacementValues[$name] was not set – I've fixed this and retagged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.