#1 December 18, 2018 10:56am

doon.mok
Member
Registered: May 6, 2015
Posts: 144

4.2.24 to 4.3.2 not upgrading

We have a few websites that are using different servers and when trying to upgrade to 4.3.2 locally on MAMP, one website automatically upgrades when copying over the core file. The other website doesn't seem to upgrade at all and gives me an error like it is already upgraded.

This is the error I'm getting
Fatal error: SQL::fetch called on invalid query resource. The most likely cause is an invalid query call. Last error returned was: Table 'discover_bigtree_hpec.bigtree_open_graph' doesn't exist in C:\MAMP\htdocs\hpec\core\inc\bigtree\sql-class.php on line 913

Before copying over the core folder, I checked my $current_revision was 211 and my admin level was 2, so it should go to the upgrade/scripts folder

$current_revision = $cms->getSetting("bigtree-internal-revision");
	if ($current_revision < BIGTREE_REVISION && $admin->Level > 1) {
		BigTree::redirect(DEVELOPER_ROOT."upgrade/scripts/");
	}

Not sure why one website is upgrading and the other is not.

Offline

#2 December 19, 2018 10:05am

doon.mok
Member
Registered: May 6, 2015
Posts: 144

Re: 4.2.24 to 4.3.2 not upgrading

I pinpointed the issue but not sure why it is not working. The getPage() is causing the error in my  custom/inc/required/_boot.php file

$bigtree["hpec"]["home_page"]   = $cms->getPage(0);
$bigtree["hpec"]["site_title"]  = $bigtree["hpec"]["home_page"]["title"];

I have another website that is using the same getPage(0)  in _boot.php without any issues.

Offline

#3 December 20, 2018 4:51pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: 4.2.24 to 4.3.2 not upgrading

I've run into this in a few instances where a health check fails due to getPage choking on not having open graph table in place prior to running the dev side upgrade. I'm going to look into fixing this to be tolerant of the lack of the bigtree_open_graph table so that the site boots prior to having the developer section run database updates.

Offline

#4 December 20, 2018 5:11pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: 4.2.24 to 4.3.2 not upgrading

I just pushed a change to 4.3-devel to help with this. It should now be fault tolerant on the front end when bigtree_open_graph is missing (prior to upgrading the database). It also overall will allow you to try / catch queries within the SQL class which could be helpful.

https://github.com/bigtreecms/BigTree-C … 713dd74a73

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.