Keyword

Advanced Search

Search Results (Searched for: countable error)

  • Fotis
  • Fotis's Avatar
22 Apr 2019 21:11
Fotis replied the topic:Multiple issues after upgrade to Joomla 3.9.5

Multiple issues after upgrade to Joomla 3.9.5

Category: English K2 Community

Install K2 v2.9.1 (dev) on top of 2.9.0 from: github.com/getk2/k2/archive/master.zip

This should resolve the countable() warnings in PHP 7.2+.

The error "Using $this when not in object context" which probably causes a fatal error in the frontend may come from a 3rd party extension that utilizes K2 content.

A URL to your site(s) would also help.
  • Eugene
  • Eugene's Avatar
13 Feb 2019 07:55
Eugene replied the topic:Parameter must be an array

Parameter must be an array

Category: English K2 Community

Have applied the latest 2.9.1 dev, still got the following error

Warning: count(): Parameter must be an array or an object that implements Countable in /home/xxx/public_html/site/templates/xxx/html/com_k2/blog-2columns/item.php on line 105
  • Mo
  • Mo's Avatar
28 Jan 2019 13:03
Mo created the topic:Multiple K2 errors after upgrade to PHP 7.3.0

Multiple K2 errors after upgrade to PHP 7.3.0

Category: English K2 Community

Hi,

I'm getting multiple K2 errors since upgrading to php 7.3.0 across various plug ins and component pages:

Warning: count(): Parameter must be an array or an object that implements Countable in \components\com_k2\models\item.php on line 763
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in \modules\mod_k2_user\helper.php on line 104
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in \modules\mod_k2_user\helper.php on line 132
  • Igor
  • Igor's Avatar
22 Jan 2019 17:24
Igor created the topic:Error after upgrade PHP to version 7.2

Error after upgrade PHP to version 7.2

Category: English K2 Community

Hello,
after upgrade PHP to 7.2 I receive this error message when open all article:
Warning: count(): Parameter must be an array or an object that implements Countable in /home/editfi5/public_html/editnews/components/com_k2/models/item.php on line 763

Before and after article like here:
editfiume.info/editnews/politica/3632-il-fronte-dei-lavoratori-punta-in-alto

What I can do?
  • Brigitte Kuschel
  • Brigitte Kuschel's Avatar
13 Jan 2019 15:15
Brigitte Kuschel created the topic:error with extra fields v2.9 php 7.2

error with extra fields v2.9 php 7.2

Category: English K2 Community

Hello,

i love the extra fields of k2.

i upgrade to joomla 3.9.1 and newest version k2 v2.9 no problem at all.
i installed the newest simple image gallery pro too.

but set server to php 7.2 i have an error with it (it works fine on php 7.1.)

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

and at the extra file tab

Warning: count(): Parameter must be an array or an object that implements Countable in /home/www/nbm/administrator/components/com_k2/models/extrafield.php on line 211


The error ist only at new items. At old items, there is no error.

at frontend there is no error

Can somebody please help me?

THank you very much.

Brigitte

  • Daniel Pardons
  • Daniel Pardons's Avatar
01 Jan 2019 16:08
Daniel Pardons replied the topic:Parameter must be an array

Parameter must be an array

Category: English K2 Community

Hi
After installing current github version 2.9.1, I found the error on displaying K2 single item

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in C:\wamp64\www\jd_miami\templates\jd_miami\html\com_k2\templates\default\item.php on line 291
Call Stack
# Time Memory Function Location
1 0.0004 406176 {main}( ) ...\index.php:0
2 0.0622 1426664 Joomla\CMS\Application\SiteApplication->execute( ) ...\index.php:49
3 0.0622 1426664 Joomla\CMS\Application\SiteApplication->doExecute( ) ...\CMSApplication.php:196
4 0.3818 3456584 Joomla\CMS\Application\SiteApplication->dispatch( ) ...\SiteApplication.php:233
5 0.3824 3480440 Joomla\CMS\Component\ComponentHelper::renderComponent( ) ...\SiteApplication.php:194
6 0.3834 3599832 Joomla\CMS\Component\ComponentHelper::executeComponent( ) ...\ComponentHelper.php:377
7 0.3835 3616888 require_once( 'C:\wamp64\www\jd_miami\components\com_k2\k2.php' ) ...\ComponentHelper.php:402
8 0.3942 3762208 K2ControllerItem->execute( ) ...\k2.php:64
9 0.3942 3762208 K2ControllerItem->display( ) ...\BaseController.php:710
10 0.4056 3907712 K2ControllerItem->display( ) ...\item.php:74
11 0.4056 3907712 K2ControllerItem->display( ) ...\controller.php:19
12 0.4064 3915616 K2ViewItem->display( ) ...\BaseController.php:672
13 0.5852 4798120 K2ViewItem->display( ) ...\view.html.php:521
14 0.5852 4798120 K2ViewItem->loadTemplate( ) ...\HtmlView.php:230
15 0.5864 4823840 include( 'C:\wamp64\www\jd_miami\templates\jd_miami\html\com_k2\templates\default\item.php' ) ...\HtmlView.php:697

As the line 291 and 292 are:
<!-- Plugins: AfterDisplayContent -->
<?php echo $this->item->event->AfterDisplayContent; ?>

I am stuck.
Could you investigate this problem?
Regards

Daniel
  • burnyourears
  • burnyourears's Avatar
11 Dec 2018 14:32 - 11 Dec 2018 14:33
burnyourears replied the topic:Parameter must be an array

Parameter must be an array

Category: English K2 Community

I get this error on opening a new article:

Warning: sizeof(): Parameter must be an array or an object that implements Countable in administrator/components/com_k2/views/item/view.html.php on line 338

It addresses the extra field section of the view.html.php:

// Extra fields
        $extraFieldModel = K2Model::getInstance('ExtraField', 'K2Model');
        if ($category->id) {
            $extraFields = $extraFieldModel->getExtraFieldsByGroup($category->extraFieldsGroup);
        } else {
            $extraFields = null;
        }

        for ($i = 0; $i < sizeof($extraFields); $i++) {
            $extraFields[$i]->element = $extraFieldModel->renderExtraField($extraFields[$i], $item->id);
        }

Line 338 is:
for ($i = 0; $i < sizeof($extraFields); $i++) {

Any idea? :-)
  • Fotis
  • Fotis's Avatar
27 Sep 2018 17:09
Fotis replied the topic:Error after K2 2.9.0 upgrade

Error after K2 2.9.0 upgrade

Category: English K2 Community

We don't implement that class ("Countable") in our code. It probably comes from a 3rd party extension that integrates/extends K2 content. Look at your Plugin Manager first.
  • Helmut
  • Helmut's Avatar
26 Sep 2018 13:23
Helmut created the topic:Error after K2 2.9.0 upgrade

Error after K2 2.9.0 upgrade

Category: English K2 Community

Hi,

after upgrading to the newest K2 version every article starts with:
Warning: count(): Parameter must be an array or an object that implements Countable in /home/.sites/43/site4952321/web/components/com_k2/models/item.php on line 76

and ends with:
Warning: count(): Parameter must be an array or an object that implements Countable in /home/.sites/43/site4952321/web/components/com_k2/templates/default/item.php on line 248

Joomla 3.8.12
MySQLi 5.5.59
PHP 7.2.10

Any ideas? - Thanks
Displaying 1 - 9 out of 9 results.
Powered by Kunena Forum