Defect #40831
closedThe icon-ok/icon-error png is not shown in the administration/information page
0%
Description
It seems the asset pipeline urls are not correct when Redmine is installed in the subdirectory.
Symptoms¶
The icon-ok/icon-error png is not shown in the administration/information page after the incorporation with the asset pipeline feature of propshaft.
I installed RedMica 3.0.0, which is already incorporated the feature, the icons are not shown in the administration/information page shown below:
On the other hand, they are correctly shown when I use Redmine 5.1.2, which is shown below:
Analysis¶
I tried to grep 'icon-ok' and found it matches with:
public/assets/application-6a7b9ce7ac98b00c12d3fa359072e1b178cc95b0.css:.icon-ok { background-image: url("/assets/true-e804d786299ef1936fe780b308ac183a2bbbe00b.png"); }
Then, I found that /var/lib/redmine/public/assets/true-e804d786299ef1936fe780b308ac183a2bbbe00b.png
is exists.
In addition I accessed the icon-ok from web browser with http://<redmine-server>/redmine/assets/true-e804d786299ef1936fe780b308ac183a2bbbe00b.png
and it is shown correctly.
It seems the asset is correctly put in the server.
Next I tried to take a look at access_log of httpd.
When I accessed the adminstration/information, the log shows like below:
XXX.XXX.XXX.XXX - - [12/Jun/2024:03:32:24 +0000] "GET /assets/true-e804d786299ef1936fe780b308ac183a2bbbe00b.png HTTP/1.1" 404 196 ...
it means that the asset file is not found(404)
whereas I accessed the asset directly, the log shows like below:
XXX.XXX.XXX.XXX - - [12/Jun/2024:16:45:27 +0000] "GET /redmine/assets/true-e804d786299ef1936fe780b308ac183a2bbbe00b.png HTTP/1.1" 200 248 ...
it means that the asset file is found successfully(200)
Please take a look at the difference of each logs.
It shows that:
- In the failure case:
GET /assets/true.png
is not found(404) - In the success case:
GET /redmine/assets/true.png
is successfully found(200) - Redmine is installed in the url @http://<redmine.ip>/redmine
So, the urls for the assets is not correct, which seems a defect.
It seems the asset pipeline urls are not correct when Redmine is installed in the subdirectory.
Files
Updated by Go MAEDA 6 months ago
- File clipboard-202406202052-p8muu.png clipboard-202406202052-p8muu.png added
- File clipboard-202406202053-3sucl.png clipboard-202406202053-3sucl.png added
At present, I am unable to reproduce the issue. Icons are displayed normally.
My test environment is deployed in the '/sandbox' subdirectory using Passenger.
Updated by Hidehisa Matsutani 6 months ago
As Maeda-san said via X, I did bin/rails assets:clobber assets:precompile RAILS_ENV=production RAILS_RELATIVE_URL_ROOT=/redmine
, restarted httpd, refreshed the browser cache, then the page was successfully shown. Thank you for the help, Maeda-san