Closed dishly closed 1 year ago
whats your environment? Versions of MODX, PHP ...
this should be fixed now. Directories should only be created, when you are in resouce/update Could you please try to replace the snippet with this new code? https://github.com/Bruno17/MIGX/blob/master/core/components/migx/elements/snippets/migxresourcemediapath.snippet.php
you can now also restrict directory-creation to resources which specific TVs by adding
&checkTVs=`yourmigxtv`
to the snippet-call
Great news, thank you Bruno. Will this be included in a new Migx release at some point?
will be included with the next release
I needed to upload multiple files in Migx to create galleries. I followed this official Modx tutorial step by step:
https://docs.modx.com/3.x/en/extras/migx/migx.tutorials/use-resource-specific-mediasource-and-multifile-uploader
Everything works fine, the only issue is that now every time I click on any TV in the manager an empty directory is created (under “assets/resourceimages/”) named with exactly the same ID as the TV I clicked.
It looks like the snippet migxResourceMediaPath (from the Media Source “ResourceMediaPath”) gets executed every time I click on a Template, TV or Chunk in the “Elements” tab of the manager.
I changed &createFolder to 0 but its not an ideal solution if you wish to dynamically create a folder for each Migx gallery.