Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After installing and configuring phpepub 2.11, nodes correctly show the 'EPub version' link at the bottom of a node. However, the result is an empty page for all my attempts.
Comment | File | Size | Author |
---|---|---|---|
#10 | emptyepub-2001778-9.patch | 772 bytes | edvanleeuwen |
Comments
Comment #1
el1_1el CreditAttribution: el1_1el commentedi'm having the same problem. as i'm new to epub, i'm not sure where to begin
Comment #2
jcnventura CreditAttribution: jcnventura commentedDoes that happen on all pages? Can you provide a URL to a page with the problem?
Comment #3
el1_1el CreditAttribution: el1_1el commentedsorry for the delay in replying. here's what i encountered - http://eliotscott.com/drupal-dev/node/1
its a fresh drupal 7.20 install with the latest dev print module and epub library. it behaves mostly like the site i'm developing (which is pwd protected) although for whatever reason in that site it actually opens the firefox epub addon when the link is clicked on, which doesnt seem to happen here.
i'm not sure if i just missed something during the install or configuration or if i'm just being dense on this, but since it happened to someone else also i figured i'd try to help solve the mystery...
Comment #4
mattrweaver CreditAttribution: mattrweaver commentedHaving the same issue on two versions of a site. Could have sworn it had worked. Need help.
Edit:
Just updated to the latest dev version and the epub files are still empty.
Comment #5
jcnventura CreditAttribution: jcnventura commentedHi,
Thanks for the link. The EPUB support is still recent, and there might be a few quirks I need to fix. I create EPUBs regularly from pages as simple as these, so there might be something related to the server environment.
Does the apache log or the Drupal log show any error when accessing the above page?
Comment #6
el1_1el CreditAttribution: el1_1el commentedthanks for responding jcnventura. love the module and used it extensively in d6.
i checked the drupal logs and access logs on both sites, as well as the httpd error logs on the shielded site and found nothing. the shielded site runs php 5.4 and is rhel, while the test site runs 5.3 and is a standard shared host at green geeks and i don't see anywhere to access the apache error log on that.
in a brief test, all i can figure out is that the variable $epub on line 67 in print_epub.pages.inc
$epub = print_epub_generate_path($path, $query, $cid, $epub_filename . '.epub');
seems to oddly be empty but not null... I looked at print_epub_generate_path() in print_epub.module but all the variables from the return on line ~240
return $function($html, $meta, $filename);
seem to be there.sorry if that isn't helpful. i may get some time to try again later
Comment #7
edvanleeuwenI have updated the module to the latest dev and downloaded the latest EPub from Github. Still empty pages and no messages in the logs.
Comment #8
c1nr CreditAttribution: c1nr commentedI had the same problem. After changing line 41 in the file
/sites/all/modules/contrib/print/print_epub/lib_handlers/print_epub_phpepub/print_epub_phpepub.pages.inc
to
@$epub->addChapter("Chapter", "epub.html", $html);
the epub file is not empty anymore. So the parameter EPub::EXTERNAL_REF_ADD somehow doesn't work.
I hope this helps.
Christian
Comment #9
edvanleeuwenOk, changing
@$epub->addChapter("Chapter", "epub.html", $html, FALSE, EPub::EXTERNAL_REF_ADD);
to
@$epub->addChapter("Chapter", "epub.html", $html, FALSE);
sovled it. I have attached a patch.
Comment #10
edvanleeuwenComment #11
edvanleeuwenComment #12
edvanleeuwenDoes anybody know why the patch has not been tested yet by Drupal's testbot?
Comment #13
jenscbc CreditAttribution: jenscbc commentedmore info on the issue...
I experience the same bug.
Thought it was a mime type issue so I added "AddType application/epub+zip .epub" but didn't solve it.
PHP 5.3.2
Drupal 7.24
7.x-2.0-beta2 of course
PHPePub - fetched the PHPePub-3.10.zip package but the REVISION.TXT in the zip states "Rev. 3.00 - 2013-11-03"??
Please let me know if you need more information to help.
Thx for a cool module!
Comment #14
edvanleeuwen@jenscbc, have you tried the patch?
Comment #15
jenscbc CreditAttribution: jenscbc commented@edvanleeuwen thanks it works (patch 10#)! ePub's are no longer empty.
Another issues has shown up though. The ePub is not validating against ePub 3. The ePub doesn't work in iBooks but does work in EPUBReader plugin for Firefox. But well that's a new issue.
Thanks again for the patch!
Comment #16
edvanleeuwenComment #17
el1_1el CreditAttribution: el1_1el commentedFinally getting back to this and edvanleeuwen's patch works great! Thanks!
Comment #18
jcnventura CreditAttribution: jcnventura commentedCommitted to git. Thanks!
http://drupalcode.org/project/print.git/commit/7b60ddf
Comment #19
mattrweaver CreditAttribution: mattrweaver commentedI have downloaded the most recent dev version of the 7.2 branch from Feb 25, 2014 and I am still getting empty epub files.
EDIT:
Wait, I updated the latest version of the PHPePub tool. I can output an epub that is viewable by calibre, but not by Sigil nor Adobe Digital Editions unless I "convert" to epub in calibre