Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Frontend::WebPath for Customer/default/css/Core.Icons.css font uris #2886

Closed
meinhart opened this issue Jan 26, 2024 · 3 comments
Closed
Assignees
Milestone

Comments

@meinhart
Copy link

When changing the Frontend::WebPath config to something different then default value "otobo-web" the changes won´t be reflected in var/httpd/htdocs/skins/Customer/default/css/Core.Icons.css file.

As result when trying to load Customer Dashboard there will be several warnings in the web console and the font´s can´t be loaded accordingly.
Error message: "Failed to decode downloaded font".

Possible fix: CSS Loader could check for urls and replace them with WebPath config value when loading to cache.

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Mar 7, 2024

I think that this can be handled with a relative path. The file Core.Icons.css is added to an compounded file, e.g. CommonCSS_751303125ece5428c88f2e0d692cd9d4.css. The browser fetches this file via an URL like . https://localhost:1484/otobo-web/skins/Customer/default/css-cache/CommonCSS_751303125ece5428c88f2e0d692cd9d4.css . This means that the absolute URL /otobo-web/common/fonts/ should also be fetchable via ../../../../common/fonts/.

TODO:

  • verify the error message not repaired installation of OTOBO 10.0.19
  • change absolute URLS to relative URLs
  • verify that the error disappears when loaded via different script pathes

@bschmalhofer bschmalhofer self-assigned this Mar 7, 2024
@bschmalhofer bschmalhofer added this to the OTOBO 10.0 milestone Mar 7, 2024
@bschmalhofer
Copy link
Contributor

bschmalhofer commented Mar 9, 2024

In rel-10_0 I adapted the OTOBO code so that the static assets are available under the path /otobo/assets. Tested in Chrome whether the reported message can be seen. Directly loading /otobo/assets/skins/Customer/default/css-cache/CommonCSS_7718b23fbf7a8e3ead491c8d037d3a16.css did not produce the message. But the message could be produced after logging on and opening a some random pages in the agent and in the customer interface. I suppose that there is lazy loading, and the font is only loaded when needed.

change_web_path.txt

bschmalhofer added a commit that referenced this issue Mar 9, 2024
bschmalhofer added a commit that referenced this issue Mar 9, 2024
Because the hard coded path can be different in different installations.
bschmalhofer added a commit that referenced this issue Mar 9, 2024
bschmalhofer added a commit that referenced this issue Mar 9, 2024
Because the hard coded path can be different in different installations.
@bschmalhofer
Copy link
Contributor

Changed to relative pathes. Looks fine so far. PR is merged. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants