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

Trix field does not purge pending field attachments and adding it to the content. #6467

Closed
albertcat opened this issue Jul 18, 2024 · 1 comment
Assignees
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Milestone

Comments

@albertcat
Copy link

  • Laravel Version: 11.16.0
  • Nova Version: 4.34.3
  • PHP Version: 8.3.9

Description:

When adding and attachment on a Trix field, it is correctly inserted on the nova_pending_field_attachments table via the API. But if you do not save the page and discard the attachment (remove it from the Trix field using the X button) and then save the content of the field, the attachment is not deleted form the pending table and it is transferred to the nova_fields_attachment table, even though it was removed from the field. This leaves the database in an unconsistent state.

I think the problem is that when removing the attachment, the Trix field uses the same DELETE call to remove the attachment regardless if the attachment is a draft or not. Meaning that removing a draft attachment will never call the correct endpoint to purge the pending_attachments table.

@jeremynikolic jeremynikolic self-assigned this Jul 30, 2024
@crynobone crynobone added this to the 4.x milestone Aug 5, 2024
@crynobone crynobone added bug Verified bug by the Nova team fix incoming A fix is in review labels Aug 5, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Projects
None yet
Development

No branches or pull requests

3 participants