Error export via epub

Hello all,

I have installed a new Pressbooks site, with wordpress 6.1.1, pressbooks 6.6.0 and php8.0.
I have installed epubcheck with aptitude package on a Debian server.

I have cloned the pressbooks user-guide. When I try to export it in epub, there are some errors:

ERROR(RSC-007): [Location]/pressbooks/exports/Pressbooks-User-Guide-1672845474.epub/EPUB/front-cover.xhtml(13,51): Referenced resource “EPUB/assets/” could not be found in the EPUB.

ERROR(RSC-012): [Location]/pressbooks/exports/Pressbooks-User-Guide-1672845474.epub/EPUB/chapter-010-export.xhtml(18,490): Fragment identifier is not defined.

ERROR(RSC-012): [Location]/pressbooks/exports/Pressbooks-User-Guide-1672845474.epub/EPUB/chapter-017-what-is-a-webbook.xhtml(18,1098): Fragment identifier is not defined.

Do you have any ideas, advice for me ? The biggest problem for me is the first error (“EPUB/assets/” could not be found in the EPUB.) as It happens to others books.

Thanks.
Noémie

ERROR(OPF-014): [Location]/wp-content/uploads/sites/2/pressbooks/exports/Handbook-of-Research-Data-Management-1673274153.epub/EPUB/mcluhan.css(0,0): The property "remote-resources" should be declared in the OPF file.

ERROR(RSC-007): [Location]/wp-content/uploads/sites/2/pressbooks/exports/Handbook-of-Research-Data-Management-1673274153.epub/EPUB/front-cover.xhtml(13,66): Referenced resource "EPUB/assets/" could not be found in the EPUB.

ERROR(RSC-006): [Location]/wp-content/uploads/sites/2/pressbooks/exports/Handbook-of-Research-Data-Management-1673274153.epub/EPUB/mcluhan.css(2,9): Remote resource reference not allowed; resource must be placed in the OCF.

ERROR(RSC-006): [Location]/wp-content/uploads/sites/2/pressbooks/exports/Handbook-of-Research-Data-Management-1673274153.epub/EPUB/mcluhan.css(3,9): Remote resource reference not allowed; resource must be placed in the OCF.

Does anyone has a hint ? It looks like the McLuhan theme produces those errors ?

Hi @SteelWagstaff

Do you have any ideas on how to solve this issue ?
It’s the last error we have to solve before my university can go on production…

Thanks.
Noémie

Hi @njamar we have created a ticket for this issue Validation errors shown when exporting an EPUB: · Issue #3136 · pressbooks/pressbooks · GitHub. Our developers are still trying to reproduce it locally.

Thanks for your help, @SteelWagstaff.

As said on the ticket, the error disappears when the theme default font is chosen.
But I still have this error :
ERROR(RSC-007): [Location]/wp-content/uploads/sites/2/pressbooks/exports/Handbook-of-Research-Data-Management-1673274153.epub/EPUB/front-cover.xhtml(13,66): Referenced resource "EPUB/assets/" could not be found in the EPUB.

I guess I’m missing something ? I already generated a cover with the cover generator tool. I did a cover in pdf and jpg. I don’t see where am I supposed to generated a cover in xhtml ?

Thanks,
Noémie

I don’t know if it’s linked to it,

I have this php notice in my logs:

> PHP Notice: Error initializing S3 Storage Provider: Some environment variables are not present. in [Location]/wp-content/plugins/pressbooks/inc/utility/namespace.php on line 703

Since we don’t use S3 Storage, I don’t understand the logs. This happens when trying to crop an image in media gallery

Capture d’écran 2023-01-31 à 16.14.57

@njamar we have a pull request that we think will fix the EPUB CSS error. It still needs to be merged and tested before our next release, but we’re working on it. The PHP notice you’re referencing is unrelated to EPUB exports, but is occurring because you have not defined specific environment variables which can be used for logging SSO attempts. See Add Log module for track information in S3 and/or cloudwatch by richard015ar · Pull Request #2104 · pressbooks/pressbooks · GitHub. If you’re not using SSO and logging, you can ignore the notice.

Yeah @SteelWagstaff I’ve seen the pull request. I’m waiting for it to be merged to apply the fix.

But in my repo, I still have this error when exporting as an EPUB (not covered by the ticket on GitHub):

ERROR(RSC-007): [Location]/wp-content/uploads/sites/2/pressbooks/exports/Handbook-of-Research-Data-Management-1673274153.epub/EPUB/front-cover.xhtml(13,66): Referenced resource "EPUB/assets/" could not be found in the EPUB.

And I’m still stuck there to export epub

Ok – sounds like a new bug ticket may need to be filed for EPUB exports in cases where the user has generated a cover with our cover generator tool. Our dev team is trying to reproduce this issue now.

@njamar we believe that the issue you’re encountering will also be fixed by the open PR. I’m afraid you’ll need to wait until this is merged and a new version of Pressbooks is released. Hopefully that will happen this week.

@SteelWagstaff Alright, no problem to wait. A big thanks for your work!

Noémie

@njamar We just released Pressbooks 6.7.0 and McLuhan 2.25.2 – try upgrading and see if your export errors are resolved. Fingers crossed!

And it works :tada:
A huge thanks to you and your developers !

Noémie

1 Like