-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
After uploading File in ActionText (Trix) it can not be found when rendering (missing attachable) #2538
Comments
This issue has been marked as stale because there was no activity for the past 15 days. |
@tamaloa can you please try it on https://www.avodemo.com/avo/resources/posts/49 and let us know if you get the same "broken" results? If this works on avodemo, the next step would be to try and reproduce it in a simple repo so we can troubleshoot it ourselves. There could be the case that it's something local. Thank you! |
@tamaloa sorry about that. I now read the whole message and saw the reproduction repo. |
Cool - it's also still reproducable on avodemo.com (just tried). |
Hello, I reproduced it and in avodemo the scenario is different. In avodemo we have this options: hide_attachment_url: true,
hide_attachment_filename: true,
hide_attachment_filesize: true That cause files without preview to be hidden. I was able to reproduce the issue reported only when using |
Thanks for looking into this. I tried to verify the fix by using avo from current main branch (rev df2262c) in my reproduction repository: https://github.com/tamaloa/AvoActionTextAttachmentTest (Note: necessary to run Unfortunately, for me, the bug has not been fixed. As can be seen in below screenrecording (using the reproduction repository above) a uploaded file still is neither shown/downloadable in avo itself nor in a standard rails view. avo-trix-fileupload.mp4Furthermore a file which was attached via the default rails actiontext editor now results in an exception in avo if one wants to show/edit this field (see end of screenrecording). This renders our current workaround (using a seperate editor only for adding files) less useful as we would have to exclude editing the whole field from avo. |
@tamaloa try it after removing the |
I actually already had tried it without the key and now double checked it (tamaloa/AvoActionTextAttachmentTest@4408303). Unfortunately it still does not work for me I get the behaviour as shown in above video. |
Can confirm that the issue persist, I included it on this issue list #2715 lets keep the conversation there since there were already many trix related open issues |
Describe the bug
Steps to Reproduce
Steps to reproduce the behavior:
Expected behavior & Actual behavior
Expected behaviour would be to show the uploaded file, actual behaviour is showing nothing.
I replicated the problem on a fresh minimal setup (https://github.com/tamaloa/AvoActionTextAttachmentTest ).
If using the rails built in create action (and trix editor) a upload is rendered in rails view as expected (via
_blob.html.erb
partial).If adding a file to a actiontext via AVO gem the attachment does not seem to be found.
Stacktrace from showing a resource created with avo (with file upload)
Models and resource files
https://github.com/tamaloa/AvoActionTextAttachmentTest
System configuration
ruby 3.2.2, rails 7.1.3.2, avo (3.4.2)
License type:
Are you using Avo monkey patches, overriding views or view components?
Screenshots or screen recordings
Peek.2024-02-29.11-38.mp4
Impact
Urgency
Workaround is to let users upload Files via a standard rails edit view which is far from ideal :(
The text was updated successfully, but these errors were encountered: