Keyword

problem with helpers/utilities.php

  • Robert Broughton
  • Robert Broughton's Avatar Topic Author
  • Offline
  • New Member
More
12 years 9 months ago #60259 by Robert Broughton
problem with helpers/utilities.php was created by Robert Broughton
The code at the end of helpers/utilities.php looks like this:

function getParams($option){

if(K2_JVERSION == '16'){
$app = JFactory::getApplication('site');
var_dump($app);
$params = & $app->getParams($option);
}
else {
$params = &JComponentHelper::getParams($option);
}
return $params;

}

When this code is executed under normal circumstances, the var_dump shows that the object is JSite.

What I'm doing is trying to get another component working with K2 v1.5.3 and Joomla 1.7. It has the following code:

require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'models'.DS.'itemlist.php');
require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'utilities.php');
$rows = K2ModelItemlist::getData();

The getData() calls getParams(), and I get this error: Call to undefined method JAdministrator::getParams()
The var_dump now shows that the object is JAdministrator instead of JSite.

Based on some extensive research, it looks like the "site" parameter in the getApplication() is having no effect at all. Can somebody tell me how to get this working?

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


Powered by Kunena Forum