Pressbooks 5.0 Testing Issue

In upgrading to Pressbooks 5.0, something appears to be amiss for me. I’ve installed the beta releases PB 5.0, Pressbooks Book 2.0, Aldine 1.0, as well as the Luther 1.8 theme. My main network page works fine, but none of the existing books are accessible (either at their URLs or from the book dashboards)–I get a HTTP ERROR 500. I’ve checked the logs and see this PHP error message: PHP Warning: Invalid argument supplied for foreach() in /var/www/wisc-dev/wordpress/wp-admin/includes/plugin.php on line 1432, referer: https://wisc-dev.pb.unizin.org/wp-admin/themes.php. I suspect that I may have done something mistakenly in my upgrade, but don’t know where to find installation instructions for Pressbooks 5.0 to check against my process.

Did you download the pressbooks-book ZIP file or install using composer?

It looks like its broken and will need to be repackaged. (Current issue: https://github.com/pressbooks/pressbooks/issues/1078 )

Please install using composer or wait until we package a new version. (might take a couple of days, sorry.)

I used the zip. What’s the composer command for this release (I’m not as skilled with composer yet)?

From within your WordPress root directory, run:

composer require pressbooks/pressbooks-book

1 Like

Thanks @colomet and @dac.chartrand–deleting the theme and installing with composer fixed it for me.

I can not delete… I get Permission denied :flushed:

I also tried to install with composer. It works, but the pressbooks-book version 1.2 (Luther) gets installed and not 2.0.0-beta.1 (McLuhan). How can I force composer to install the beta of pressbooks-book?

This is what composer logs on the command-line during install:

php composer require pressbooks/pressbooks-book
Using version ^1.12 for pressbooks/pressbooks-book
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals

  • Installing pressbooks/pressbooks-book (1.12.0): Downloading (100%)
    Writing lock file
    Generating autoload files

Delete the composer.lock file. Add :version at the end like:

php composer require pressbooks/pressbooks-book:2.0.0-beta.1

Or to get the latest development branch:

php composer require pressbooks/pressbooks-book:dev-dev

More info: http://kizu514.com/blog/php-composer-for-developers/

I’m not sure I can help with this.

Fix your permissions? sudo ?

is not possible to install PB themes and plugins without composer?

It is possible, but Dac’s instructions were for Thomas who was trying to use Composer and having issues with the process.

because i´m having some problems updating.

I will delete all themes and I will try again.

Do I just need pressbooks-book and Aldine themes?

You need Pressbooks Book and Aldine. If you want any other themes you can install them.

1 Like

I can not save Two-level TOC activate. I try and the checkbox is always empty.

Just tested this and it works properly for me.

It was some plugin compatibility, maybe. Now i´m testing in a place with as few plugins as possible (information in the end of the message):

Each time I try to create a new book, I receive that warming

I can see the cover page, but I can not to se the admin page

Also the information about how to create the title of a book is not the same. In one place we can have hyphens and in the other place we can not…

44

System Information

Root Blog Info

Root Blog ID: 1
Root Blog URL: http://pressbooks.lvps84-39-103-248.mammuts-servidor.es/

Browser

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

WordPress Configuration

Network URL: http://pressbooks.lvps84-39-103-248.mammuts-servidor.es/
Network Type: Subdirectory
Version: 4.9.4
Language: en_US
WP_ENV: Not set
WP_DEBUG: Enabled
Memory Limit: 64M

Pressbooks Configuration

Version: 5.0.0-rc.1
Root Theme: Aldine
Root Theme Version: 1.0.0-RC.2

Pressbooks Dependencies

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

Must-Use Plugins

hm-autoloader.php: n/a

Network Active Plugins

Pressbooks: 5.0.0-rc.1
Wordfence Security: 7.0.5

Root Blog Active Plugins

Inactive Plugins

Pressbooks mPDF: 3.0.0
Pressbooks Textbook: 3.1.6

Server Configuration

PHP Version: 7.0.27
MySQL Version: 5.5.59
Webserver Info: Apache

PHP Configuration

Safe Mode: Disabled
Memory Limit: 256M
Upload Max Size: 2M
Post Max Size: 8M
Upload Max Filesize: 2M
Time Limit: 30
Max Input Vars: 1000
URL-aware fopen: On (1)
Display Errors: On (1)

PHP Extensions

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

We just removed this: Remove root theme check. · pressbooks/pressbooks@151d70b · GitHub

1 Like

From the code comment:

To bypass this check, define PB_ROOT_THEME to the name of your custom root theme in wp-config.php.

So:

define('PB_ROOT_THEME', 'pressbooks-aldine' );`

In your wp-config should fix your existing version.

Updating to dev branch is preferable.

1 Like

theme book: the TOC is over the Previous section buttom

42