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
3 years 5 months 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
3 years 5 months 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.

More
3 years 5 months ago #177296 by JoomlaWorks
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... :)

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

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

  • saurabh agarwal
  • saurabh agarwal's Avatar Topic Author
  • Offline
  • New Member
More
3 years 5 months 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.

More
3 years 5 months ago #177329 by JoomlaWorks
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.

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