Keyword

Advanced Search

Search Results (Searched for: countable error)

  • 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 was created by Dmitry Korobov

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 was created by SD

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 was created by Link111

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

Problems with php 7.3

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
  • trogladyte
  • trogladyte's Avatar
04 Sep 2019 19:36
Replied by trogladyte on topic Parameter must be an array

Parameter must be an array

Category: English K2 Community

I just upgraded my server from PHP7.1.31 to PHP7.3.x yesterday as I was getting EOL warnings from Joomla. Since that, I can confirm that this K2 warning has now appeared,

Warning: count(): Parameter must be an array or an object that implements Countable in /home/tastewas/public_html/components/com_k2/models/item.php on line 763

While I understand that it's only a warning and only appears if the error reporting in Joomla is set to anything other than none or Sys Def, and it doesn't affect site operation, does this not mean that the K2 code isn't completely in line with current PHP versions?
Displaying 1 - 8 out of 8 results.
Powered by Kunena Forum