Skip to content

pdoField doesn't support looking up a TV with a name that contains uppercase characters #395

@sentience

Description

@sentience

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions