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

Avo demo error: "You can't upload files into the Trix editor until you save the resource" #2713

Closed
sedubois opened this issue Apr 21, 2024 · 3 comments

Comments

@sedubois
Copy link
Contributor

Context

Avo demo error: "You can't upload files into the Trix editor until you save the resource" when trying to embed an image in the message field of the "Release fish" action modal for the fish resource.

System configuration

https://main.avodemo.com/avo/resources/fish

Screenshots or screen recordings

Screenshot 2024-04-21 at 10 21 09
@adrianthedev
Copy link
Collaborator

How would this be solved outside Avo @sedubois?

@Paul-Bob
Copy link
Contributor

Paul-Bob commented Apr 21, 2024

I think we can use a random key like here https://trix-editor.org/js/attachments.js

Not always is required to do the record <-> attachment association.

I think creating an independent attachment with a random key and storing that key on the text should be enough.

PS: when attachment_key is specified than the record <-> attachment association is mandatory

@Paul-Bob
Copy link
Contributor

@sedubois this is not an unexpected error. Right now Trix editor require a persistent record and an attachment_key to enable attachments. Beside, when you run the action from index none record is targeted, the fish record would be targeted if started the action from show view. We have an issue to set the record when only one selected record from index but is not implemented yet #2043

Closing since the error is the current expected behavior. Lets focus on the other trix related open issues to identify the weak spots and work on them.

I created this issue #2715 about all trix field current limitations

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

No branches or pull requests

3 participants