Error message
n/a (missing TV value)
Summary
pdoField cannot fetch the values of TVs containing uppercase characters, because it always converts the field parameter to lowercase.
Step to play
Create a TV with a name like tileImage (containing a capital ‘I’). Add it to a template, and create a resource with that template. Give the TV a value (e.g. "example.jpg").
Elsewhere in the site, use pdoField to attempt to fetch and render the value of that TV:
<img src="[[pdoField? &id=`123` &field=`tileImage`]]" alt="…">
Observed behavior
The snippet returns an empty string. (In the example above, the image tag is rendered as <img src="" alt="…">.
Expected behavior
The snippet should return the value of the TV.
Environment
MODX 2.8.8, PHP 8.2.0.
Error message
n/a (missing TV value)
Summary
pdoFieldcannot fetch the values of TVs containing uppercase characters, because it always converts thefieldparameter to lowercase.Step to play
Create a TV with a name like
tileImage(containing a capital ‘I’). Add it to a template, and create a resource with that template. Give the TV a value (e.g. "example.jpg").Elsewhere in the site, use
pdoFieldto attempt to fetch and render the value of that TV:Observed behavior
The snippet returns an empty string. (In the example above, the image tag is rendered as
<img src="" alt="…">.Expected behavior
The snippet should return the value of the TV.
Environment
MODX 2.8.8, PHP 8.2.0.