AbanteCart Community

eCommerce construction => Installation and Configuration => Upgrade => Topic started by: dharding on August 09, 2020, 08:21:06 PM

Title: Best practice to upgrade from older version (1.2.12 to 1.2.16)?
Post by: dharding on August 09, 2020, 08:21:06 PM
Good evening,

I am still running 1.2.12 and would like to "get current" to 1.2.16. The current version was installed via Softaculous in cpanel.

Is it simply a matter of upgrading through Softaculous or is a fresh install required?

Obviously I want to retain all my products, categories, and settings.

I  know that manual edits I've made to php files will have to be manually re-edited.

Are there any best practices to make the upgrade less painful?

Thanks.

EDIT:

While I was waiting to see more, I cloned my existing storefront to a test subdomain, and started incrementally updating AbanteCart, from 2.12 to 2.13, 2.14, etc. Everything went fine until the last update from 2.15 to 2.16. Upon executing that update, all attempts to access the storefront or admin pages result in a server 500 error.

I'm running PHP 7.3.6.
Title: Re: Best practice to upgrade from older version (1.2.12 to 1.2.16)?
Post by: Basara on August 10, 2020, 01:43:00 AM
Please check the AbanteCart and server error log and post here the error
Title: Re: Best practice to upgrade from older version (1.2.12 to 1.2.16)?
Post by: dharding on August 10, 2020, 10:08:36 AM
Where would I find these logs? I don't see a "logs" section or icon in cpanel.
Title: Re: Best practice to upgrade from older version (1.2.12 to 1.2.16)?
Post by: Basara on August 11, 2020, 02:25:51 AM
Hello
AbanteCart error log (https://forum.abantecart.com/index.php/topic,834.msg3085.html#msg3085) in the file /system/logs/error.txt or Admin -> System -> Logs -> Error Log.
Title: Re: Best practice to upgrade from older version (1.2.12 to 1.2.16)?
Post by: dharding on August 11, 2020, 07:31:20 PM
Ok, error is the same as reported in this thread:

http://forum.abantecart.com/index.php/topic,8470.msg33660/topicseen.html#msg33660

I downloaded the new PaymentHandlerInterface.php that is linked in that thread, but the code is identical to what is already on the server.

Error:

Quote
[11-Aug-2020 23:27:21 UTC] PHP Parse error:  syntax error, unexpected ':', expecting ';' or '{' in /home/revenues/test/AbanteCart/core/lib/PaymentHandlerInterface.php on line 22


Code of file on server:

Quote
interface PaymentHandlerInterface
{

    public function id() : string;
    public function details() : array;

    public function is_available($payment_address) : bool;

    public function getErrors();

    public function processPayment(int $order_id, array $data = array()) : array;

    public function validatePaymentDetails(array $data) : array;

    public function callback(array $data = array());

}

I've uploaded the replacement file, copied and pasted in replacement code, all to no avail.
Title: Re: Best practice to upgrade from older version (1.2.12 to 1.2.16)?
Post by: abolabo on August 12, 2020, 03:08:26 AM
to solve just open file public_html/core/init.php
and remove these lines
Code: [Select]
    require_once(DIR_CORE.'lib/PaymentHandlerInterface.php');
    require_once(DIR_CORE.'lib/BasePaymentHandler.php');

Also check why init.php has been not changed during upgrade. Probably you have many errors in install/upgrade history related to file permissions.
Title: Re: Best practice to upgrade from older version (1.2.12 to 1.2.16)?
Post by: dharding on August 12, 2020, 07:39:21 AM
Quote
Also check why init.php has been not changed during upgrade.

What do you mean by this? How do I check "why" it hasn't changed? DO you mean check the file permissions of init.php or something else?

Quote
Probably you have many errors in install/upgrade history related to file permissions.

Where do I check this? The error log only shows the repeated messages given above, nothing else.

Thank you.
Title: Re: Best practice to upgrade from older version (1.2.12 to 1.2.16)?
Post by: abolabo on August 12, 2020, 10:10:45 AM
What do you mean by this? How do I check "why" it hasn't changed? DO you mean check the file permissions of init.php or something else?
I mean you should to compare your file with file in our repository  (https://github.com/abantecart/abantecart-src/blob/master/public_html/core/init.php)

Quote
Where do I check this? The error log only shows the repeated messages given above, nothing else.
Thank you.

Admin side menu-> System->Logs->Install/Upgrade History
Title: Re: Best practice to upgrade from older version (1.2.12 to 1.2.16)?
Post by: dharding on August 12, 2020, 10:21:47 PM
Removing those 2 lines in init.php did the trick. Also, I checked the Install/Upgrade history and everything was green, and no error messages that I could see.

Everything appears to be working fine.

Thank you.