-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] base: prevent rtlcss compilation errors
Steps to reproduce: - Include in your assets a CSS file with invalid formatting. - Translate your website in RTL language. > The website will never load and you will be left with a blank page. Cause of the issue: `rtlcss` never exit with a returncode, consequently our error management there is useless. As from `rtlcss` 4.1.0 [1], an error code is returned but only when using a CSS file. In our case, Odoo pass the CSS payload via the `stdin`. A PR [2] has been opened on `rtlcss` to also exit with a return code in this scenario (and log details to `stderr`). In the meantime and also for earlier versions, the error management had to be slightly adjusted. As we cannot deduce any informations from the return code (and the `stderr` is completely empty), we can exploit the fact that, in case of errors, `rtlcss` doesn't output anything to `stdout`. [1]: MohammadYounes/rtlcss@4e62545 [2]: MohammadYounes/rtlcss#342 X-original-commit: 52ebdb5
- Loading branch information
Showing
4 changed files
with
29 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
odoo/addons/test_assetsbundle/static/invalid_src/css/invalid_css.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.rule1 { | ||
color: black, | ||
} | ||
|
||
.rule2 { | ||
color: yellow; !important; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters