Keyword

Fatal error is coming after upgrading the Joomla to ver 3.9

  • saurabh agarwal
  • saurabh agarwal's Avatar Topic Author
  • Offline
  • New Member
More
1 month 7 hours ago #177278 by saurabh agarwal
I am getting fatal error in K2 component after upgrading the website to Joomla ver 3.9.

Please review below messages in the error log
======================================
Fatal error: Call to undefined method K2ModelItem::getImagesForGallery() in /home/.../public_html/components/com_k2/templates/wallpapers/item.php on line 354
Fatal error: Call to undefined method K2ModelItem::getImagesForGallery() in /home/.../public_html/components/com_k2/templates/audio/item.php on line 619
Fatal error: Call to undefined method K2ModelItem::getTitleFromItemId() in /home/.../public_html/components/com_k2/templates/guru/item.php on line 20
Fatal error: Call to undefined method K2ModelItem::getImagesForGallery() in /home/.../public_html/components/com_k2/templates/photos/item.php on line 332
======================================

Please suggest, where these methods are defined. Any help would be highly appreciated.

Thanks in advance!

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

  • saurabh agarwal
  • saurabh agarwal's Avatar Topic Author
  • Offline
  • New Member
More
1 month 6 hours ago #177279 by saurabh agarwal
Presently I have installed K2 v2.10.3 on Joomla[ver 3.9] and using php [PHP Version 5.6.40] on the website.

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

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
1 month 1 hour ago #177296 by Fotis
These functions are not part of K2's core code, e.g. github.com/getk2/k2/search?q=getImagesForGallery

Whoever built your site modified K2's core code, which is a big no-no... :)

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • saurabh agarwal
  • saurabh agarwal's Avatar Topic Author
  • Offline
  • New Member
More
4 weeks 2 days ago #177321 by saurabh agarwal
thanks for your quick reply. what are the ways to declare custom methods in the k2 components so conflicts can be avoided while upgrading in future without changing in the core files.

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

  • Fotis
  • Fotis's Avatar
  • Online
  • Administrator
  • JoomlaWorks Support Team
More
4 weeks 1 day ago #177329 by Fotis
In either a plugin or where you render the code (e.g. the template overrides). It depends on the use case.

In your case, I assume these are presentation methods only, so they could have been part of a template override for K2.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum