Database Error with Aldine 1.13 "get_institutions"

Hi everyone,

We are getting a fatal error that is crashing our /catalog page.

We are running the latest version of Pressbooks and Aldine. When I go to the logs, the thing that jumps out at me is that the error includes references to “get_institutions” which is a new feature in Pressbooks.

Our website is pressbooks.sunycreate.cloud, every other page is working as expected, except for pressbooks.sunycreate.cloud/catalog which shows a database error.

From my logs:
[08-Feb-2022 18:17:48 UTC] PHP Fatal error: Uncaught Error: Call to undefined function Pressbooks\Metadata\get_institutions() in /home/sunycreate/pressbooks.sunycreate.cloud/wp-content/themes/pressbooks-aldine/inc/helpers/namespace.php:161
Stack trace:
#0 /home/sunycreate/pressbooks.sunycreate.cloud/wp-content/themes/pressbooks-aldine/page-catalog.php(29): Aldine\Helpers\get_institutions()
#1 /home/sunycreate/pressbooks.sunycreate.cloud/wp-includes/template-loader.php(106): include(’/home/sunycreat…’)
#2 /home/sunycreate/pressbooks.sunycreate.cloud/wp-blog-header.php(19): require_once(’/home/sunycreat…’)
#3 /home/sunycreate/pressbooks.sunycreate.cloud/index.php(17): require(’/home/sunycreat…’)
#4 {main}
thrown in /home/sunycreate/pressbooks.sunycreate.cloud/wp-content/themes/pressbooks-aldine/inc/helpers/namespace.php on line 161

Thanks Ed – can you create a bug report that includes these logs and the output of your diagnostics page in https://github.com/pressbooks/pressbooks-aldine/issues? We have a bug scrub tomorrow morning, and can review it then if you’re able to create even a placeholder issue there for us?

I found the issue.

I hadn’t updated WordPress to WordPress 5.9. Because I hadn’t updated WordPress, Pressbooks never prompted me to update to Pressbooks 5.32.

So I was running the latest version of Aldine, with Pressbooks 5.31. The mismatch is what caused the error. I’m all set now. I am going to delete the github report.

1 Like

Thanks @beckej. I edited release notes for Aldine and McLuhan to add an upgrade notice so hopefully this doesn’t trip up others in the future.