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

CSS breaks if merging CSS is enabled and there is a missing CSS file (Found on admin but logic should be the same for the frontend) #2753

Closed
AlterWeb opened this issue Nov 21, 2022 · 0 comments · Fixed by #2754

Comments

@AlterWeb
Copy link
Contributor

Preconditions (*)

  1. OpenMage 19.4.19

Steps to reproduce (*)

  1. Add a CSS file through the XML layout files that doesn't exist
  2. Enable CSS merging

Expected result (*)

  1. Existing files should be merged and only the missing CSS file should be skipped (like it did work in OpenMage 19.4.18 and older versions)
  2. An error should be logged in OpenMage 19.4.19 (Added by An Exception is thrown and logged if file is not found while merging #2445)

Actual result (*)

  1. Existing CSS files are not merged.
  2. The complete file path to the non merged CSS files are used instead of the URL's to those files. Creating html like <link rel="stylesheet" type="text/css" href="/home/linuxuser/path_to_docroot/skin/adminhtml/default/default/reset.css" media="all"> instead of <link rel="stylesheet" type="text/css" href="https://mydomain.tld/skin/adminhtml/default/default/reset.css" media="all">. This breaks the admin panel because the CSS file https://mydomain.tld/home/linuxuser/path_to_docroot/skin/adminhtml/default/default/reset.css doesn't exist. I think the same happens on the frontend because the same code is used to merge those files but I did not test this yet.
  3. An error is logged in OpenMage 19.4.19 (Added by An Exception is thrown and logged if file is not found while merging #2445), the problem in this code is that not only the error is logged but the whole merging stops by throwing an Exception here. Or maybe it should stop the whole merging but then the URL's of the non merged CSS files should be used and not the file paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants