Project

General

Profile

Actions

Defect #41962

closed

Incorrect Path in CSS

Added by Matt Pogue 15 days ago. Updated 5 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

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.

Actions #1

Updated by Matt Pogue 15 days ago

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.

Actions #2

Updated by Matt Pogue 15 days ago

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

Actions #3

Updated by Go MAEDA 14 days ago

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.

Actions #4

Updated by Marius BÄ‚LTEANU 13 days ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Please reopen if you still experience issues.

Actions #5

Updated by Tomoaki Yamada 5 days ago

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.

Actions #6

Updated by Matt Pogue 5 days ago

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 ;)

Actions #7

Updated by Holger Just 5 days ago

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.

Actions #8

Updated by Tomoaki Yamada 5 days ago

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.

Actions

Also available in: Atom PDF