Keyword

Fatal Error between K2 User and K2 Frontend

  • Michael Gulyaev
  • Michael Gulyaev's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago #175612 by Michael Gulyaev
Fatal Error between K2 User and K2 Frontend was created by Michael Gulyaev
Hi.
I have a fatal error "Call to undefined method K2ModelItem::getUserProfile()" when I click on the menu to form of K2 frontend. This error appeared after I changed the "component" to "index" in the file item.php to use the header from my template:

public function edit()
{
JRequest::setVar('tmpl', 'index');

I noticed that this error disappears if I disable the "K2 User" module, which is in the header of the template. Can you help me to solve my problem?
K2 v. 2.9.0, Joomla 3.9.12 Stable.

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

More
4 years 6 months ago #175613 by JoomlaWorks
Replied by JoomlaWorks on topic Fatal Error between K2 User and K2 Frontend
a) Don't do that. There's a reason it's loaded in the component.php sub-template.

b) You should upgrade to K2 v2.10.3 ASAP.

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

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

  • Michael Gulyaev
  • Michael Gulyaev's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago - 4 years 6 months ago #175614 by Michael Gulyaev
Replied by Michael Gulyaev on topic Fatal Error between K2 User and K2 Frontend
a) I need the header from my template in the K2 frontend edit form. How can I do that? May be another method exist?

b) This fatal error is fixed in the new version of K2?
Last edit: 4 years 6 months ago by Michael Gulyaev.

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

More
4 years 6 months ago #175616 by JoomlaWorks
Replied by JoomlaWorks on topic Fatal Error between K2 User and K2 Frontend
a) Override component.php and add it there. Simple.

b) The error occurs because of the change you do. Regardless of that, you're missing for not using K2 v2.10.3.

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

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

  • Michael Gulyaev
  • Michael Gulyaev's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago #175635 by Michael Gulyaev
Replied by Michael Gulyaev on topic Fatal Error between K2 User and K2 Frontend
Is it really simple? What I need to do? Can you explain in more detail?
Do you mean the template component file component.php?

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

More
4 years 6 months ago #175636 by JoomlaWorks
Replied by JoomlaWorks on topic Fatal Error between K2 User and K2 Frontend
component.php is like index.php. The only difference is that this file is usually called in modals, the print dialog etc. Explore that file and adjust accordingly.

As for the update, yes, it's simple.

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