Hiding fields does not work correctly

Hello. There was a problem. The construction is used

[[*productswork:is=``:then=``:else=` <div class="related-project">
                    <h3>Было ипользовано оборудование:</h3>
                    <div class="row clearfix">
                        
                        [[pdoResources?
    &parents=`3`
    &resources=`[[*productswork]]`
    &tpl=`work`
	&includeTVs=`img`
	&limit=`10`
]]
                        
                    </div>
                </div>`]]

if the products working field is empty, then it is hidden. If it is filled , it is displayed .Now on the page where the fields are filled in , a list of IDs 1402,799,1403,1404,1405,810,809,1407,1408,1409 is displayed (
BUT if you set &limit=3 then 3 resources are displayed correctly

I don’t quite understand: Does it work correctly with &limit=`3` but not with &limit=`10`?


In general, a construction like this is not optimal. Because inner tags are executed first, pdoResources runs every time, even when productswork is empty.

You could rewrite it to something like this:

[[[[*productswork:notempty=`$someChunk`]]]]

with the chunk “someChunk”:

<div class="related-project">
	<h3>Было ипользовано оборудование:</h3>
	<div class="row clearfix">
		[[pdoResources?
			&parents=`3`
			&resources=`[[*productswork]]`
			&tpl=`work`
			&includeTVs=`img`
			&limit=`10`
		]]
	</div>
</div>

Also, is this MODX 3? There are some issues with the parsing of output modifiers in MODX 3.0.1.
You could apply this pull request to see if that helps to resolve the issue:

Hello.Thanks.
Of course, I first made a chunk.
I turned to the forum because I was surprised what kind of incorrect work, if the limit is 3, then ok, if 10, then not ok.

Yes, that’s right - it’s modx3. In fact, on modx 3, to say that I met big problems is not. Perhaps more complex resources are harder to configure.

It could be that a character in the output of one of the (7 additional) resources breaks the output modifier. But it’s hard to say without the specific data that causes the issue.

can it be any character?

There have been problems with the colon : (like in this issue) or sometimes with a semicolon ;.

Hello. Thanks. I will keep in mind