Keyword

k2 v.2.5.5 (com_k2/models/item.php) bug

  • Arpeggio
  • Arpeggio's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #64188 by Arpeggio
k2 v.2.5.5 (com_k2/models/item.php) bug was created by Arpeggio
Hi all,
this is my first post and sorry for my english :( ....
btw working on new Joomla 2.5.3 and K2 v.2.5.5 something goes wrong.
Seem in com_k2/models/item.php in getItemExtraFields in line:

if($value) {
$rows[$i]->value = $value;
}
else {
unset($rows[$i]);


unset row at $i is ok but indexing go wrong so last item is skipped

my solution is on change

$query="SELECT * FROM #__k2_extra_fields WHERE published=1 AND id IN ({$condition}) ORDER BY ordering ASC";
$db->setQuery($query);
$rows = $db->loadObjectList();
for ($i=0; $i<sizeof($rows); $i++){
$value='';

in

$query="SELECT * FROM #__k2_extra_fields WHERE published=1 AND id IN ({$condition}) ORDER BY ordering ASC";
$db->setQuery($query);
$rows = $db->loadObjectList();
$rows_size=sizeof($rows);
for ($i=0; $i<$rows_size; $i++){

$value='';

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

  • Arpeggio
  • Arpeggio's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #64189 by Arpeggio
Replied by Arpeggio on topic Re: k2 v.2.5.5 (com_k2/models/item.php) bug
Sorry for double post ...
i've found same bug report here here

:(

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


Powered by Kunena Forum