Image links not working (after update to NSP GK5 1.9.2 ?)

News Show Pro GK5 - flexible, responsive and easily extendable free Joomla module support forum.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sat Oct 31, 2015 10:22 am
I just updated to v1.9.2. and now the thumbnail image links are blank.
Is it a setting somewhere or a bug?

On [Article Layout] -> [Image] the [Image Link] is set to [On] and [Image Popup] is [Off].
However, the link is going to the homepage / blank. The title link is still okay.
Code: Select all
<a href="/gk_technews/" class="nspImageWrapper tleft fleft gkResponsive"  style="margin:0;" target="_self">
    <img  class="nspImage" src="http://www.domain.com/gk_technews/modules/mod_news_pro_gk5/cache/k2.items.cache.3abb66d58aa91d2b7b16f08ee38a95c0_Genericnsp-910.jpg" alt=""  />
</a>
<div class="gkArtContentWrap">
    <h4 class="nspHeader tleft fnone has-image">
        <a href="/gk_technews/portfolio/link-title"  title="Link Title" target="_self">
            Link Title
        </a>
    </h4>
    <p class="nspText tleft fleft">Lorem ipsum dolor sit ...

How to fix this?
User avatar
Fresh Boarder

GK User
Sat Oct 31, 2015 2:19 pm
Could you please post an url to your site where this issue could be seen?
User avatar
Moderator

GK User
Sat Oct 31, 2015 7:22 pm
Here's the link: http://www.four05.nl/gk_technews/
It can be seen on the frontpage.

Enabling the [Image popup] does work without a problem and gives the popup link.
But the normal link unfortunately does not show on the image.
User avatar
Fresh Boarder

GK User
Mon Nov 02, 2015 8:34 am
Hi, I have the same problem.

http://www.crowdedbrain.co.uk/

If you hover over an image from the front page it simply links to my Homepage, but the title link points to the correct article URL.

I am running K2 if this helps and the latest version of Joomla (however it was doing the above before I upgraded to the latest version of Joomla.

Hopefully this can be resolved with a simple fix.

Regards,

Brett
User avatar
Senior Boarder

GK User
Mon Nov 02, 2015 8:45 am
Just to be complete, here's my install:
  • Gavick Technews quick install
  • Joomla 3.4.5
  • NSP based on K2 category
  • No additional components/plugins installed except JCE
User avatar
Fresh Boarder

GK User
Mon Nov 02, 2015 9:07 am
I was running a similar setup but using the News 2 Template.

However I have gone back to an earlier version of NSP - ver 1.9.0 - while this bug is sorted out.

You can now see from my site the image is linking to the article again - so 1.9.2 most certainly had a bug.
User avatar
Senior Boarder

GK User
Mon Nov 02, 2015 11:29 am
There is a bug indeed.

In the class "NSP_GK5_com_k2_View" the article link is not defined.
[file: modules/mod_news_pro_gk5/tmpl/com_k2/view.php]

You have to add the following on line 26:
$IMG_LINK = static::itemLink($item, $config);

Old code:
Code: Select all
19 class NSP_GK5_com_k2_View extends NSP_GK5_View {
20     // article image generator
21     static function image($config, $item, $only_url = false, $pm = false, $links = false){      
22        if(!($config['news_content_image_pos'] != 'disabled' || $pm || $links)) {
23          return '';
24       }
25       
26       $IMG_SOURCE = '';
27       $item['title'] = str_replace('"', "&quot;", $item['title']);
28       $uri = JURI::getInstance();
29       $IMG_SOURCE = static::originalImage($config, $item);
30       //

New code:
Code: Select all
19 class NSP_GK5_com_k2_View extends NSP_GK5_View {
20    // article image generator
21    static function image($config, $item, $only_url = false, $pm = false, $links = false){      
22       if(!($config['news_content_image_pos'] != 'disabled' || $pm || $links)) {
23         return '';
24       }
25       
26       // Four05 Hack to include article link
27       $IMG_LINK = static::itemLink($item, $config);
28       $IMG_SOURCE = '';
29       $item['title'] = str_replace('"', "&quot;", $item['title']);
30       $uri = JURI::getInstance();
31       $IMG_SOURCE = static::originalImage($config, $item);
32       //
User avatar
Fresh Boarder

GK User
Mon Nov 02, 2015 7:36 pm
Thanks for this deep analyse, I'll post this info to our devteam.
User avatar
Moderator

GK User
Tue Nov 03, 2015 8:18 am
Hi Guys,

Thanks Four05 for the temp fix, however this morning the devs have posted an updated version 1.9.2.1 which I can confirm has cured the problem :-)

Nice 1!
User avatar
Senior Boarder

GK User
Wed Nov 04, 2015 9:18 am
Yes, with 1.9.2.1 the issue should be fixed.
User avatar
Moderator


cron