Hello,

Upgrading to 1.32.0, I get an error during update.php process :

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'my-site.cache_book' doesn't exist: TRUNCATE {cache_book} ; Array ( )

It never happened before.

The website seems to work fine after upgrading. If I run the update.php process again, it says "No pending updates. All caches cleared" but it displays the error message again.

I restored yesterday's daily backup of the site and ran the upgrade again, reproducing the same error.

How can I solve the problem ?

Thanks in advance.

Versions

  • Debian 12
  • Apache  2.4.65
  • PHP  8.4.13
  • Backdrop CMS 1.32.0

Modules

  • Global Redirect 1.x-1.6.0
  • Mail System 1.x-3.0.8
  • Metatag 1.x-1.22.7
  • Mime Mail 1.x-1.1.8
  • Site Map 1.x-1.3.1
  • XML sitemap 1.x-1.0.11

Accepted answer

@Kali - there is a new release out that should fix it.

Comments

If you want to try to fix it yourself now, I think you can manually set the schema version for the book module (in the system table) to 7000, and then try running the updates again. Test on a dev site first. 

Until the official new release (coming soon), the error will ALSO show up when you clear caches, unless you fix this manually as above.

Thank you very much for your fast answers and clear explanations !

I understand that the site is not corrupted and that there is no danger in leaving the code and the database in their state.

Since I'm not comfortable with updating manually the system table, I'll wait for the fix, in the next release.

@Kali - there is a new release out that should fix it.

Thank you very much for letting me know!

Upgrading to the new version worked like a charm :)

themetman's picture

I have this problem on one site upgrading from 1.32.1 to 1.33.1

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tbdproddb.cache_book' doesn't exist: TRUNCATE {cache_book} ; Array ( )

I have 5 sites several use the Book Module, but only one throws this error after the upgrade when running the core/update.php and when clearing the caches using Bee.

Everything seems to be working OK, I am a bit nervous to make manual changes.

 

 

Interesting. Sounds like maybe an update hook hasn't completely worked for some reason.

When you check the status report, where with 1.33+ you will now see updates to run (this is calculated differently from on core/update.php), what do you see there?

themetman's picture

Hi @yorkshirepudding, On the Status Page near the bottom the 'Site Updates' says 'Up to Date'. Is that what you wanted?

I am on php 8.3.3 by the way.

themetman's picture

The user should be able to create tables.

I cannot see that table in the database using mysql from the command line:

SHOW TABLES;

Looking at another table the cache_book tabe is there, so I could create one manually then.

 

themetman's picture

I could copy the create command from another site's database backup and used that.

In fact the create tabe is in the backup so I do not understand why the table was not created when it was imported.
Very odd

I will try importing the database again and see if it works

themetman's picture

That fixed it, must have been something odd when the database was imported.

Good to hear you have sorted it. We haven't seen anything similar, so hopefully that is a one off.

themetman's picture

I hope so too....
Thanks very much for the quick response, and have a Happy and productive 2026!!