Post by sbillis » Sat Aug 31, 2019 11:33 pm

Hello there.

I am getting this error (only) at Error Log :

Code: Select all

2019-08-31 15:20:16 - PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/*folder*/public_html/mysitename.com/Journal_Folder/system/library/template/Twig/Node/Module.php on line 346
I am using Opencart 3.0.3.2 with Journal 3.0.38 and PHP 7.3
I try to change PHP version to 7.2 & 7.1 but I get error HTML error 500

Anyone suggestions ?

With this error, site seems to work fine. I just don't know what kind of job is doing this module.
If anyone knows please let me know about it.

Thanks
Last edited by straightlight on Sun Feb 02, 2020 2:46 am, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Tue Mar 26, 2019 10:42 pm

Post by cyclops12 » Sat Aug 31, 2019 11:50 pm

Best to ask Journal

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by sbillis » Sat Aug 31, 2019 11:55 pm

Journal recomments to change PHP version to 7.1

Newbie

Posts

Joined
Tue Mar 26, 2019 10:42 pm

Post by head_dunce » Wed Nov 27, 2019 4:25 am

Change line 346 in this file -
/var/www/html/system/library/template/Twig/Node/Module.php

Code: Select all

    346                 #if (!count($node)) {
    347                 if (is_null($node)) {

Jim
https://www.carguygarage.com
Yahoo Store since 2006 moved to OpenCart on January 24, 2020


Active Member

Posts

Joined
Thu Apr 04, 2019 11:50 pm

Post by tingwing » Sun Dec 08, 2019 3:05 pm

I have tried the following modification,but not work.

/var/www/html/system/library/template/Twig/Node/Module.php

Code: Select all

 346                 #if (!count($node)) {
 347                 if (is_null($node)) {
 
Last edited by straightlight on Sun Feb 02, 2020 2:46 am, edited 1 time in total.
Reason: Added code tags.

my extension:https://www.opencart.com/index.php?rout ... estshop24h
email :support@bestshop24h.com
site:http://www.bestshop24h.com


Active Member

Posts

Joined
Tue Aug 02, 2016 9:01 pm

Post by tingwing » Sun Dec 08, 2019 3:27 pm

the solution is :

Code: Select all

ALTER TABLE oc_product_advertise_google CHANGE product_advertise_google_id product_advertise_google_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT;
Last edited by straightlight on Sun Feb 02, 2020 2:45 am, edited 1 time in total.
Reason: Added code tags.

my extension:https://www.opencart.com/index.php?rout ... estshop24h
email :support@bestshop24h.com
site:http://www.bestshop24h.com


Active Member

Posts

Joined
Tue Aug 02, 2016 9:01 pm

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by tingwing » Sun Dec 08, 2019 9:44 pm

at backend,if you come across the following problem,the above answer is the solution too.
add a product ,and click "save",and the it show "500" error,at error.log ,you will see the error details "PHP Warning: count(): Parameter must be an array or an object that implements Countable in /system/library/template/Twig/Node/Module.php
"

my extension:https://www.opencart.com/index.php?rout ... estshop24h
email :support@bestshop24h.com
site:http://www.bestshop24h.com


Active Member

Posts

Joined
Tue Aug 02, 2016 9:01 pm

Post by matmeer » Sun Feb 02, 2020 2:25 am

I have succeeded with this. But my php is 7.2

Code: Select all

 346                //if (!count($node)) {
 347                 if (is_null($node)) {
 
tingwing wrote:
Sun Dec 08, 2019 3:05 pm
I have tried the following modification,but not work.

/var/www/html/system/library/template/Twig/Node/Module.php

Code: Select all

 346                 #if (!count($node)) {
 347                 if (is_null($node)) {
 
Last edited by straightlight on Sun Feb 02, 2020 2:50 am, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Sun Feb 02, 2020 2:22 am

Post by DesignCart » Wed Apr 29, 2020 5:11 pm

Code: Select all

 346                //if (!count($node)) {
 347                 if (is_null($node)) {
 
This solution makes it impossible to use the template settings on the administrator's side.

Code: Select all

 346                //if (!count($node)) {
 347                if (!isset($node) OR !count($node)) {
 
This change in the code completely solved the problem.

my website: Tworzenie sklepu internetowego Opencart


User avatar
New member

Posts

Joined
Thu Nov 10, 2016 2:06 pm
Location - Gubin
Who is online

Users browsing this forum: No registered users and 8 guests