- πΊπΈUnited States bburg Washington D.C.
@NickDickinsonWilde
This token isn't working for me either. I can't enter "[color_field:rgba]" in the CSS Declaration config, because it fails validation due to not being a valid token. Even though "[color_field:rgb:rgba]" is what appears in the token information pop up.
I tried just modifying the color_field_tokens() function in color_field.module, and changed:
case 'rgba':
to
case 'rgb:rgba':
I assume this is because the token is defined like this in color_field_token_info():
$tokens['rgb']['rgba'] = [
As that seemed to be the pattern that multi-part tokens like this followed, and that worked for me.
I am using
Drupal core: 10.1.7
Color Field 3.0.0I'm uploading a patch that applies a similar fix. Instead of replacing the case value entirely, I'm just adding a redundant one for "rgb:rgba" in case anyone previously entered the "[color_field:rgba]" value in fields whose tokens aren't validated.
-
nickdickinsonwilde β
committed 60a7ea5a on 3.0.x
Issue #3208145 by bburg, mrpauldriver: rbga token does not work
-
nickdickinsonwilde β
committed 60a7ea5a on 3.0.x
- π¨π¦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)
Nice, thanks... lets merge this a year later.