48 Export Validation Logs

Pressbooks EPUB, MOBI, and PDF files are made to be compatible with the submission specifications at all major ebook stores and print-on-demand services. However, sometimes markup that isn’t compatible with the EPUB, MOBI, or PDF file formats can be imported into Pressbooks when you bring in your content. We recommend testing your files before you submit them to your distributor of choice to make sure they pass all specifications. You can receive validation logs (or error reports) from Pressbooks directly to your email. Read on to find out more about:

Receiving Validation Logs

You can decide whether or not you want to receive validation logs for all your exported files. To enable or modify this setting:

  1. Go to Settings > Export from the left sidebar menu in Pressbooks
  2. Next to “Email Validation Logs,” choose either “Yes” or “No”
  3. Click Save Changes 

By default, all books’ Email Validation Log setting is set to “No. Ignore validation errors.” If you choose to receive validation logs (or error reports) from Pressbooks, all file validation error logs will be forwarded to the email address associated with your Pressbooks account.

Export Settings screen on Pressbooks.com

Afterward, you’ll receive a message whenever any file you export has an error. You’ll know exported files contain errors if you see a banner at the top of the Export screen that reads: “Warning: The export has validation errors. See logs for more details.”

Export validation error banner on the Exports screen.

Each type of file is created with a different software, so each type of file will have a slightly different validation log. Read on to see how to interpret each type of validation log.

EPUB Validation Logs

EPUB validation logs will appear in your email inbox with the following subject line: Pressbooks\Modules\Export\Epub\Epub201

Below is an example of what an error report may look like.

Array
(
[time] => Mon Dec 10 22:17:33 2018
[user] => tmcgrath
[site_url] => https://yourbooktitle.pressbooks.com/wp
[blog_id] => 107381
[theme] => Atwood
)
ERROR(RSC-020): /srv/www/pressbooks.com/releases/20181205114740/web/app/uploads/sites/107381/pressbooks/exports/Test-Book-2-1544480239.epub/OEBPS/chapter-056-your-chapter.html(26,268): ‘http://bit.ly/btb-v092″>http://bit.ly/btb-v092’ is not a valid URL.

Check finished with errors.

 

How to Read an EPUB Validation Log

The validation log can be broken down into parts. The first part is metadata that identifies your book. You’ll see the time the book was exported, username of the person who exported the book, and the URL of the book in Pressbooks. You’ll also see other internal data, like your book’s WordPress ID number and the theme your book was built with. After the metadata are the error logs:

ERROR(RSC-020): This code identifies what type of error has been caught. The code correlates to the description at the end of the entry log.

/srv/www/pressbooks.com/releases/20181205114740/web/app/uploads/sites/107381/pressbooks/exports/Test-Book-2-1544480239.epub/OEBPS/:

chapter-035-your-chapter.html: This information tells you exactly where the problem is in your book. In this book, the chapter that contains the error is chapter 35, which has been titled “Your Chapter.” If you saved a chapter before giving it a title, this URL will have the randomly generated slug instead of the chapter’s title.

(26,268): The last piece of data from this URL is the exact line and character the error occurs at in your EPUB file’s HTML. If knowing the chapter didn’t help you find the error and you need to pinpoint its exact location in the book, we suggest using the ebook management application Calibre to view your EPUB file. While in “edit” mode Calibre interface lets you see the exact line and character of the HTML for each chapter in your EPUB file.

‘http://bit.ly/btb-v042″>http://bit.ly/btb-v042’ is not a valid URL: This is an example of an RSC-020 error, which states that a URL in your book is not valid. The RSC code from the beginning of the error log entry will always correlate to the type of error you’re receiving; the information that comes after the error URL will always describe what the error is about.

MOBI Validation Logs

MOBI validation logs will appear in your email inbox with the subject line: Pressbooks\Modules\Export\Mobi\Kindlegen 

Below is an example of what a MOBI error report may look like.

Array
(
[time] => Tue Jul 10 16:00:46 2018
[user] => tmcgrath
[site_url] => https://yourbooktitle.pressbooks.com/wp
[blog_id] => 5
[theme] => Buckram
)*************************************************************
Amazon kindlegen(Linux) V2.9 build 1028-0897292
A command line e-book compiler
Copyright Amazon.com and its Affiliates 2014
*************************************************************Info(prcgen):I1047: Added metadata dc:Title        “standardized Test book for pressbooks”
(….more standard Info(prcgen) notifications…) 
Warning(htmlprocessor):W28001: CSS style specified in content is not supported by Kindle readers. Please do not use: ‘counter-increment’ in file: /tmp/mobi-BxToYA/OEBPS/buckram.css
Warning(prcgen):W14010: media file not found  http://yourbooktitle.pressbooks.com/files/2015/08/image_name.jpg#fixme#fixme#fixme#fixme
Info(prcgen):I1016: Building enhanced PRC file
(….more standard Info(prcgen) notifications…) 
Info(prcgen):I1037: Mobi file built with WARNINGS!

How to Read a MOBI Validation Log

You’ll notice that the log still contains the standard metadata at the top of the message. You’ll then see a message acknowledging that MOBI is a proprietary ebook format copyrighted by Amazon.

After, the MOBI log goes through each step that’s required to validate the MOBI file.

In most cases, you should receive only Info(prcgen) notifications, which are the normal steps that a file has to pass. If something’s wrong, you’ll receive a Warning. Warnings will be followed by labels that describe what the warning applies too. As an example, the above validation log has htmlprocessor and prcgen errors.

After the initial warning label is the reason why the error was flagged. In the example above, the htmlprocessor error flags that the “CSS style specified in content is not supported by Kindle readers.”

Next is the description of how to fix the error. In the above example, this displays as: “Please do not use: ‘counter-increment’ in file: /tmp/mobi-BxToYA/OEBPS/buckram.css”. This tells you that the error specifically was caused by the counter-increment property in the ebook CSS. Once you remove the counter-increment from the style sheet, the error will disappear.

At the bottom of the validation log, you’ll see that your MOBI file has been built, but with “WARNINGS!”

All warnings must be resolved before Amazon will accept the MOBI file for publication.

PDF Validation Logs

PDF files tend to have fewer validation errors than ebook files. Because PDFs are static documents, meaning they always look the same for every device and user, they’re not as sensitive to errors and may export fine despite issues in your EPUB or MOBI files. However, errors still sometimes occur.

PDF validation logs will appear in your email inbox with the subject line: Pressbooks\Modules\Export\Prince\Pdf

Below is an example of what a PDF validation log may look like.

Array
(
[time] => Tue Sep 19 01:09:21 2017
[user] => tmcgrath
[site_url] => https://yourbooktitle.pressbooks.com
[blog_id] => 64631
[theme] => Adunis
[url] => http://yourbooktitle.pressbooks.com/format/xhtml?timestamp=1505783354&hashkey=d5f7474bad00cfde913572c9fe1caaa9&pb-latex-zoom=3&fullsize-images=1
)
Mon Sep 18 21:09:16 2017: —- begin
Mon Sep 18 21:09:20 2017: page 163: warning: no font for Emoticons character U+1F609, fallback to ‘?’
Mon Sep 18 21:09:21 2017: finished: success
Mon Sep 18 21:09:21 2017: —- end

How to Read a PDF Validation Log

The PDF validation log is straight forward; you’ll see the date stamps for the beginning, the flagged errors, the successful finish, and the end of the process. The only part you’ll need to look at is the error.

Find an error by looking for the word “warning”. Each warning will begin with a timestamp. Afterward, you’ll see a description of the error. For the example above, on page 163, the PDF converter was unable to find a font in the file that supplied the emoticon character entered by the user.

To solve an error like the one above, a user can find the page number from the error report, go to its chapter in Pressbooks, and remove the emoticon that caused the problem. Use the error report to figure out the type of error and its location in your PDF file.

SASS Error Validation Logs

SASS errors report problems with your book’s CSS (cascading style sheet). SASS errors appear in your email inbox with the subject line: SASS Error 

Below is an example of what a SASS error may look like.

Array
(
[time] => Sun Dec  9 23:44:51 2018
[user] => mcgratay
[site_url] => https://yourbooktitle.pressbooks.com/wp
[blog_id] => 112926
[Exception] => Array
(
=> 0
  [error] => unclosed block: failed at `` (stdin) on line 49
[file] => /srv/www/pressbooks.com/releases/20181205114740/vendor/leafo/scssphp/src/Parser.php
[line] => 128
[trace] => #0 /srv/www/pressbooks.com/releases/20181205114740/vendor/leafo/scssphp/src/Parser.php(173): Leafo\ScssPhp\Parser->throwParseError('unclosed block')
#1 /srv/www/pressbooks.com/releases/20181205114740/vendor/leafo/scssphp/src/Compiler.php(197): Leafo\ScssPhp\Parser->parse('$chapter: 'Chap...')
#2 /srv/www/pressbooks.com/releases/20181205114740/web/app/plugins/pressbooks/inc/class-sass.php(183): Leafo\ScssPhp\Compiler->compile('$chapter: 'Chap...')
#3 /srv/www/pressbooks.com/releases/20181205114740/web/app/plugins/pressbooks/inc/class-styles.php(468): Pressbooks\Sass->compile('$chapter: 'Chap...', Array)
#4 /srv/www/pressbooks.com/releases/20181205114740/web/app/plugins/pressbooks/inc/modules/export/prince/class-pdf.php(245): Pressbooks\Styles->customize('prince', '\n\n@prince-pdf {...', '\n\n@prince-pdf {...')
#5 /srv/www/pressbooks.com/releases/20181205114740/web/app/plugins/pressbooks/inc/modules/export/prince/class-docraptor.php(55): Pressbooks\Modules\Export\Prince\Pdf->kneadCss()
#6 /srv/www/pressbooks.com/releases/20181205114740/web/app/plugins/pressbooks/inc/modules/export/class-export.php(744): Pressbooks\Modules\Export\Prince\Docraptor->convert()
#7 /srv/www/pressbooks.com/releases/20181205114740/web/wp/wp-includes/class-wp-hook.php(286): Pressbooks\Modules\Export\Export::formSubmit('')
#8 /srv/www/pressbooks.com/releases/20181205114740/web/wp/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#9 /srv/www/pressbooks.com/releases/20181205114740/web/wp/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#10 /srv/www/pressbooks.com/releases/20181205114740/web/wp/wp-settings.php(450): do_action('init')
#11 /srv/www/pressbooks.com/releases/20181205114740/web/wp-config.php(9): require_once('/srv/www/pressb...')
#12 /srv/www/pressbooks.com/releases/20181205114740/web/wp/wp-load.php(42): require_once('/srv/www/pressb...')
#13 /srv/www/pressbooks.com/releases/20181205114740/web/wp/wp-admin/admin.php(31): require_once('/srv/www/pressb...')
#14 {main}
))

 

How to Read a SASS Validation Log

The important part of the SASS error is the information that comes after:

  [error] =>

In the example above, the error in the CSS is an "unclosed block." The error log states that the block has failed on line 49. You can go into your CSS, find line 49, and modify the CSS to resolve the error. With this error, the user forgot to add a closing bracket "}" to their custom styles. After the user adds the closing bracket, the error will disappear in future exports.

 

License

Icon for the Creative Commons Attribution 4.0 International License

Pressbooks User Guide Copyright © 2012 by Book Oven Inc. (Pressbooks.com) is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book