Keyword

Advanced Search

Search Results (Searched for: countable error)

  • Hollo Robert
  • Hollo Robert's Avatar
24 Oct 2023 14:49

K2 v2.11 does not work on my lepesradio.hu website if I update to PHP8.2!

Category: English K2 Community

Hello!
Please help me!
I have already given up on the solution myself, please help me solve the problem!
I tried everything I could!
J3.10.12 all extensions, components, modules and plugins are the latest.
Installed:
Radio Wave template, K2 latest and error when I click on the k2 element on the page:
Still 0Error0
count(): Argument #1 ($value) must be of type Countable|array, null given
There is still no solution for this error!
At least in my case, because:
I tried everything I found here on the Joomla Works forum.
I rewrote the count in the php, as I think Fotis suggested, to if (isset), where I found a line related to count in the .php codes within the K2 component, but it did not solve the problem.
I downloaded the modified files for php 8 from the github site and replaced them, but nothing changed.
The error also occurs in PHP 8.0, PHP 8.1 and PHP 8.2.
In the case of PHP 7.4.33, the page does not throw an error, but PHP 7.4 has already become obsolete.
There is no problem with the template, because on PHP 8.0 it currently works perfectly on PHP 8.1 and PHP 8.2 without K2!
Please help, or we will eliminate this problem with a K2 update!
Thank you in advance for your quick answers!
I hope someone can solve this problem for me, because if not I will be forced to part with K2!
And I don't want that!
Thank you in advance and I look forward to your reply as soon as possible!
Best regards.: Robert
  • Tomas Salat
  • Tomas Salat's Avatar
01 Apr 2023 10:59
Replied by Tomas Salat on topic Articles return error 500 after changing php to 8.1

Articles return error 500 after changing php to 8.1

Category: English K2 Community

Hi,

I have installed the latest K2 v2.11.20230324, and tried to change the php to 8.1 (8.0 and 8.2 as well), and apart from an error about 0 count(): Argument #1 ($var) must be of type Countable|array, null given which was solvable, any article after clicking "read more" will return HTTP 500 error. The debug console will not show anything, and I have no idea why I cant access the articles/content.

any idea?

thx, tomas

 

It was caused by sigplus plugin since it was outdated, heh.
So, all good to for me on php 8.1.

tomas
  • Tomas Salat
  • Tomas Salat's Avatar
01 Apr 2023 10:35

Articles return error 500 after changing php to 8.1

Category: English K2 Community

Hi,

I have installed the latest K2 v2.11.20230324, and tried to change the php to 8.1 (8.0 and 8.2 as well), and apart from an error about 0 count(): Argument #1 ($var) must be of type Countable|array, null given which was solvable, any article after clicking "read more" will return HTTP 500 error. The debug console will not show anything, and I have no idea why I cant access the articles/content.

any idea?

thx, tomas
  • JoomlaWorks
  • JoomlaWorks's Avatar
07 Mar 2023 12:51

count(): Argument #1 ($value) must be of type Countable|array, string given

Category: English K2 Community

This comes from your template overrides for K2 most likely (if not some other extension loading there in K2)...

The fix is easy, e.g. something like this: www.joomlaworks.net/forum/k2-en/59481-error-message-after-upgrade-to-php8-0-fpm#178585
  • Uzi
  • Uzi's Avatar
22 Feb 2023 13:07

count(): Argument #1 ($value) must be of type Countable|array, string given

Category: English K2 Community

When I try to open the itemlist of a specific user I get the following error:

count(): Argument #1 ($value) must be of type Countable|array, string given

Anyone knwo how to fix this?
  • Vieru
  • Vieru's Avatar
20 Jan 2023 19:55 - 24 Jan 2023 20:16
Replied by Vieru on topic Error Message after upgrade to php8.0-fpm

Error Message after upgrade to php8.0-fpm

Category: English K2 Community

Hello.

after the last K2 upgrade, the following error appears:
0 count(): Argument #1 ($value) must be of type Countable|array, null given
/home/.../public_html/plugins/system/lscache/components/com_k2 . php:46

The error is only when saving and closing an article written in k2 or when clicking the close button.
When disabling the Litespeed plugin, the error disappears.

Last K2, Jomla 3, Litespeed plugin

What can be done?
  • MercurioWeb WebStudio
  • MercurioWeb WebStudio's Avatar
18 Jan 2023 20:51
Replied by MercurioWeb WebStudio on topic Error Message after upgrade to php8.0-fpm

Error Message after upgrade to php8.0-fpm

Category: English K2 Community

Hi, I update K2 installing the file downloaded from getk2.org/downloads/?f=K2_Rolling_Release.zip
but nothing change, in the blog page appear this error:

0 - count(): Argument #1 ($value) must be of type Countable|array, null given
  • Litho-Verlag e.K.
  • Litho-Verlag e.K.'s Avatar
16 Jan 2023 16:04
Replied by Litho-Verlag e.K. on topic K2 2.11 error link with SEF Url custom active

K2 2.11 error link with SEF Url custom active

Category: English K2 Community

And also K2 does not work with php 8.X
the category overlaps everything ok, only if you want to display the article comes:
0 - count(): Argument #1 ($value) must be of type Countable|array, null given
  • Jean-Marc VERDREL
  • Jean-Marc VERDREL's Avatar
10 Aug 2022 18:52 - 10 Aug 2022 18:52

count(): Parameter must be an array or an object that implements Countable

Category: English K2 Community

Hello,

I can't upgrade my site to version 8 of PHP.

This error is displayed in "development" debugging on my site (php 7.4) :

Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/--/---/htdocs/---/templates/ts_news247/html/com_k2/templates/default/item.php on line 311

Could this error be the cause? Do you have a solution ? Thanks

Regards
  • Claudio
  • Claudio's Avatar
27 Apr 2022 15:30
Template Kiji e PHP 8 was created by Claudio

Template Kiji e PHP 8

Category: Comunità italiana K2

Buongiorno a tutti.

Da alcuni mesi sto utilizzando la template Kiji.
Nel passaggio da PHP 7.4 a PHP 8 il sito va in crash restituendomi questo errore:

count(): Argument #1 ($var) must be of type Countable|array, string given

Il sito funziona perfettamente con le template di joomla 3.10.8 (Beez3 - Beez 5 - Protostar).

Qualcuno di voi ha avuto lo stesso problema e sa come risolverlo? Grazie mille.
  • Alfons Flatscher
  • Alfons Flatscher's Avatar
06 Apr 2021 12:27
Error Message after upgrade to php8.0-fpm was created by Alfons Flatscher

Error Message after upgrade to php8.0-fpm

Category: English K2 Community

We use K2 for our joomla website. After upgrading to php8.0-fpm (we run on nginx) we encountered issues. Whenever we open a K2-Item the following error message appears:
> 0 count(): Argument #1 ($var) must be of type Countable|array, null given
> It appears the page you were looking for doesn't exist. Sorry about that.

When opening other post created for examle with easyblog they display just fine.
Any ideas?
  • XochitlM
  • XochitlM's Avatar
17 Feb 2021 20:45
Warning: count(): Parameter was created by XochitlM

Warning: count(): Parameter

Category: DISQUS Comments for Joomla!

Please, will you help me?

I had been to access a Joomla site but It show this alert messages:

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/web_site/libraries/cms/application/cms.php on line 471

if (count($sessionQueue))

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/web_site/libraries/joomla/updater/updater.php on line 278

if (array_key_exists('update_sites', $update_result) && count($update_result))

Please, will you help to fix the error alert.

Thanks a lot, regards.
  • CPBA
  • CPBA's Avatar
08 Sep 2020 17:18

PHP Warning: count(): Parameter must be an array or an object that implements..

Category: Comunidad hispana oficial de K2

Hola, actualice la versión 2.10.3 de K2 y mirando el log de errores note estos PHP Warning recurrentes haciendo referencia a los archivos category.php y item.php del componente K2.
Podrían orientarme a que se puede deber esto?
Gracias

PHP Warning: count(): Parameter must be an array or an object that implements Countable in

Haciendo referencia

/var/www/html/xxxx/public_html/templates/gk_news/html/com_k2/templates/default/category.php on line 214

/var/www/html/xxxx/public_html/templates/gk_news/html/com_k2/templates/default/item.php on line 26
  • Angelin
  • Angelin's Avatar
14 Jun 2020 13:57
Problem with Warning: count was created by Angelin

Problem with Warning: count

Category: English K2 Community

Hello, I recently had this error in the categories and I can't find a solution how to remove it!

Warning: count(): Parameter must be an array or an object that implements Countable in /home/bgmaisto/public_html/templates/gk_storebox/html/com_k2/templates/default/category.php on line 191

bg-maistor.com/interior
bg-maistor.com/banya
bg-maistor.com/instrumenti-mashini

i used: K2 v2.10.3 / Joomla! 3.9.18

Thank you!
  • Dmitry Korobov
  • Dmitry Korobov's Avatar
29 Jan 2020 16:19

Warning: count(): Parameter must be an array or an object that implements Counta

Category: English K2 Community

How can i solve this error?

Warning: count(): Parameter must be an array or an object that implements Countable in C:\wamp64\www\templates\jf_taman\html\com_k2\portfolio\item.php on line 228
Call Stack
# Time Memory Function Location
1 0.0005 405360 {main}( ) ...\index.php:0
2 0.0588 1387112 Joomla\CMS\Application\SiteApplication->execute( ) ...\index.php:49
3 0.0588 1387112 Joomla\CMS\Application\SiteApplication->doExecute( ) ...\CMSApplication.php:196
4 0.1869 2812584 Joomla\CMS\Application\SiteApplication->dispatch( ) ...\SiteApplication.php:233
5 0.1875 2837296 Joomla\CMS\Component\ComponentHelper::renderComponent( ) ...\SiteApplication.php:194
6 0.1898 2840536 Joomla\CMS\Component\ComponentHelper::executeComponent( ) ...\ComponentHelper.php:377
7 0.1899 2857592 require_once( 'C:\wamp64\www\components\com_k2\k2.php' ) ...\ComponentHelper.php:402
8 0.1936 2954376 K2ControllerItem->execute( ) ...\k2.php:64
9 0.1936 2954376 K2ControllerItem->display( ) ...\BaseController.php:710
10 0.1991 2989840 K2ControllerItem->display( ) ...\item.php:78
11 0.1991 2989840 K2ControllerItem->display( ) ...\controller.php:19
12 0.1997 2993616 K2ViewItem->display( ) ...\BaseController.php:672
13 0.3967 4031720 K2ViewItem->display( ) ...\view.html.php:742
14 0.3967 4031720 K2ViewItem->loadTemplate( ) ...\HtmlView.php:230
15 0.3973 4056784 include( 'C:\wamp64\www\templates\jf_taman\html\com_k2\portfolio\item.php' ) ...\HtmlView.php:697
  • Blutch
  • Blutch's Avatar
02 Jan 2020 13:31
Replied by Blutch on topic Parameter must be an array

Parameter must be an array

Category: English K2 Community

Hello,
I just had an error preventing my site from working in frontend. The error is :

[02-Jan-2020 11:18:29 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/templates/sandal/html/com_k2/templates/default/item.php on line 187
[02-Jan-2020 11:18:33 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in [...]/templates/sandal/html/com_k2/templates/default/category.php on line 137

I can't figure out how to fix this problem when everything is working properly backend. Could you help me ?

PHP Version 7.2.26
Web Server Apache
WebServer to PHP Interface litespeed
Joomla! 3.9.14 Stable [ Amani ] 17-December-2019 15:00 GMT
Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

thanks a lot !

Blutch
  • SD
  • SD's Avatar
12 Dec 2019 01:15 - 12 Dec 2019 01:18

Category RSS Feed 404 Error - PHP Error

Category: English K2 Community

I have a site that I am working on to replace the current production site. I have moved all my data and when I attempt to load the RSS feeds for the categories in K2 it returns a 404 error.

My host looked into the error and found that when the RSS feed is loaded it returns the following error in php.

[11-Dec-2019 18:43:35 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../templates/ts_newslinen/html/com_k2/templates/default/item.php on line 314

[11-Dec-2019 18:45:15 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../templates/ts_newslinen/html/com_k2/templates/default/item.php on line 314

That line in the item.php is as follows.

"<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>"

I have error reporting set at maximum but not seeing any errors returned. You can see the page that is returning the error on the RSS feed by going to bit.ly/2qO1Bk4

On the production site in which I cloned the development site from RSS feeds work without issue. The only difference between the two sites is an updated template that I installed that will allow me to move to a newer version of php.

Current info on the site:

Joomla - 3.9.13
K2 - 2.10.1
PHP - 7.2

Thanks for the help.
  • Link111
  • Link111's Avatar
27 Nov 2019 16:02 - 27 Nov 2019 16:04

Warning: Parameter must be an array or an object that implements

Category: English K2 Community

Hello,

when I change PHP version to 7.3 (or 7.2) I get this warning on my website: Warning: count(): Parameter must be an array or an object that implements Countable in /home/user/public_html/templates/rt_salient/html/com_k2/templates/default/category.php on line 192
I have the newest K2 update v2.10.1. Also, setting error reporting in Joomla to none doesn't help, the warning still appears.
When I switch back to PHP 7.1 version, the warning is gone, however, on december 1st, 7.1 version will no longer be supported and recieve security updates, thus change of version is needed.
  • Kai
  • Kai's Avatar
25 Oct 2019 12:50
Probleme mit K2 - Serverabsturz was created by Kai

Probleme mit K2 - Serverabsturz

Category: Offizielle deutsche Gemeinschaft

Hallo,

ich bin echt verzweifelt, seit über 2 Monaten ist meine Website down. Der Grund ist das diese zu viele Anfragen verursacht und dadurch den Server regelmäßig abstürzen lässt. Nun habe ich mich schon mit mehreren darüber unterhalten: Server Anbieter, Template Hersteller und div. andere Entwickler. Nichts hat zu einer richtigen Lösung geführt außer das es heisst das irgendetwas diesen Fehler verursacht. Der neuste Hinweis kam über meine Server error logs wo mich einer auf folgendes hingewiesen hat:

From what I see, it show the most warning message is K2 component, you can see the pattern when it hit that warning message then this warning message shown up from this file httpdocs/libraries/src/HTML/HTMLHelper.php .

PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/http://florida-inside.de/httpdocs/components/com_k2/models/item.php on line 763\n
PHP message: PHP Warning: Illegal string offset 'relative' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 627\n
PHP message: PHP Warning: Cannot assign an empty string to a string offset in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 627\n
PHP message: PHP Warning: Illegal string offset 'pathOnly' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 628\n
PHP message: PHP Warning: Cannot assign an empty string to a string offset in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 628\n
PHP message: PHP Warning: Illegal string offset 'detectBrowser' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 629\n
PHP message: PHP Warning: Illegal string offset 'detectDebug' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 630\n
PHP message: PHP Warning: Illegal string offset 'relative' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 633\n
PHP message: PHP Warning: Illegal string offset 'detectBrowser' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 633\n
PHP message: PHP Warning: Illegal string offset 'detectDebug' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 633\n
PHP message: PHP Warning: Illegal string offset 'pathOnly' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 636

PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/http://florida-inside.de/httpdocs/components/com_k2/models/item.php on line 763
PHP message: PHP Warning: Illegal string offset 'relative' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 627
PHP message: PHP Warning: Cannot assign an empty string to a string offset in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 627
PHP message: PHP Warning: Illegal string offset 'pathOnly' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 628
PHP message: PHP Warning: Cannot assign an empty string to a string offset in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 628
PHP message: PHP Warning: Illegal string offset 'detectBrowser' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 629
PHP message: PHP Warning: Illegal string offset 'detectDebug' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 633\n
PHP message: PHP Warning: Illegal string offset 'pathOnly' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 636\n

PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/http://florida-inside.de/httpdocs/components/com_k2/models/item.php on line 763\n
PHP message: PHP Warning: Illegal string offset 'relative' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 627\n
PHP message: PHP Warning: Cannot assign an empty string to a string offset in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 627\n
PHP message: PHP Warning: Illegal string offset 'pathOnly' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 628\n
PHP message: PHP Warning: Cannot assign an empty string to a string offset in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 628\n
PHP message: PHP Warning: Illegal string offset 'detectBrowser' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 629\n
PHP message: PHP Warning: Illegal string offset 'detectDebug' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 630\n
PHP message: PHP Warning: Illegal string offset 'relative' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 633\n
PHP message: PHP Warning: Illegal string offset 'detectBrowser' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 633\n
PHP message: PHP Warning: Illegal string offset 'detectDebug' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 633\n
PHP message: PHP Warning: Illegal string offset 'pathOnly' in /var/www/vhosts/http://florida-inside.de/httpdocs/libraries/src/HTML/HTMLHelper.php on line 636\n


And another possibilities is K2 template override file from your current template and one of the plugin :


PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/http://florida-inside.de/httpdocs/templates/enar/html/mod_k2_content/Recentposts/default.php on line 12\n

PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/http://florida-inside.de/httpdocs/templates/enar/html/mod_k2_content/Recentposts/default.php on line 12\n'

[Fri Aug 16 18:14:39.321596 2019] [proxy_fcgi:error] [pid 1410] [client 69.162.124.228:43400] AH01071: Got error 'PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/http://florida-inside.de/httpdocs/plugins/system/pwebopengraph/pwebopengraph.php on line 392\n

PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/http://florida-inside.de/httpdocs/templates/enar/html/mod_k2_content/Recentposts/default.php on line 12\n

PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/http://florida-inside.de/httpdocs/templates/enar/html/mod_k2_content/Recentposts/default.php on line 12\n'

Hier wurde halt K2 als Problem angesprochen, von daher wollte ich mal hier im Forum um Hilfe bitten.
  • Franz Heine
  • Franz Heine's Avatar
10 Sep 2019 09:19
Replied by Franz Heine on topic Problems with php 7.3 -> now php 7.4.33

Problems with php 7.3 -> now php 7.4.33

Category: English K2 Community

Great!

When you want to create a new item, i receive this error:

Warning: sizeof(): Parameter must be an array or an object that implements Countable in /www/htdocs/w0154391/projekt-rechnung/administrator/components/com_k2/views/item/view.html.php on line 442

Hope its in your update too
Displaying 1 - 20 out of 31 results.

Powered by Kunena Forum