Keyword

Parameter must be an array

More
5 years 4 months ago #170571 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array
First off, it's a warning, not an error. Probably because you're in PHP 7.2. Secondly, most of these issues have been resolved in K2 v2.9.1 (dev) which you can install on top of 2.9.0 from here: github.com/getk2/k2/archive/master.zip

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #170573 by burnyourears
Replied by burnyourears on topic Parameter must be an array
Yep, I know. And I even installed the dev-version... the warning is still there. Here's another:

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

... Could you tell me how to disable these warnings? The last one mentioned is also live ... > www.burnyourears.de/reviews/buecher-und-spiele.html

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #170574 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array
Simply set error reporting to none or default in Joomla. And I've noted down to fix them in the K2 repo.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #170576 by burnyourears
Replied by burnyourears on topic Parameter must be an array
Ah ... thank you!

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #170578 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array
You're welcome.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #170723 by Daniel Pardons
Replied by Daniel Pardons on topic Parameter must be an array
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

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #170726 by Daniel Pardons
Replied by Daniel Pardons on topic Parameter must be an array
Hi
Sorry but after investigation, the here above problem is due to the item.php override of the jd_miami template. I will report the problem to joomdev.
Thanks for K2 component.
Regards
Daniel

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #170752 by JoomlaWorks
Replied by JoomlaWorks on topic Parameter must be an array
Great!

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #170855 by daga
Replied by daga on topic Parameter must be an array
Hi, I have Joomla 3.9.1 + K2 (2.9.0) + PHP 7.2.
My solution:
1. Create Extra Field Group - e.g. Class
2. Add Extra field e.g. "test" to group Class (set as not required)
3. Assign a Class group to each K2 category
4. Add each article to the category. If you have an existing file with warning, you must save it again.

I hope it will help :)
Regards

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #171185 by Eugene
Replied by Eugene on topic Parameter must be an array
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

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum