Keyword

K2 - White screen when saving item and php error

  • george
  • george's Avatar
  • Offline
  • New Member
  • May The Force be with you.
More
11 years 11 months ago - 11 years 11 months ago #104768 by george
Fatal error: Call to a member function getSearchValue()

The same problem. I confirm it to. It happens only in K2 items with extra fields assigned to them.

I have the latest versions for everyhting ( Joomla 2.5.7, K2 latest)

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

More
11 years 11 months ago - 11 years 11 months ago #104769 by Darren Janeczek
Replied by Darren Janeczek on topic Re: K2 - White screen when saving item and php error
Hello.

I've encountered the same issue, and came up with a solution.
It appears that attempts to find the extrafield.php file fails.

I've added the 'administrator' model location to the include path.

to line 17 of Joomla/administrator/components/com_k2/models/item.php, add
JModel::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'models', 'K2Model');


Below is a print out of the 'diff'.

$ git diff Joomla/administrator/components/com_k2/models/item.php
diff --git a/Joomla/administrator/components/com_k2/models/item.php b/Joomla/administrator/components/com_k2/models/item.php
index 068f283..64afb2c 100644
--- a/Joomla/administrator/components/com_k2/models/item.php
+++ b/Joomla/administrator/components/com_k2/models/item.php
@@ -14,6 +14,9 @@ jimport('joomla.application.component.model');

JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');

+JModel::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'models', 'K2Model');^M
+
+
class K2ModelItem extends K2Model
{

getk2.org/community/New-to-K2-Ask-here-first/163385-Error-after-K2-update#163924

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

More
11 years 11 months ago #104770 by Mk
I'm not sure i've understood correctly

I tried this but no luck.

JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'tables');
JModel::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'models', 'K2Model');

Info: The item is saved but not its extra field values

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

  • Tomasz Bieliński
  • Tomasz Bieliński's Avatar
  • Offline
  • Senior Member
More
11 years 11 months ago #104771 by Tomasz Bieliński
Replied by Tomasz Bieliński on topic Re: K2 - White screen when saving item and php error
The same here under K2 2.6.1. Any news regarding this bug?
regards Tomek

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

More
11 years 11 months ago - 11 years 11 months ago #104772 by Darren Janeczek
Replied by Darren Janeczek on topic Re: K2 - White screen when saving item and php error
I'm also working with version 2.6.1 of K2.

Only the one line needed to be added at line 17 of the specified file.

Sorry for any confusion.

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

More
11 years 11 months ago #104773 by Eduardo
Darren,

Can you explain clearly, what needs to be changed?

Thanks

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

More
11 years 11 months ago #104774 by Darren Janeczek
Replied by Darren Janeczek on topic Re: K2 - White screen when saving item and php error
Sure

In your Joomla folder, look for the following file:
/administrator/components/com_k2/models/item.php

Inject the following text into a new line 17:
JModel::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'models', 'K2Model');

D.

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

More
11 years 11 months ago #104775 by Rodrigo Emygdio
Replied by Rodrigo Emygdio on topic Re: K2 - White screen when saving item and php error
Hi Darren,
Thanks for your tip! I updated the code and the error is gone. But When I updated the item the information of extra fields type of link lost the information about link, staying just a letter A in text and just one letter of the url in field URL. This happens just when a user update in the item in front end

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

More
11 years 11 months ago #104776 by Lefteris
Issue fixed. Please try the SVN version at getk2.org/assets/svn and provide some feedback.

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

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

More
11 years 11 months ago #104777 by Mk
tried the svn... fatal error in homepage :

Fatal error: Call to undefined method K2ViewItemlist::buildAliasBasedExtraFields() in \components\com_k2\models\item.php on line 1466

from where can i download 2.5.7 version?

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


Powered by Kunena Forum