Source.xhtml is empty - SOLVED

Hi, I’m having trouble with OpenDocument exports. When I attempt to export this format for any of the books in my PressBooks installation, I get this error:

> [08-Jul-2022 18:38:35 UTC] Pressbooks\Modules\Export\Odt\Odt
> Array
> (
>     [time] => Fri Jul  8 18:38:35 2022
>     [user] => pressbooks_someuser
>     [site_url] => https://my_pressbooks_domain.org/biblicalnarrative
>     [blog_id] => 9
>     [theme] => McLuhan
>     [url] => https://my_pressbooks_domain.org/biblicalnarrative/format/xhtml?timestamp=1657305514&hashkey=696b722eb0e1778c9b43d47df186ca4c
> )
> source.xhtml is empty

Looking at the module that defines this error, I suspect my $tmpDir is not writable by the server, but I’m not sure where the default $tmpDir is supposed to be - any troubleshooting advice?

My diagnostics are below…

### System Information

#### Root Blog Info

Root Blog ID: 1
Root Blog URL: https://my_pressbooks_domain.org/

#### Browser

Platform: OS X
Browser Name: Firefox
Browser Version: 102.0
User Agent String: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Firefox/102.0

#### WordPress Configuration

Network URL: https://my_pressbooks_domain.org/
Network Type: Subdirectory
Version: 6.0
Language: en_US
WP_ENV: Not set
WP_DEBUG: Enabled
Memory Limit: 256M

#### Pressbooks Configuration

Version: 5.33.0
Root Theme: Aldine
Root Theme Version: 1.14.0

#### Pressbooks Dependencies

Epubcheck: Installed
xmllint: Installed
PrinceXML: Installed
Saxon-HE: Installed

#### Must-Use Plugins

hm-autoloader.php: n/a

#### Network Active Plugins

GA Google Analytics: 20220517
H5P: 1.15.4
Pressbooks: 5.33.0
Really Simple SSL: 5.3.2
UpdraftPlus - Backup/Restore: 1.22.14
WP Mail SMTP: 3.4.0

#### Root Blog Active Plugins

DreamHost Panel Login: 1.0.0
GA Google Analytics: 20220517
H5P: 1.15.4
Pressbooks: 5.33.0
Really Simple SSL: 5.3.2
UpdraftPlus - Backup/Restore: 1.22.14
WP Mail SMTP: 3.4.0

#### Inactive Plugins

WP QuickLaTeX: 3.8.6

#### Server Configuration

PHP Version: 7.4.3
MySQL Version: 8.0.29
Webserver Info: Apache/2.4.41 (Ubuntu)

#### PHP Configuration

Memory Limit: 500M
Upload Max Size: 2M
Post Max Size: 8M
Upload Max Filesize: 2M
Time Limit: 120
Max Input Vars: 1000
URL-aware fopen: On (1)
Display Errors: N/A

#### PHP Extensions

OPcache: Zend
XDebug: Disabled
cURL: Supported
cURL Version: 7.68.0
imagick: Installed
xsl: Installed

In case anyone else encounter this issue - I believe this was actually a DNS issue, in that I was working on a dev site that was using my local configuration to point to the domain until I was ready to fully migrate the site. Once I switched the DNS over, I encountered the error described here:

Which I then resolved by downloading the recommended version of Saxonhe (9.7.0.10J) and placing it in my /usr/share/java folder, and pointing to that version of saxonhe.jar in my wp-config file.

Good luck everyone! :slight_smile:

1 Like