GavickPro / News-Show-Pro-GK5

Advanced Joomla! content module.
28 stars 37 forks source link

Problem with K2 as datasource (image links) #317

Closed Cyberek closed 8 years ago

Cyberek commented 8 years ago

One of our users found a problem with k2 source linking. More can be found here (please read details on the thread): https://www.gavick.com/forums/255/image-links-not-working-after-update-to-nsp-gk5-1-9-2-48731?p=245126#p245126

But from what I see our git source code already differs much from one available in module itself. Will this issue be addressed with next release?

dziudek commented 8 years ago

This was fixed today in v.1.9.2.1 :)

Cyberek commented 8 years ago

Was it published, because I downloaded 1.9.2.1 and there is no such code in it :(

Cyberek commented 8 years ago

To compare just few lines, dowloaded version gives:

class NSP_GK5_com_k2_View extends NSP_GK5_View {
    // article image generator
    static function image($config, $item, $only_url = false, $pm = false, $links = false){      
        if(!($config['news_content_image_pos'] != 'disabled' || $pm || $links)) {
            return '';
        }

        $IMG_SOURCE = '';
        $IMG_LINK = static::itemLink($item, $config);
        $item['title'] = str_replace('"', """, $item['title']);
        $uri = JURI::getInstance();
        $IMG_SOURCE = static::originalImage($config, $item);

in mentioned file (mod_news_pro_gk5/tmpl/com_k2/view.php)

dziudek commented 8 years ago

And? The fix includes adding the $IMG_LINK variable which was missing so the downloaded version is ok.