#1 December 11, 2017 4:19pm

webmaster
Member
From: Virginia
Registered: December 11, 2017
Posts: 6
Website

Upgrading BigTreeCMS

We are currently using BigTreeCMS 4.0.7 and would like to upgrade to the current version without losing our content. Could anyone help us out by explaining the steps to do this? Also if anyone knows, what version(s) of PHP is BigTreeCMS 4.0.7 compatible with? The reason I ask is because our server is using PHP 7 and I wanted to know could our current version of 4.0.7 run on that?

Last edited by webmaster (December 11, 2017 4:24pm)

Offline

#2 December 11, 2017 10:42pm

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

Re: Upgrading BigTreeCMS

To run on PHP 7 (which had backwards compatibility breaks with 5.x) you'll need to upgrade to the 4.2 branch of BigTree (which has full PHP 7+ support). It should be a smooth upgrade but it's been a while since I personally did one so I'd recommend doing a test upgrade before deploying on live. The one thing to note is that "Array of Items" field types become "Matrix" in 4.2 and will need to be re-saved in the back-end in order to generate their admin-side titles. Front end shouldn't be affected.

Offline

#3 December 13, 2017 3:02pm

webmaster
Member
From: Virginia
Registered: December 11, 2017
Posts: 6
Website

Re: Upgrading BigTreeCMS

Thanks tim that makes sense, I have seen your post of upgrading from 4.0 to 4.1, is the steps for upgrading directly from 4.0 to 4.2 the same?

Offline

#4 December 13, 2017 3:02pm

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

Re: Upgrading BigTreeCMS

Yes, I believe the steps should be the same!

Offline

#5 December 15, 2017 2:04pm

webmaster
Member
From: Virginia
Registered: December 11, 2017
Posts: 6
Website

Re: Upgrading BigTreeCMS

Is there a reason the BigTreeCMSBase class can't be found in bootstrap.php? Thats the error I'm getting when I try to follow the steps listed in your upgrade manual.

Fatal error: Class 'BigTreeCMSBase' not found in line 65.

Offline

#6 December 15, 2017 2:05pm

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

Re: Upgrading BigTreeCMS

It sounds like you may have a custom override of the core CMS class, this may help!
https://www.bigtreecms.org/developers/d … ding-core/

Offline

#7 April 2, 2020 12:02pm

webmaster
Member
From: Virginia
Registered: December 11, 2017
Posts: 6
Website

Re: Upgrading BigTreeCMS

Hi Tim,

Sorry for the long delay in following up here - the old webmaster apparently thought it too much trouble to pursue this further. I took over a few months ago and would like to continue the upgrade as we are phasing out all PHP5.x applications.

In /templates/config.php, the custom base classes are set to false, yet we have a custom folder with the following folders:

  • admin

  • inc

  • PHPMailer

  • vendor

I have grepped for

BIGTREE_CUSTOM_BASE_CLASS

and

BIGTREE_CUSTOM_ADMIN_CLASS

and can't find any other declarations of those constants, so I am not sure if the base class is actually being overridden. What I should check next?

Thanks,
Scott

Offline

#8 April 3, 2020 9:13am

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

Re: Upgrading BigTreeCMS

Since this looks like an older CMS (given config is in /templates/config.php rather than /custom/environment.php and /custom/settings.php) it's possible the CMS overrides are actually just overwriting the base files. Do you a /custom/inc/bigtree/ folder? If so there might be a cms.php file in that folder that's overriding the main BigTreeCMS class. In newer versions of BigTree, that file actually creates BigTreeCMSBase so that it can be extended rather than directly creating BigTreeCMS.

Offline

#9 April 3, 2020 11:14am

webmaster
Member
From: Virginia
Registered: December 11, 2017
Posts: 6
Website

Re: Upgrading BigTreeCMS

timbuckingham wrote:

Do you have a /custom/inc/bigtree/ folder? If so there might be a cms.php file in that folder that's overriding the main BigTreeCMS class.

That is indeed exactly the case, thank you for pointing me in the right direction. It looks like there are only a handful of overrides with a few minor additions to the code:

  • BigTreePaymentGateway

  • BigTreeCMS

  • BigTreeModule

- The changes to the payment gateway are no longer necessary as we are only keeping this site around for archival purposes and the payment gateway can be disabled.
- The only change to BigTreeCMS is the urlify() function now removes periods:

$title = strtolower(preg_replace('/\s/', '-',preg_replace('/[^a-zA-Z0-9\s\-\_]+/', '',trim($title))));

is now

$title = strtolower(preg_replace('/\s/', '-',preg_replace('/[^a-zA-Z0-9\s\-\_\.]+/', '',trim($title))));

I'm not sure why that was added but I think it's safe to drop it.

- The BigTreeModule override might be a bit trickier - it looks like the previous dev added a relationship function for a custom module:

getManyToMany($parent, $relation, $sort ='joinTable')

Should I just be able to copy modules.php from v4.2 to the custom/inc/bigtree folder and drop that function in?

Offline

#10 April 3, 2020 11:16am

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

Re: Upgrading BigTreeCMS

You're likely fine with leaving in the override for BigTreeModule since that class is strictly used for front end logic display which shouldn't change at all.

Offline

#11 April 3, 2020 11:17am

webmaster
Member
From: Virginia
Registered: December 11, 2017
Posts: 6
Website

Re: Upgrading BigTreeCMS

Excellent, thank you.

EDIT: Worked like a charm. Thanks very much.

Last edited by webmaster (April 3, 2020 11:20am)

Offline

Board footer

Powered by FluxBB

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