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

pdf report: cssutils throws errors #26197

Open
jll-02 opened this issue Apr 29, 2024 · 0 comments
Open

pdf report: cssutils throws errors #26197

jll-02 opened this issue Apr 29, 2024 · 0 comments
Labels

Comments

@jll-02
Copy link
Contributor

jll-02 commented Apr 29, 2024

Description of the issue

cssutils throws false warnings and errors for css properties that acutally have an effect on the style of the pdf.
The generated frappe reports throw errors into the bench start output.
Additionally I have a report in my app that is a bit more complex and because of this I have a few extra styles in this report. These stlyes are neccessary and work in the report, however cssutils throws them as errors.

Ideas for solutions

cssutils should only thrown errors or warnings if wkhtmltopdf really has problems with the properties, since it is very confusing.

Another option would be to suppress these errors since appreantly they are neihter usefull nor helpful.

Context information (for bug reports)

Output of bench version
I have tried this on two machnies one with frappe v14 in the following versions

erpnext 14.68.2
frappe 14.72.0

and one with frappe v15 in the this version

frappe 15.24.1

Steps to reproduce the issue

  1. open the PDF of a Report (e.g. the PDF to a User Doc)
  2. look into the bench start output
  3. you see the errors

Observed result

the given errors appear in the console, even though the report is created and the styles are used correctly.

Expected result

No errors should be thrown. If an error is thrown the message should be correct, since cssutils marks properties as wrong that work in the reports.

Stacktrace / full error message

These errors will appear in the output of the bench start

ERROR   Property: Invalid value for "CSS Level 2.1" property: var(--gray-900) [14:3: color]
WARNING Property: Unknown Property name. [64:2: word-wrap]
WARNING Property: Unknown Property name. [83:2: columns]
WARNING Property: Unknown Property name. [90:2: background-size]
WARNING Property: Unknown Property name. [98:2: object-fit]
WARNING Property: Unknown Property name. [110:2: -webkit-print-color-adjust]
WARNING Property: Unknown Property name. [158:2: word-break]

Additional information

I am using the Ubuntu 22.04.3 LTS.

@jll-02 jll-02 added the bug label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant