You are not logged in.
Pages: 1
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
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
Yes, I believe the steps should be the same!
Offline
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
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
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
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
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
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
Pages: 1