We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since 5.4.0, a saving an entry in a front-end form replaces existing assets. Verified this was working as expected in 5.3.6
Upload a new asset to an entry with existing assets from a front-end form:
<form method="post" accept-charset="UTF-8" enctype="multipart/form-data"> {{ csrfInput() }} {{ actionInput('entries/save-entry') }} {{ hiddenInput('entryId', entry.id) }} <label for="title">Title</label> {{ input('text', 'title', entry.title, {id: 'title',}) }} {% for relatedAssetId in entry.assets.ids() %} {{ input('text','fields[assets][]',relatedAssetId) }} {% endfor %} {{ input('file', 'fields[assets][]', options={multiple: true}) }} <button type="submit">Publish</button> </form>
New asset will be added to existing assets
All existing assets are removed and only the new asset is saved to the entry
5.4.0
8.2
No response
The text was updated successfully, but these errors were encountered:
Did you try version 5.4.3? #15707
Sorry, something went wrong.
Yep still happening on 5.4.6 (latest) and report in support from 5.4.4.
Thanks for the clear replication steps, Tommy! I raised a PR for this.
Craft 5.4.7 is out with that additional fix.
i-just
No branches or pull requests
What happened?
Description
Since 5.4.0, a saving an entry in a front-end form replaces existing assets. Verified this was working as expected in 5.3.6
Steps to reproduce
Upload a new asset to an entry with existing assets from a front-end form:
Expected behavior
New asset will be added to existing assets
Actual behavior
All existing assets are removed and only the new asset is saved to the entry
Craft CMS version
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: