-
Notifications
You must be signed in to change notification settings - Fork 132
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
Validation errors shown when exporting an EPUB: #3136
Comments
I am not able to replicate the validation issues mentioned. INFO(CSS-007): /app/web/app/uploads/sites/39/pressbooks/exports/LTI-Demo-Book-1674495306.epub/EPUB/mcluhan.css(5,3): Font-face reference "EPUB/assets/Lora-Bold.ttf" refers to non-standard font type "font/sfnt".
INFO(CSS-007): /app/web/app/uploads/sites/39/pressbooks/exports/LTI-Demo-Book-1674495306.epub/EPUB/mcluhan.css(11,3): Font-face reference "EPUB/assets/Lora-BoldItalic.ttf" refers to non-standard font type "font/sfnt".
INFO(CSS-007): /app/web/app/uploads/sites/39/pressbooks/exports/LTI-Demo-Book-1674495306.epub/EPUB/mcluhan.css(17,3): Font-face reference "EPUB/assets/Lora-Italic.ttf" refers to non-standard font type "font/sfnt".
INFO(CSS-007): /app/web/app/uploads/sites/39/pressbooks/exports/LTI-Demo-Book-1674495306.epub/EPUB/mcluhan.css(23,3): Font-face reference "EPUB/assets/Lora-Regular.ttf" refers to non-standard font type "font/sfnt".
INFO(CSS-007): /app/web/app/uploads/sites/39/pressbooks/exports/LTI-Demo-Book-1674495306.epub/EPUB/mcluhan.css(29,3): Font-face reference "EPUB/assets/CormorantGaramond-Bold.ttf" refers to non-standard font type "font/sfnt".
INFO(CSS-007): /app/web/app/uploads/sites/39/pressbooks/exports/LTI-Demo-Book-1674495306.epub/EPUB/mcluhan.css(35,3): Font-face reference "EPUB/assets/CormorantGaramond-BoldItalic.ttf" refers to non-standard font type "font/sfnt".
INFO(CSS-007): /app/web/app/uploads/sites/39/pressbooks/exports/LTI-Demo-Book-1674495306.epub/EPUB/mcluhan.css(41,3): Font-face reference "EPUB/assets/CormorantGaramond-Italic.ttf" refers to non-standard font type "font/sfnt".
INFO(CSS-007): /app/web/app/uploads/sites/39/pressbooks/exports/LTI-Demo-Book-1674495306.epub/EPUB/mcluhan.css(47,3): Font-face reference "EPUB/assets/CormorantGaramond-Regular.ttf" refers to non-standard font type "font/sfnt". It seems that fonts source are not between double quotes after compiling, and maybe that's the issue: @font-face {
font-family: "Lora";
src: url(assets/Lora-Bold.ttf) format("truetype");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "Lora";
src: url(assets/Lora-BoldItalic.ttf) format("truetype");
font-weight: bold;
font-style: italic;
} |
Thanks @richard015ar for these INFO notes, that's a known issue and outside the scope of this ticket. See pressbooks/pressbooks-book#1119 |
I found the problem. It was an EPUB 3.2 spec requirement that we were not meeting. Fix in: #3141 |
Nice find and fix Ricardo! Thank you for this. |
PR: #3141 |
Can we reproduce this issue on our dev networks or locally? If not, let's close for now. |
I can reproduce this on a dev network. https://dev.pressbooks.network/testshapeshifter2023/wp-admin/options.php?page=pb_export |
Please add your planning poker estimate with Zenhub @fdalcin |
This is actually also present on production networks; it can be replicated by cloning the affected book to University and exporting it as an EPUB: https://university.pressbooks.pub/testshapeshifter2023clone/wp-admin/admin.php?page=pb_export |
Using Theme Defaults for fonts in Ebook Options results in different validation errors when exporting this book as an EPUB. With Header and Body Fonts set to Theme Defaults in Ebook Options:
With different Header and Body Fonts selected in Ebook Options:
|
For the issue: INFO(CSS-007): /srv/www/university.pressbooks.pub/releases/20221223162849/web/app/uploads/sites/966/pressbooks/exports/Test-Shape-Shifter-1675102511.epub/EPUB/mcluhan.css(4,3): Font-face reference "EPUB/assets/Lora-Bold.ttf" refers to non-standard font type "font/sfnt". It was fixed in #3141 The issue mentioned: ERROR(OPF-014): /srv/www/university.pressbooks.pub/releases/20221223162849/web/app/uploads/sites/966/pressbooks/exports/Test-Shape-Shifter-1675102779.epub/EPUB/mcluhan.css(0,0): The property "remote-resources" should be declared in the OPF file.
ERROR(RSC-006): /srv/www/university.pressbooks.pub/releases/20221223162849/web/app/uploads/sites/966/pressbooks/exports/Test-Shape-Shifter-1675102779.epub/EPUB/mcluhan.css(2,9): Remote resource reference not allowed; resource must be placed in the OCF.
ERROR(RSC-006): /srv/www/university.pressbooks.pub/releases/20221223162849/web/app/uploads/sites/966/pressbooks/exports/Test-Shape-Shifter-1675102779.epub/EPUB/mcluhan.css(3,9): Remote resource reference not allowed; resource must be placed in the OCF. I think it is a font issue. This is the CSS exported @charset "UTF-8";
/* stylelint-disable no-invalid-position-at-import-rule */
@import "https://fonts.googleapis.com/css?family=Roboto&display=swap";
@import "https://fonts.googleapis.com/css?family=Cormorant+Garamond&display=swap";
body, .entry-content {
color: initial;
} I think that's the issue. |
I can confirm it happens when we select any font other than |
I don't think this PR was autodeployed to dev.pressbooks.network. Looking into it now (sigh) |
Seems like the auto update is failing here https://github.com/pressbooks/pressbooksedu-golden-bedrock/actions/runs/4059027436/jobs/6986633795 |
We observed the following validation errors when exporting an EPUB on our integrations network. They seem to indicate an issue with how the theme CSS files are declared or referenced in the EPUB's package document.
Array
(
[time] => Wed Jan 18 17:05:31 2023
[user] => thomas
[site_url] => https://integrations.pressbooks.network/testshapeshifter2023
[blog_id] => 706
[theme] => McLuhan
)
ERROR(OPF-014): /srv/www/integrations.pressbooks.network/releases/20230118044402/web/app/uploads/sites/706/pressbooks/exports/Test-Shape-Shifter-1674061522.epub/EPUB/mcluhan.css(0,0): The property "remote-resources" should be declared in the OPF file.
ERROR(RSC-006): /srv/www/integrations.pressbooks.network/releases/20230118044402/web/app/uploads/sites/706/pressbooks/exports/Test-Shape-Shifter-1674061522.epub/EPUB/mcluhan.css(3,9): Remote resource reference not allowed; resource must be placed in the OCF.
ERROR(RSC-006): /srv/www/integrations.pressbooks.network/releases/20230118044402/web/app/uploads/sites/706/pressbooks/exports/Test-Shape-Shifter-1674061522.epub/EPUB/mcluhan.css(4,9): Remote resource reference not allowed; resource must be placed in the OCF.
Check finished with errors
Originally posted by @tw77 in https://github.com/pressbooks/private/issues/1080#issuecomment-1387423329
The text was updated successfully, but these errors were encountered: