ElementHelper icon indicating copy to clipboard operation
ElementHelper copied to clipboard

Image TV's not working under different Media Source

Open JayCarney opened this issue 10 years ago • 4 comments

I have my default media source on TV's set to an Uploads directory, and while viewing the image browser everything works as expected, however when rendering in the front-end the image path isn't being appended with the path of the uploads directory. This is only happening on elementHelper Image TV's I've added via the JSON document.

I'm using MODX 2.2.9

JayCarney avatar Sep 12 '13 23:09 JayCarney

It took me a while to figure this out but apparently the type attribute in the JSON document needs to be lowercase. So if you have "type": "Image" change it to "type": "image" and it should fix it. You might need to refresh the modx cache as well.

roryg avatar Sep 13 '13 14:09 roryg

Thanks for the quick reply. I was also trying to work out how to create MIGX TV's within the JSON file, but couldn't find any documentation on using "input_properties".

I tried passing the MIGX values for Form Tabs and Grid Columns but just couldn't get it to work. I tried setting input_properties to an array with indexes that match the names of the fields visible in the manager, but with underscores instead of spaces.

JayCarney avatar Sep 14 '13 13:09 JayCarney

I've tried to get ElementHelper to work with MIGX many times but unfortunately have never been able to. To make things a little easier for myself I usually create the migx tvs in the JSON file and also include the Form Tabs and Grid Columns so that I can just copy and paste it from my editor in to the manager. It's also good since I can keep it under version control that way as well.

If you find a way to get it working please let me know!

roryg avatar Sep 14 '13 15:09 roryg

Tested the lowercase type declaration on images and it still seems to be ignoring the media source path. ie: media source is in assets/uploads image value is /test/img.jpg

image returns a value of /test/img.jpg instead of /assets/uploads/test/img.jpg

JayCarney avatar Sep 16 '13 01:09 JayCarney