Skip to content

Conversation

@halftrainedharry
Copy link
Contributor

What does it do?

PR #15488 added a way to add properties to bindings in the form @SNIPPET someSnippet {"someKey":"someValue"} by looking for a value after the second whitespace and trying to parse this value as a JSON string.

Because every @SELECT binding contains a lot of whitespace an no JSON, it should be excluded from the check.

Why is it needed?

To avoid constant (misleading) error log messages for every @SELECT binding.

How to test

Create a TV with a @SELECT binding in the input option values and verify, that there are no more "third parameter is invalid JSON ..." error log messages.

Related issue(s)/PR(s)

Resolves #16200

@cla-bot cla-bot bot added the cla-signed CLA confirmed for contributors to this PR. label Oct 18, 2022
@JoshuaLuckers
Copy link
Contributor

@sdrenth can you help us test this PR?

@Mark-H Mark-H added this to the v3.0.2 milestone Nov 2, 2022
@opengeek opengeek merged commit 001bcab into modxcms:3.x Nov 2, 2022
@rthrash
Copy link
Member

rthrash commented Nov 3, 2022

This pull request has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/modx-3-0-1-error-if-list-createdby-via-select/5981/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed CLA confirmed for contributors to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

modTemplateVar::parseBinding - third parameter is invalid JSON

5 participants