Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Newsworth template - k2 module content - Subtemplate Video player

  • Nikos Zinas
  • Nikos Zinas's Avatar Topic Author
  • Offline
  • New Member
More
4 years 5 months ago #176414 by Nikos Zinas
Hello people,
I had installed a year ago the newsworth template.
At the front page there is a k2 module content with subtemplate video player (see the picture).
You click on the thumbs on the right side and the video of the specific articles appears. I don;t know the reason but this functionality stopped and now always appeared the video of the first article.
I found the deafult.php of the video player template and started the debuging.
I found that all this happens because when the javascript add the format=JSON at the end of every article in order to get the JSON data of every article I get an error
(0) Call to undefined method K2ModelItemlist::prepareJSONItem()
Is there a way to solve this problem?

Thanks a lot!
Attachments:

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

More
4 years 5 months ago #176417 by JoomlaWorks
K2 & Joomla versions?

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

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

  • Nikos Zinas
  • Nikos Zinas's Avatar Topic Author
  • Offline
  • New Member
More
4 years 5 months ago #176418 by Nikos Zinas
k2 2.10.3
Joomla 3.9.19

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

More
4 years 5 months ago #176420 by JoomlaWorks
Try installing K2 v2.10.4 (dev) for starters: getk2.org/downloads/?f=K2_Development_Release.zip

See if that solves your issue. If not, provide a direct URL to the page in question so I can have a look.

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

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

  • Nikos Zinas
  • Nikos Zinas's Avatar Topic Author
  • Offline
  • New Member
More
4 years 5 months ago - 4 years 5 months ago #176423 by Nikos Zinas
Finally, the problem was a custom template that I created to html/com_k2.
When I assign the default template to the category the format=JSON is working perfect and the video player of course,
but when I assign my custom template the things not working.

So I have to see what might be wrong with my custom template. Do I have to add my custom template com_k2 to a file like xml in order to the articles assigned to this template to have json format?

Thanks for your help Fotis.
Last edit: 4 years 5 months ago by Nikos Zinas.

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

More
4 years 5 months ago #176425 by JoomlaWorks
Your custom sub-template should not output JSON directly. This is done by K2 automatically on any view as the JSON output is fixed to certain data depending on that view.

If you provide more info as to what you're trying to do, I might be able to propose another solution.

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

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

  • Nikos Zinas
  • Nikos Zinas's Avatar Topic Author
  • Offline
  • New Member
More
4 years 5 months ago #176431 by Nikos Zinas
Well I think that there is a bug.
If you have an article asign to a category, that in display settings has disabled the item navigation then you cannot get the article in a json format and you get the error,
(0) Call to undefined method K2ModelItemlist::prepareJSONItem()

How can I send you a private message for more information?

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

More
4 years 5 months ago #176437 by JoomlaWorks
Check the K2 blog. Doesn't use item navigation, JSON output works just fine.

Perhaps some 3rd party plugin causes issues...

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

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

  • Nikos Zinas
  • Nikos Zinas's Avatar Topic Author
  • Offline
  • New Member
More
4 years 5 months ago #176446 by Nikos Zinas
Hello Fotis, I see that the json format at the k2 blog is working perfect.

But I install a new joomla 3.9.19 in php 7.4, with k2 component (K2 v2.10.4[Dev Build 20200604]) and newsworth template and nothing else (not 3rd party plugin) and it has the same behaviour as I described in my earlier post. I think the bug is at the newsworth template.

You can see the demo site here: www.tennisgreece.gr
credentials admin / admin

To my official website I had found a solution via css and display: none the navigation control. So, if you don't have time, don't look it at all.

Thanks

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

More
4 years 5 months ago #176458 by JoomlaWorks

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

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


Powered by Kunena Forum