Output of image path with pdoResources and MODX 3.0.1

Hi
I use MODX 3.0.1 and pdoResources with a TV Variable “project_teaser_img”.
I set the parameter processTVs to 1 and defined a Media Source.
The image output is without the path I specified on the media sources.

With MODX version 2.8.x this always worked.

Thank you very much for help

Hi @seliin

This actually happened to me last night.

I upgraded a site from 2.8.4-pl to 3.0.1-pl and I got a front-end page full of broken images.

The problem was as you described, the image output no longer included the Media Source path.

This only happened in one place, so I quick-fixed it by just adding the missing path in the template before the image call.

However I’d be interested to find out what the cause for this is. I’ll try to troubleshoot it properly myself if I get time - but would welcome anyone else’s thoughts on it.

It seems to work correctly when you list the TV in the processTV property → &includeTVs=`myImgTV`
But &processTVs=`1` doesn’t work.


The problem is this line in the code that should use == instead of ===

$process = ($this->config['processTVs'] == 1)
//or
$process = ($this->config['processTVs'] === "1")

Thanks @halftrainedharry :+1:

Specifying the TVs explicitly as:

&includeTVs=`myImgTV-1,myImgTV-2`
&processTVs=`myImgTV-1,myImgTV-2`

fixed the problem for me.

I don’t see this raised as an issue for PdoTools - happy to add it.

I created a pull request.

1 Like