Keyword

V 2.3 K2_Content Bug

  • Chris Yates
  • Chris Yates's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 months ago #85154 by Chris Yates
V 2.3 K2_Content Bug was created by Chris Yates
Guys,Just doing local host tests with K2 v.2.3 and the following bug has appeared related to k2_content.When linking either via title, image or readmore the following error code thrown up:Warning: explode() expects parameter 2 to be string, array given
in C:\xampp\htdocs\Joomla\components\com_k2\helpers\route.php on
line 73

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\Joomla\components\com_k2\helpers\route.php
on line 74Please advise as soon as possible.Regards,CHRIS

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

More
14 years 2 months ago #85155 by Taimurian
Replied by Taimurian on topic V 2.3 K2_Content Bug
The same bug here ... any solutions

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

  • Chris Yates
  • Chris Yates's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 months ago #85156 by Chris Yates
Replied by Chris Yates on topic V 2.3 K2_Content Bug
Yes,

Change XAMPP to 1.7.2 rather than 1.7.3!

CHRIS

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

More
14 years 2 months ago #85157 by william white
Replied by william white on topic V 2.3 K2_Content Bug
@Chris
Is this a php version problem?

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

  • Chris Yates
  • Chris Yates's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 months ago #85158 by Chris Yates
Replied by Chris Yates on topic V 2.3 K2_Content Bug
William,

It does appear to be a php version problem.

I'd set up XAMPP on a brand new computer then added Joomla and K2. The first test threw up the error above. I reistalled both Joomla and k2 just in case, but the error was still there.

I then dropped XAMPP back to a previous version (1.7.2), reinstalled Joomla and k2 and the error went away.

I'd suggest t's an issue that'll need to be addressed by devs quickly, since hosts will upgrade soon and that could result in lots of people having problems.

CHRIS

William White said:@Chris Is this a php version problem?

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

More
14 years 2 months ago #85159 by william white
Replied by william white on topic V 2.3 K2_Content Bug
This didnt make sence to me because usually there are specific things in code that are not backward compatable.
Go to a 2.2 or 2.3svn version and copy the contents from K2 paramaters from the SEF URL character replacements parameter, and past it into the same paramater where it says Array in 2.3 install paramater.
Im using 1.7.3 xampp and this fixed the error for me

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

More
14 years 2 months ago #85160 by william white
Replied by william white on topic V 2.3 K2_Content Bug
The offending line of code seemed to be
$SEFReplacements = array(); in route.php
The next error was because the first error was thrown.

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

  • Chris Yates
  • Chris Yates's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 months ago #85161 by Chris Yates
Replied by Chris Yates on topic V 2.3 K2_Content Bug
William,

Thanks for the advice.

It seems other people are finding a similar problem and not just in k2_content but also k2_users as well.

I'll try your suggestion later in the day since am in the midst of some heavy weight actual work at the moment.

Be Well,

CHRIS

William White said:The offending line of code seemed to be $SEFReplacements = array(); in route.php
The next error was because the first error was thrown.

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

More
14 years 2 months ago #85162 by william white
Replied by william white on topic V 2.3 K2_Content Bug
Im not sure my answer is the correct one but it works. I have to guess theres something missing in the install file and where "Array" was put in the parameters it either means put your stuff in it, or they meant to copy the array into it by default. Im not very good with SEF
When "More Light" is shed on this subject I will post as you requested

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

More
14 years 2 months ago #85163 by James S.
Replied by James S. on topic V 2.3 K2_Content Bug
I am no php guru but what I did was removed the SEFReplacements text and the errors disappeared. Like Mr. White suggested when more on this topic comes about there may be a better explainable solution. But for now this may open the door for more solution exploration.

Line 73 (unmodified)
$items = explode(',', $params->get('SEFReplacements', NULL));

Line 73 (modofied)
$items = explode(',', $params->get('', NULL));

Full route.php code link below
code.google.com/p/joomlaworks/source/browse/trunk/K2/compone...

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


Powered by Kunena Forum