2

A client removed a lot of files in a moment of clarity, not realizing these were used in pages (thinking since they were used in those pages, they were no longer necessary in the assets system).

Before I completely reset the site to a few weeks ago (that was the time before they realized); is there a way to check the site for missing file links, including those in redactor?

Also is there any strategy for preventing clients from removing used assets? In WP for instance you can see which images are "attached". This is not waterproof, but still.

2

is there a way to check the site for missing file links, including those in redactor?

I can't think of a way to do this outside of writing a custom plugin/PHP script that loaded everywhere an Asset field might exist on an install, grabbed its contents and verified them against the file system.

Additionally, it would have to load any Rich Text field you have setup with Asset sources, use some regex to match any Assets reference tags it might contain and do a similar file system verification to check for the existence of the images.

Also is there any strategy for preventing clients from removing used assets?

Take away their "Remove Files" permission from the Asset source under their user/user group permissions.

  • Thanks Brad. Could seeing which images are "attached" be a future request or is this unachievable? – noregt Jul 5 '16 at 7:10
  • You could add it to feedback.craftcms.com, but it definitely feels like more plugin territory to me. – Brad Bell Jul 5 '16 at 21:15

Your Answer

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

Not the answer you're looking for?Browse other questions tagged or ask your own question.