Jump to content

Error: Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'page_path_history.language_id' in 'field list' (in wire/modules/PagePathHistory.module line 752)


JeevanisM
 Share

Recommended Posts

Hi,

I have installed 1 year old project backup into the new latest PW version. I used an earlier backup(taken in August 2020) and installed such as :

  • 1. I downloaded the latest (ProcessWire 3.0.185 dev © 2021) then extracted into htdocs
  • 2. copy pasted the site-profile from my backup. (this has the files/folders same as other site profiles, classic, beginner etc)
  • 3. I chose my backup site profile and installed
  • 4. I am able to login the admin panel 
  • 5. My fronted home page shows error as below 
Error: Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'page_path_history.language_id' in 'field list' (in wire/modules/PagePathHistory.module line 752)

#0 wire/modules/PagePathHistory.module (752): PDOStatement->execute()
#1 wire/core/PagesPathFinder.php (1014): PagePathHistory->getPathInfo('/', Array)
#2 wire/core/PagesPathFinder.php (222): PagesPathFinder->getPathHistory('/')
#3 wire/core/PagesRequest.php (255): PagesPathFinder->get('/', Array)
#4 wire/core/Wire.php (414): PagesRequest->___getPage()
#5 wire/core/WireHooks.php (951): Wire->_callMethod('___getPage', Array)
#6 wire/core/Wire.php (485): WireHooks->runHooks(Object(PagesRequest), 'getPage', Array)
#7 wire/modules/Process/ProcessPageView.module (10

This error message was shown because: you are logged in as a Superuser. Error has been logged.


 
so I removed the line where its selecting language_id from the file wire/modules/PagePathHistory.module line 752

But this is an ugly fix, so is there any other proper fix for this issue ? Does any one experience same issue when trying to install from a backup site profile ? 

image.png.55c52f857099ad93f4c4f4e1a7a421d5.png

 


 
 thanks

 

Link to comment
Share on other sites

That's strange. Somewhere along the way, PagePathHistory::__upgrade should have been triggered and added that column. The language_id column was introduced with version 2 of the module, shortly before PW was moved to the new GitHub repo in 2016. There was an identical issue mentioned back then, and Ryan added a self-healing fix in PagePathHistory::getPath, but it looks like he took that out after a few years. You can, however, add that column manually to get rid of the error and put the language_id back into the select:

ALTER TABLE page_path_history ADD language_id INT UNSIGNED DEFAULT 0

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...