Defect #41962
closed
Added by Matt Pogue 15 days ago.
Updated 5 days ago.
Description
In Redmine 6.0.1, CSS file `application-4cc96f8f.css` has font/image paths as `/assets/` instead of `/redmine/assets` which causes 404 errors on each page.
SOLUTION: Edit file in vim, make the following change:
`:s/assets/redmine\/assets/g`
Tested and confirmed on Debian 12.8, Apache Server 2.4.62 (Passenger), Redmine 6.0.1.
Matt Pogue wrote:
In Redmine 6.0.1, CSS file application-4cc96f8f.css
has font/image paths as /assets/
instead of /redmine/assets
which causes 404 errors on each page.
SOLUTION: Edit file in vim, make the following change:
:s/assets/redmine\/assets/g
Tested and confirmed on Debian 12.8, Apache Server 2.4.62 (Passenger), Redmine 6.0.1.
The full path to the file mentioned in the first note is public/assets/application-4cc96f8f.css
.
Note: The fix should also be applied to file public/assets/jstoolbar-632454e7.css
This issue occurs because you have not precompiled assets for the /redmine subdirectory, even though Redmine is deployed there.
The following commands should resolve the problem:
bin/rake assets:clobber RAILS_ENV="production"
bin/rake assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/redmine
The first command removes the existing assets, and the second one precompiles the assets for /redmine.
- Status changed from New to Closed
- Resolution set to Invalid
Please reopen if you still experience issues.
Why does this problem occur?
I also encountered the same problem.
I think there is a problem with my installation process, but I don't know what it is.
Tomoaki Yamada wrote in #note-5:
Why does this problem occur?
I also encountered the same problem.
I think there is a problem with my installation process, but I don't know what it is.
I'm not sure either, as I never had to do these steps prior to v6.0,but I can confirm that executing the `assets:clobber` and `assets:precompile` commands from the previous comment resolved the issue for me, so I've added them to my upgrade process.
Might just be dumb luck that I didn't need to do them before ;)
With Redmine 6.0, we now use an assets pipeline which compiles javascript and css files. In Redmine 5.1 and before, the assets were strictly static. See the release announcement for Redmine 6.0 at Redmine 6.0.0 is now available.
thank you for your helpful explanation.
#41754 had the following written:
In production mode, only on startup it will compile/recompile the assets.
Does that mean I needed to do something before it compiled?
Yes, I think we should update the docs and RedmineInstall to mention about this configuration flag together with a recommendation. I don't find useful to disable this behaviour for a simple installation with one server.
When using redmine 6.x, does this mean that it is recommended (added to my installation instructions) to run the following before starting the web server?
bin/rake assets:clobber RAILS_ENV="production"
bin/rake assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/redmine
https://www.redmine.org/projects/redmine/wiki/RedmineInstall
There is no description.
Also available in: Atom
PDF