Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • wowbagger Friend
    #178778

    Hello Everyone,

    I just finished my JA Lens site but when I click on a user Avatar I get the users’s articles, but also this error:

    “Warning: Invalid argument supplied for foreach() in <my site path>/templates/ja_lens/html/com_k2/default/user.php on line 94”

    When I google “templates/ja_lens/html/com_k2/default/user.php” I get about 1360 pages back, all with the same error…:confused:

    Why is this happening and more importantly, how can I fix this?

    Thanks,
    Wowbagger

    HeR0 Friend
    #459953

    Hi Wowbagger
    Please open file templates/ja_lens/html/com_k2/default/user.php on line 94 and find


    if(count($item->extra_fields)) {
    $extra_fields=K2ModelItem::getItemExtraFields($item->extra_fields);
    foreach ($extra_fields as $key=>$extraField) {
    if ($extraField->name == $xclass_key) {
    $xclass = $extraField->value;
    break;
    }
    }
    }

    and replace to

    if(count($item->extra_fields)) {
    $extra_fields=K2ModelItem::getItemExtraFields($item->extra_fields);
    if(!empty($extra_fields)){
    foreach ($extra_fields as $key=>$extraField) {
    if ($extraField->name == $xclass_key) {
    $xclass = $extraField->value;
    break;
    }
    }
    }
    }

    Regards,

    wowbagger Friend
    #460013

    Clean fix!

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  wowbagger 12 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum