Ok thanks for the help ! Problem fixed ;)
So I found a workaround to get the K2 params instead of using K2 utilities.php helper I call : $params = JComponentHelper::getParams('com_k2'); It works but I don't know if it's the "good" way ?
I tried to do that but with the function embeded to get the extrafield, I must call the helper "utilities.php" from K2 and doing that I have this error now : Fatal error: Call to undefined method JAdministrator::getParams() So...
Thanks for your help and your time. Unfortunately I got this message now : Fatal error: Call to undefined method K2ModelItem::getItemExtraFields() If you know how to fix it ? NB : I did that to create the model :...
I hope the K2 team will make quickly an update to fix that or give us a way to work around... HELP ;)
Sorry but I don't think so... An extra field is attached to a extre field groupe himself attached to a category... So the access level you must use is the content one. The extra fields can't be seen alone.
I realy need to use the function getItemExtraFields in my plugin but it's a nightmare ! If I undersant the error is because the model item.php is already called on saving a K2 item... I can't see how to call the function...
Hi, I need to create a new plugin for K2, for that I use the trigger "onAfterK2Save" and I add this code in my function to get the extrafield formated : But when I save i get this error : Fatal error: Cannot redeclare class K2ModelItem...
I don't know why but at the end of your URL you have some bad options "&tmpl=component&print=1" without it it's ok
Solution founded ! The problem for me was with the login module of joomla activate... you have to change in is conf the redirection after login and logout from "default" to whatever and ot works ! I hope it will work for you to...
More