Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • tomwal Friend
    #192755

    Hello. I have problem with K2. On my homepage there are K2 articles. But it not show photo/icon. For example article “Kultura”

    Link


    1. Bez-nazwy-1
    TomC Moderator
    #514480

    As a “first line of investigation” into an issue such as this, a method I usually employ is USING JA’s DEMO BUILDER to cross-reference the settings/configurations of the demo version with those of my own.

    It may be that you have an incorrect setting for the image path being referenced … or, perhaps, the image is not in the folder it’s supposed to be in.

    In any case, utilizing the Demo Builder is a great initial tool toward investigating and figuring things like this out.

    If, after looking into it, you are still stumped … let us know.

    😎

    VisiGod Friend
    #517325

    The module generates an incorrect path to the image, when the installation is made in sub-folder.
    Which is obviously a bug in the JA News Pro module 😉

    Nazario A Friend
    #517474

    @visigod:

    Could you PM me the URL and Admin credential of your site so that I can check further?

    Saguaros Moderator
    #518479

    You’re right, this is a bug of this JA News Pro module with K2 image. The culprit is that when you add image via Images tab in settings of K2 item, the module get wrong path of the image, hence, it doesn’t display in front end.

    Here is a temporary fix:

    – Open file: modulesmod_janewsprohelpersadapterk2.php
    – At approx line 335, you will see this snippet of code:

    if ($thumbnailMode != 'none' && $jaimage->sourceExited($image)) {
    $imageURL = $jaimage->resize($image, $img_w, $img_h, $crop, $aspect);
    $imageURL = str_replace(JURI::base(), '', $imageURL);
    $imageURL = JURI::base() . $imageURL;
    $row->image = $imageURL ? "<img class="$img_align" src="" . $imageURL . "" alt="{$row->title}" $align />" : "";
    } else {
    $width = $img_w ? "width="$img_w"" : "";
    $height = $img_h ? "height="$img_h"" : "";
    $imageURL = str_replace(JURI::base(), '', $imageURL);
    $imageURL = JURI::base() . $imageURL;
    $row->image = "<img class="$img_align" src="" . $image . "" alt="{$row->title}" $img_w $img_h $align />";
    }

    – Replace it with:

    if ($thumbnailMode != 'none' && $jaimage->sourceExited($image)) {
    $imageURL = $jaimage->resize($image, $img_w, $img_h, $crop, $aspect);
    $imageURL = str_replace(JURI::base(), '', $imageURL);
    $imageURL = str_replace($_SERVER['REQUEST_URI'],'', $imageURL);
    $imageURL = JURI::base() . $imageURL;
    $row->image = $imageURL ? "<img class="$img_align" src="" . $imageURL . "" alt="{$row->title}" $align />" : "";
    } else {
    $width = $img_w ? "width="$img_w"" : "";
    $height = $img_h ? "height="$img_h"" : "";
    $imageURL = str_replace(JURI::base(), '', $imageURL);
    $imageURL = str_replace($_SERVER['REQUEST_URI'],'', $imageURL);
    $imageURL = JURI::base() . $imageURL;
    $row->image = "<img class="$img_align" src="" . $image . "" alt="{$row->title}" $img_w $img_h $align />";
    }

    Hope this helps.

    Cheers!!

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

This topic contains 5 replies, has 5 voices, and was last updated by  Saguaros 10 years, 10 months ago.

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