Post by mcoates » Sun Dec 03, 2023 7:56 pm

Hi all,

Currently having issues with opencart with version 1.5.1. the issues are as below when logging into the admin area. Front end appears to be working fine.

[03-Dec-2023 11:43:35 UTC] PHP Fatal error: Uncaught Error: Call to a member function calculate() on null in /home/eulights/public_html/catalog/controller/module/bestseller.php:26
Stack trace:
#0 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_controller.php(44): ControllerModuleBestSeller->index(Array)
#1 /home/eulights/public_html/catalog/controller/common/column_left.php(72): Controller->getChild('module/bestsell...', Array)
#2 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_controller.php(44): ControllerCommonColumnLeft->index(Array)
#3 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_controller.php(55): Controller->getChild('common/column_l...')
#4 /home/eulights/public_html/catalog/controller/error/not_found.php(49): Controller->render()
#5 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_front.php(47): ControllerErrorNotFound->index()
#6 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_front.php(29): Front->execute('')
#7 /home/eulights/public_html/admin/index.php(164): Front->dispatch(Object(A in /home/eulights/public_html/catalog/controller/module/bestseller.php on line 26

When PHP errors are turned off the page viewed is the Error 500 page.

The website has recently been migrated to a new server and is now running on PHP 7.4 with the MYSQL updated to MYSQLI.

VQMOD has been updated to the latest version although this has made no difference to the errors shown

I have also seen other posts to clear the VQMOD cache files which has been done as well as server cache and browser cache.

All core files have also been refreshed with the OC 1.5 files to ensure they have no issues in there.

Malware scan has been done and found a few although they were in the Download directory looking like "images" and have been removed although the errors was the same before and after the removal.

More information can be provided if needed if it helps get this issue sorted :)

Thanks in advance :)

Newbie

Posts

Joined
Sun Dec 03, 2023 7:49 pm

Post by mcoates » Sun Dec 03, 2023 8:16 pm

UPDATE!! when reverted to PHP 5.6 it only shows this error

Fatal error: Call to a member function calculate() on null in /home/eulights/public_html/catalog/controller/module/bestseller.php on line 26
Last edited by mcoates on Sun Dec 03, 2023 9:28 pm, edited 1 time in total.

Newbie

Posts

Joined
Sun Dec 03, 2023 7:49 pm

Post by johnp » Mon Dec 04, 2023 1:34 am

mcoates wrote:
Sun Dec 03, 2023 8:16 pm
UPDATE!! when reverted to PHP 5.6 it only shows this error

Fatal error: Call to a member function calculate() on null in /home/eulights/public_html/catalog/controller/module/bestseller.php on line 26
PHP 5.6 is depreciated. You need to use PHP 7.4 or preferably PHP 8. Ideally you need to upgrade to a newer version of Opencart or to buy yourself time upgrade to a version of Opencart 1.5 that runs on PHP 7.4.

I personally would use this:

https://github.com/IP-CAM/Opencart-v.1. ... stallation

Long term a newer version is your best option IMO.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by mcoates » Mon Dec 04, 2023 3:01 am

johnp wrote:
Mon Dec 04, 2023 1:34 am

PHP 5.6 is depreciated. You need to use PHP 7.4 or preferably PHP 8. Ideally you need to upgrade to a newer version of Opencart or to buy yourself time upgrade to a version of Opencart 1.5 that runs on PHP 7.4.

I personally would use this:

https://github.com/IP-CAM/Opencart-v.1. ... stallation

Long term a newer version is your best option IMO.
Hi, Its currently running on PHP 7.4 which comes up with the long list of errors on the first message. To save scrolling ill paste them below :)

PHP Fatal error: Uncaught Error: Call to a member function calculate() on null in /home/eulights/public_html/catalog/controller/module/bestseller.php:26
Stack trace:
#0 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_controller.php(44): ControllerModuleBestSeller->index(Array)
#1 /home/eulights/public_html/catalog/controller/common/column_left.php(72): Controller->getChild('module/bestsell...', Array)
#2 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_controller.php(44): ControllerCommonColumnLeft->index(Array)
#3 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_controller.php(55): Controller->getChild('common/column_l...')
#4 /home/eulights/public_html/catalog/controller/error/not_found.php(49): Controller->render()
#5 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_front.php(47): ControllerErrorNotFound->index()
#6 /home/eulights/public_html/vqmod/vqcache/vq2-system_engine_front.php(29): Front->execute('')
#7 /home/eulights/public_html/admin/index.php(164): Front->dispatch(Object(A in /home/eulights/public_html/catalog/controller/module/bestseller.php on line 26

Newbie

Posts

Joined
Sun Dec 03, 2023 7:49 pm

Post by ADD Creative » Mon Dec 04, 2023 6:39 am

That looks just like the same error, but your PHP 7.4 is configured to display more information about errors.

Try disabling you vQmods one by one.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by mcoates » Mon Dec 04, 2023 5:57 pm

ADD Creative wrote:
Mon Dec 04, 2023 6:39 am
That looks just like the same error, but your PHP 7.4 is configured to display more information about errors.

Try disabling you vQmods one by one.
I have done this via the database after searching how to do this as i dont have access to the admin area and has now produced another error

Code: Select all

Fatal error: Call to a member function isLogged() on null in /home/eulights/public_html/catalog/model/catalog/product.php on line 27

Newbie

Posts

Joined
Sun Dec 03, 2023 7:49 pm

Post by ADD Creative » Mon Dec 04, 2023 6:53 pm

Check both the PHP and OpenCart error logs for any other errors. Also check you're not missing any files.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by mcoates » Mon Dec 04, 2023 7:13 pm

ADD Creative wrote:
Mon Dec 04, 2023 6:53 pm
Check both the PHP and OpenCart error logs for any other errors. Also check you're not missing any files.
I have just checked these and both are clear only historic errors from before upgrading DB to use mysqli from mysql

Newbie

Posts

Joined
Sun Dec 03, 2023 7:49 pm

Post by ADD Creative » Mon Dec 04, 2023 8:26 pm

Did you check for any missing files by comparing your files on the server to a known working backup or a clean download?

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by mcoates » Mon Dec 04, 2023 8:43 pm

ADD Creative wrote:
Mon Dec 04, 2023 8:26 pm
Did you check for any missing files by comparing your files on the server to a known working backup or a clean download?
ive not done this as their previous host does not make backups as its the customers responsibility to make them and the only backup they have is the dodgy version i have and the one before that was 2017 :-[

Newbie

Posts

Joined
Sun Dec 03, 2023 7:49 pm

Post by johnp » Mon Dec 04, 2023 10:25 pm

Personally I would clone your database and site files into /clone. Then upload 1.5.6.5 and run the upgrade script and see if your site comes back to life. Explore and test on the cloned version until you find a solution.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by mcoates » Mon Dec 04, 2023 10:41 pm

johnp wrote:
Mon Dec 04, 2023 10:25 pm
Personally I would clone your database and site files into /clone. Then upload 1.5.6.5 and run the upgrade script and see if your site comes back to life. Explore and test on the cloned version until you find a solution.
I tried to do this in the /clone as mentioned and got these errors after inputting the database information


Fatal error: Uncaught exception 'ErrorException' with message 'Error: Table 'oc_product_profile' already exists<br />Error No: 1050<br /> CREATE TABLE `oc_product_profile` ( `product_id` int(11) NOT NULL, `profile_id` int(11) NOT NULL, `customer_group_id` int(11) NOT NULL, PRIMARY KEY (`product_id`,`profile_id`,`customer_group_id`) ) ENGINE=MyISAM COLLATE=utf8_general_ci; ' in /home/eulights/public_html/clone/system/database/mysqli.php:41 Stack trace: #0 /home/eulights/public_html/clone/system/library/db.php(20): DBMySQLi->query('\nCREATE TABLE `...')
#1 /home/eulights/public_html/clone/install/model/install.php(26): DB->query('\nCREATE TABLE `...')
#2 /home/eulights/public_html/clone/install/controller/step_3.php(9): ModelInstall->database(Array)
#3 [internal function]: ControllerStep3->index()
#4 /home/eulights/public_html/clone/system/engine/front.php(42): call_user_func_array(Array, Array)
#5 /home/eulights/public_html/clone/system/engine/front.php(29): Front->execute(Object(Action))
#6 /home/eulights/public_h in /home/eulights/public_html/clone/system/database/mysqli.php on line 41

The username and password for the database was correct at the time and it was a fresh clean database.

Newbie

Posts

Joined
Sun Dec 03, 2023 7:49 pm

Post by johnp » Mon Dec 04, 2023 10:46 pm

Try uploading 1.5.6.5_rc in to the cloned site and run the install script which will upgrade the cloned database. Make sure you have adjusted the config.php and admin/config.php files in the clone folder to reflect the new folder location and cloned database. It's trial and error. There is no guaranteed solution.

https://github.com/IP-CAM/Opencart-v.1. ... stallation

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by paulfeakins » Mon Dec 04, 2023 10:50 pm

mcoates wrote:
Mon Dec 04, 2023 5:57 pm
I have done this via the database
Nope you can't disable vQmods via the database, they are xml files in the folder "vqmod/xml"

You can disable them by adding _ to the extension e.g. changing .xml to .xml_

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by mcoates » Mon Dec 04, 2023 11:18 pm

paulfeakins wrote:
Mon Dec 04, 2023 10:50 pm
mcoates wrote:
Mon Dec 04, 2023 5:57 pm
I have done this via the database
Nope you can't disable vQmods via the database, they are xml files in the folder "vqmod/xml"

You can disable them by adding _ to the extension e.g. changing .xml to .xml_
unfortunately this has had no change even after i reverted the DB to include the what i thought was the mod

Newbie

Posts

Joined
Sun Dec 03, 2023 7:49 pm

Post by johnp » Mon Dec 04, 2023 11:27 pm

I think you might need a bit of assistance on this one.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by mcoates » Mon Dec 04, 2023 11:29 pm

johnp wrote:
Mon Dec 04, 2023 10:46 pm
Try uploading 1.5.6.5_rc in to the cloned site and run the install script which will upgrade the cloned database. Make sure you have adjusted the config.php and admin/config.php files in the clone folder to reflect the new folder location and cloned database. It's trial and error. There is no guaranteed solution.

https://github.com/IP-CAM/Opencart-v.1. ... stallation
so the update completed although then on the clone site it was the white screen for the front end and admin login page. when pressing f12 (inspect) there was no errors there.

I checked the php error log and nothing was reported, i checked the open cart and it said it cannot load a module to i commented this part out and the front end loaded fine although the admin area popped up with the PHP error of this one again....

Code: Select all

Fatal error: Call to a member function isLogged() on null in /home/eulights/public_html/clone/catalog/model/catalog/product.php on line 319

Newbie

Posts

Joined
Sun Dec 03, 2023 7:49 pm

Post by ADD Creative » Tue Dec 05, 2023 12:02 am

mcoates wrote:
Mon Dec 04, 2023 11:29 pm
I checked the php error log and nothing was reported, i checked the open cart and it said it cannot load a module to i commented this part out and the front end loaded fine although the admin area popped up with the PHP error of this one again....

Code: Select all

Fatal error: Call to a member function isLogged() on null in /home/eulights/public_html/clone/catalog/model/catalog/product.php on line 319
What did you comment out?

What is strange is that error is on the catalog part and not the admin.

Looking back at your posts, where the stack trace suggests your admin/index.php is trying to call a controller in the catalogue! Which is what is causing the errror.
#7 /home/eulights/public_html/admin/index.php(164): Front->dispatch(Object(A in /home/eulights/public_html/catalog/controller/module/bestseller.php on line 26
This just wouldn't be the case on a standard install of OpenCart.

As johnp suggested, you probably want to get someone to take a look fo you.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by johnp » Tue Dec 05, 2023 12:06 am

mcoates wrote:
Mon Dec 04, 2023 11:29 pm
johnp wrote:
Mon Dec 04, 2023 10:46 pm
Try uploading 1.5.6.5_rc in to the cloned site and run the install script which will upgrade the cloned database. Make sure you have adjusted the config.php and admin/config.php files in the clone folder to reflect the new folder location and cloned database. It's trial and error. There is no guaranteed solution.

https://github.com/IP-CAM/Opencart-v.1. ... stallation
so the update completed although then on the clone site it was the white screen for the front end and admin login page. when pressing f12 (inspect) there was no errors there.

I checked the php error log and nothing was reported, i checked the open cart and it said it cannot load a module to i commented this part out and the front end loaded fine although the admin area popped up with the PHP error of this one again....

Code: Select all

Fatal error: Call to a member function isLogged() on null in /home/eulights/public_html/clone/catalog/model/catalog/product.php on line 319
Double check your config.php and admin/config.php paths. Disable all vqmods via ftp. Clear your vqmod cache.

Feel free to PM me both config files and I'll take a look for you.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by ocguru » Tue Dec 05, 2023 1:44 pm

Hi,
It seems your $this->customer->isLogged() has some issue, calling on null. Please PM me the details to check on your website.

Regards,
OCGURU - http://www.buy-extensions.com/
Opencart Developer - All My Opencart Extensions
Contact Me - outputwebtech@gmail.com
Skype - ntiersolutions


User avatar
New member

Posts

Joined
Sat Jan 03, 2015 5:09 pm
Location - India
Who is online

Users browsing this forum: No registered users and 10 guests