born05 / craft-assetusage

Craft plugin adds a column to see which assets are used or unused.
MIT License
32 stars 7 forks source link

Inaccurate Current Usage for Matrix > Asset fields and Matrix > Supertable > Asset fields #35

Open howells opened 2 years ago

howells commented 2 years ago

I might be missing something here but the "Current Usage" for practically all assets on a site that uses matrix fields extensively shows "Unused". The site is a multi-site set up but whether it's the default site, or another, doesn't seem to have an affect (I'm using 2.3.1).

Two examples here but this applies throughout -

Via an asset field within Supertable, within a Matrix:

CleanShot 2022-08-16 at 09 15 23@2x CleanShot 2022-08-16 at 09 16 01@2x

Via an asset field, within a Matrix:

CleanShot 2022-08-16 at 09 17 19@2x CleanShot 2022-08-16 at 09 17 52@2x
darylknight commented 2 years ago

Yeah, this plugin has been completely unusable for a long time, for a number of reasons. False positives, false negatives, incompatibility with drafts, revisions etc. I'm not sure it's still actually maintained. Which is a shame, as this seems to be the only plugin providing something that all our clients want.

roelvanhintum commented 2 years ago

@darylknight the plugin is maintained, but the problems with detecting usage are how much queries we should perform per asset. If we query a lot per asset, the performance of the asset overview would be insanely bad. I did try numerous times to get better numbers, but it's either missing things or resulting in minutes of load time. Feel free to suggest improvements, if you see any.