Skip to content
New issue

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

[4.x]: Changing an asset in a relationship field slideout, in a matrix is not always saved #11988

Closed
sm-md-lg opened this issue Sep 21, 2022 · 5 comments · Fixed by #12073
Closed
Assignees

Comments

@sm-md-lg
Copy link

sm-md-lg commented Sep 21, 2022

What happened?

Description

When uploading an asset in a slideout, that is in a matrix field, the image is not saved. The image is uploaded, but it is not saved to the field.

This happens when clicking the upload button in the entries field and in the asset selector dialog.

This only happens when editing an asset field in a matrix in a slideout. When editing the entry with a matrix directly, everything works properly.

Note, there is also a bug where text in a text field in the same setup as an asset field will intermittently get truncated and not saved properly, but it feels like it is related to this asset bug. This one is harder to describe so if necessary I'll add a video.

Steps to reproduce

  1. Create a channel with a matrix field that has an asset field in it.
  2. Create a channel with a entries field that points to the previous channel.
  3. Create an entry in each one.
  4. Go to the channel with the entries field and double click the entries field and select an entry with the matrix field.
  5. Click the upload button for the asset and upload a new image.
  6. Save and look at the slideout again and the image you selected won't be there.

Craft CMS version

4.2.3

PHP version

8.0.21

Operating system and version

Linux

Database type and version

mysql:8.0

Image driver and version

No response

Installed plugins and versions

No response

@brianjhanson
Copy link
Contributor

I'm having trouble replicating this, but it like it could be related to #11854. Any chance you could send a database backup and your composer.json and composer.lock files to [email protected]?

@sm-md-lg
Copy link
Author

sm-md-lg commented Oct 7, 2022

Here is a db and a zip file of two videos showing the bug in action.

This db has two entries,

  1. one with a matrix with an asset field and a text field
  2. another entry with a matrix with an entries field.

In the assets-field.mp3 video, when I edit the asset field in a slideout, the second time, the image is not saved.

In the text-field.mp3 video, when I edit the text field the second time and add the z's, the z's at the end do not get saved, but the z's at the beginning do get saved.

If there is anything else I can give you to help, please let me know.

@sm-md-lg
Copy link
Author

sm-md-lg commented Oct 7, 2022

This looks like the same bug as #12058.

@brandonkelly
Copy link
Member

Sure does look like the same bug. We just got that fixed for the next release (#12073). Thanks for the help!

@brandonkelly
Copy link
Member

Craft 4.2.6 is out with that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants