I'm facing an issue, and possibly a bug or an un-fixable kind of logical issue, where I have a Matrix Block with an Assets Field inside of it.

The storage path for the Assets field is pointing to a folder where I'm storing all the images for this type of module, in sub-folders denoted by the block ID.

When I create a new entry in a section, add my Matrix Block and upload images to the Assets Field and save, the images are never moved from the temporary location. I'm guessing because the Matrix Block hasn't actually got it's ID yet?

I can work around it by creating a new entry, adding the Matrix Block, and then SAVING the entry without adding any images yet, then once the entry is saved and I add the images, they work fine.

A fix I have also found is, if you disable the Matrix Block, save entry, re-enable the Matrix Block, and save the entry the images are updated to their correct location.

Any ideas?

Also, my storage driver is the Digital Ocean Spaces driver so they're not on the local filesystem either when they're properly saved.

Craft CMS 3.7.11


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.