Unable to upload images in rich-text
Added by Sergio Tadini 6 months ago
Hello everybody
I'm very new to redmine: I was asked to create a new server from scratch, restore a backup of an existing system and upgrade to the latest version, without any previous knowledge of the application.
I've reached in some way to make it work on Oracle Linux 9 with ARM cpu (running in a Oracle Cloud Instance) by merging informations from this and other forums and solutions. I'd like to thank everybody for sharing their knowledge.
The old server is running release 4.2.1 in a custom docker container. The deployment has been made by a technician no more working for the company. It was using the redmine_ckeditor plugin release 1.2.3.
I've restored the database on the new machine, deployed the application (release 5.1.2), added the "redminex-ckeditor-1-2-4" plugin (the only one I've found that works with the last release without giving errors during the "rake redmine:plugins:migrate" execution) and restored some files found in the old server backup.
All of the application directory has been chmod'ed to the same user and group, the one that runs the application (started by a systemd script).
The application is working and correctly renders the existing rich text.
The only problem found until now is about adding images to a rich text. When the I try to press the "browse and upload images" in the editor, it opens the "Rich Browser" window with many images already there.
If I choose one of the existing images it works and correctly add it to the text. If else I try to add a new image by clicking the + button, I can select a file and then it shows a red x icon instead of the image thumbprint.
In the log/production.log file I can read:
I, [2024-05-30T11:16:18.383863 #51624] INFO -- : [****************] Started POST "/rich/files?authenticity_token=******************&simplified_type=image&scoped=true&scope_type=Project&scope_id=4&qqfile=heic1914a.jpg" for ********** at 2024-05-30 11:16:18 +0200 I, [2024-05-30T11:16:18.385298 #51624] INFO -- : [****************] Processing by Rich::FilesController#create as */* I, [2024-05-30T11:16:18.385602 #51624] INFO -- : [****************] Parameters: {"file"=>#<ActionDispatch::Http::UploadedFile:0x0000ffff73136fc8 @tempfile=#<Tempfile:>, @original_filename="heic1914a.jpg", @content_type="application/octet-stream", @headers=nil>, "authenticity_token"=>"******==", "simplified_type"=>"image", "scoped"=>"true", "scope_type"=>"Project", "scope_id"=>"4", "qqfile"=>"heic1914a.jpg"} I, [2024-05-30T11:16:18.391232 #51624] INFO -- : [****************] Current user: ****** (id=42) I, [2024-05-30T11:16:18.392561 #51624] INFO -- : [****************] Completed 500 Internal Server Error in 7ms (ActiveRecord: 1.7ms | Allocations: 1589) F, [2024-05-30T11:16:18.393414 #51624] FATAL -- : [****************] [****************] TypeError (no implicit conversion of nil into String): [****************] [****************] plugins/redmine_ckeditor/rich/app/controllers/rich/files_controller.rb:55:in `create' [****************] lib/redmine/sudo_mode.rb:61:in `sudo_mode'
Here is my installation details:
Oracle Linux Server release 9.4 with kernel 5.15.0-206.153.7.1.el9uek.aarch64 ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [aarch64-linux] Rails 6.1.7.7 Database mysql rel. 8.0.36-1.el9_3.aarch64 The about script shows: Environment: Redmine version 5.1.2.stable Ruby version 3.0.4-p208 (2022-04-12) [aarch64-linux] Rails version 6.1.7.7 Environment production Database adapter Mysql2 Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp Redmine settings: Redmine theme Default SCM: Git 2.43.0 Filesystem Redmine plugins: redmine_ckeditor 1.2.4
I don't understand if it's a plugin code error or if there is something wrong with my installation.
How can I make it work?
Thank you
Replies (3)
RE: Unable to upload images in rich-text - Added by Sergio Tadini 6 months ago
I'm sorry to have created this double post. The forum was "too busy" so I've retried many times and 2 of them were successful.
Can some moderator remove this one or the other one?
Thank you
RE: Unable to upload images in rich-text - Added by Sergio Tadini 6 months ago
We've found the problem
On the OS was missing the ImageMagick library. We've installed it via yum and everything worked.
The hint was in the file log/production.log saying:
Paperclip::Errors::CommandNotFoundError (Could not run the `identify` command. Please install ImageMagick.):
I hope it can help someone else.
Thank you
RE: Unable to upload images in rich-text - Added by Kristina Alvarez 5 months ago
Happy that everything is working good now.