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.

CommentFileSizeAuthor
#10 emptyepub-2001778-9.patch772 bytesedvanleeuwen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

el1_1el’s picture

i'm having the same problem. as i'm new to epub, i'm not sure where to begin

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Does that happen on all pages? Can you provide a URL to a page with the problem?

el1_1el’s picture

sorry 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...

mattrweaver’s picture

Having 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.

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Active

Hi,

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?

el1_1el’s picture

thanks 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

edvanleeuwen’s picture

I have updated the module to the latest dev and downloaded the latest EPub from Github. Still empty pages and no messages in the logs.

c1nr’s picture

I 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

edvanleeuwen’s picture

Ok, 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.

edvanleeuwen’s picture

Issue summary: View changes
FileSize
772 bytes
edvanleeuwen’s picture

Status: Active » Needs review
edvanleeuwen’s picture

Does anybody know why the patch has not been tested yet by Drupal's testbot?

jenscbc’s picture

more 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!

edvanleeuwen’s picture

@jenscbc, have you tried the patch?

jenscbc’s picture

@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!

edvanleeuwen’s picture

Status: Needs review » Reviewed & tested by the community
el1_1el’s picture

Finally getting back to this and edvanleeuwen's patch works great! Thanks!

jcnventura’s picture

Status: Reviewed & tested by the community » Fixed
mattrweaver’s picture

I 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

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.