Open Grovkillen opened 3 days ago
Ok, I got it working by making a bit of a hack since the new file structure for themes in Redmine isn't 100% bullet proof.
First I needed to do some redirect in the nginx.config:
# Needed MIME-types
types {
text/css css;
application/javascript js;
}
# CSS files
location ~ ^/assets/themes/(.+?)/(.+?)\.css$ {
alias /usr/share/redmine/themes/$1/stylesheets/$2.css;
access_log off;
expires max;
}
# JavaScript files
location ~ ^/assets/themes/(.+?)/(.+?)\.js$ {
alias /usr/share/redmine/themes/$1/javascripts/$2.js;
access_log off;
expires max;
}
After that I needed to add the default.css into the themes folder (just copied the standard css code into default.css), and then made the application.css file look like this:
@import url(./default.css);
@import url(./theme.css);
I have the same problem, it doesn't load the theme.
After that I needed to add the default.css into the themes folder (just copied the standard css code into default.css), and then made the application.css file look like this:
Better to create a symlink to the default theme stylesheet, this will help to keep it up-to-date when new Redmine updates arrive.
Redmine tries to load the theme from /themes/<themename>/application.css
. Which is weird because the Redmine Wiki says that it should load /themes/<themename>/stylesheets/application.css
.
@Grovkillen @peter-hank Thanks for the feedback.
I am able to use a combination of Redmine 6.0.1 and Bleuclair 1.0.2 in my environment and cannot reproduce the problem. Could you please give me some information to reproduce the problem?
Information that would be nice to get:
/your/path/redmine/themes/bleuclair
since Redmine6.
(It does not work well in /assets/themes/bleuclair or public/themes/themes/bleuclair)https://<<url>>
? Or is it in the format like https://<<url>>/<<subdirectory>>
?Just the information you can provide is fine.
Yes, I installed the theme in the root/themes folder as per the information I got for the 6 version. I will try to get you a step by step procedure of how I set the server up.
Yes, I installed the theme in the root/themes folder as per the information I got for the 6 version. I will try to get you a step by step procedure of how I set the server up.
Thanks for your support. The directory where you have the theme installed looks fine.
@ishikawa999
Using the latest Docker image of Redmine (6.0.1) you can reproduce the issue.
Just run the image, use git clone https://github.com/farend/redmine_theme_farend_bleuclair.git themes/bleuclair
to clone the theme, set it in the admin and you should see it.
Their default Docker Compose config file is broken, use this one:
version: '3.1'
services:
redmine:
image: redmine
restart: always
ports:
- 8080:3000
environment:
REDMINE_DB_MYSQL: db
REDMINE_DB_PASSWORD: example
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: redmine
It will be on 8080, then admin/admin to login to the admin panel.
Adding the themes folder to the assets pipeline seems to help.
https://github.com/redmine/redmine/blob/master/config/initializers/30-redmine.rb#L29
So instead of:
default_paths << Rails.root.join("app/assets/stylesheets")
Rails.application.config.assets.redmine_default_asset_path = Redmine::AssetPath.new(Rails.root.join('app/assets'), default_paths)
we need:
default_paths << Rails.root.join("app/assets/stylesheets")
default_paths << Rails.root.join("themes")
Rails.application.config.assets.redmine_default_asset_path = Redmine::AssetPath.new(Rails.root.join('app/assets'), default_paths)
Looks like an issue with Redmine, not the theme itself and it's interesting that it works on your setup @ishikawa999.
I've installed Redmine 6 and the theme is broken. Please see image below: