-
Notifications
You must be signed in to change notification settings - Fork 25.7k
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
[FW][FIX] base: prevent rtlcss compilation errors #179852
Closed
Closed
Conversation
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 PR targets 17.0 and is part of the forward-port chain. Further PRs will be created up to master. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
@lade-odoo @aab-odoo ci/runbot failed on this forward-port PR |
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: a50f197
lade-odoo
force-pushed
the
17.0-15.0-rtlcss_errors-lade-2M-O-fw
branch
from
September 12, 2024 12:11
066487e
to
402eba5
Compare
@lade-odoo @aab-odoo this PR was modified / updated and has become a normal PR. It must be merged directly. |
C3POdoo
requested review from
a team,
kmagusiak,
HydrionBurst,
aab-odoo and
BastienFafchamps
and removed request for
a team
September 12, 2024 12:13
@robodoo r+ |
This was referenced Sep 12, 2024
riccardo-metrum
pushed a commit
to resultrum/odoo
that referenced
this pull request
Sep 30, 2024
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 closes odoo#179852 X-original-commit: a50f197 Signed-off-by: Aaron Bohy (aab) <[email protected]> Signed-off-by: Laurent Desausoi (lade) <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Steps to reproduce:
Cause of the issue:
rtlcss
never exit with a returncode, consequently our error management there is useless. As fromrtlcss
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 thestdin
. A PR 2 has been opened onrtlcss
to also exit with a return code in this scenario (and log details tostderr
). 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 thestderr
is completely empty), we can exploit the fact that, in case of errors,rtlcss
doesn't output anything tostdout
.I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #179784
Forward-Port-Of: #178021