craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.28k stars 635 forks source link

[5.x]: Asset fields can't be reused on an entry #14715

Closed benfeather closed 7 months ago

benfeather commented 7 months ago

What happened?

Description

With Craft 5, fields can be reused on the same entry, but this functionality does not extend to the asset fields.

Asset field behavior: CleanShot 2024-03-28 at 12 18 32@2x

CleanShot 2024-03-28 at 12 18 41@2x

Regular field behavior: CleanShot 2024-03-28 at 12 22 00@2x

Expected behavior

Ideally, all fields would be reusable on an entry

Craft CMS version

5.0.0

PHP version

8.2.15

Operating system and version

Mac 14.4.1

Database type and version

MySQL 8

Image driver and version

No response

Installed plugins and versions

"craftcms/ckeditor": "4.0.2",
"craftcms/cms": "^5.0.0",
"craftcms/commerce": "5.0.0-beta.1",
"craftcms/commerce-stripe": "5.0.0",
"doublesecretagency/craft-cpcss": "3.0.0",
"doublesecretagency/craft-cpjs": "3.0.0",
"embed/embed": "^v4.4.10",
"ether/simplemap": "v5.0.0-rc1",
"mmikkel/cp-field-inspect": "2.0.0",
"nystudio107/craft-retour": "5.0.0-beta.5",
"nystudio107/craft-seomatic": "5.0.0-beta.8",
"php-ffmpeg/php-ffmpeg": "^1.2",
"spicyweb/craft-batch-actions": "2.0.0",
"spicyweb/craft-embedded-assets": "5.0.0",
"spicyweb/craft-neo": "5.0.0-beta.2",
"verbb/field-manager": "4.0.0-beta.1",
"verbb/formie": "dev-craft-5 as 3.0.0-beta.4",
"verbb/hyper": "2.0.0-beta.6",
"verbb/icon-picker": "3.0.0-beta.3",
"verbb/tablemaker": "5.0.0-beta.1",
"verbb/timber": "2.0.0-beta.2",
"vlucas/phpdotenv": "^v5.6.0"
benfeather commented 7 months ago

It would also be great to have the ability to reuse Matrix fields. This may be a bug report or a feature request, depending on the intended behaviour. Feel free to update the tags.

i-just commented 7 months ago

Hi, thanks for reaching out! This is expected behaviour.

As per Brandon's comment here: https://github.com/craftcms/cms/issues/14237#issuecomment-1915632814, only fields that store content in the content table are reusable within a field layout.

Mosnar commented 7 months ago

I've seen this come up a few times. Maybe there's a better UX solution, such as keeping the field in the list, but graying it out and having a tooltip explaining why it can't be reused.