Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
16 Mar 2014

Fix for Issue #3311

The img is changed to $img which should fix the issue.

Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33484

avatar Bakual Bakual - open - 16 Mar 2014
avatar Bakual Bakual - change - 23 Mar 2014
Title
Image preview mouseover throws "Uncaught ReferenceError: img is not defined"
[#33484] Image preview mouseover throws "Uncaught ReferenceError: img is not defined"
avatar Bakual Bakual - change - 23 Mar 2014
Title
Image preview mouseover throws "Uncaught ReferenceError: img is not defined"
[#33484] Image preview mouseover throws "Uncaught ReferenceError: img is not defined"
avatar Bakual
Bakual - comment - 25 Mar 2014

@AshanFernando The preview isn't updated when the image is changed. Do you have a clue why?

avatar AshanFernando
AshanFernando - comment - 26 Mar 2014

@Bakual The main cause is the image url path (e.g. images/sampledata/parks/banner_cradle.jpg) is relative. This causes images url to be incorrect for inner paths (e.g. http://myhostjoomla/administration/..) where the image url appends next (e.g. http://myhostjoomla/administration/images/sampledata/parks/banner_cradle.jpg where it should be http://myhostjoomla/images/sampledata/parks/banner_cradle.jpg) which is incorrect.

I found the issue in article versions -> preview image where it tries to fetch an image from wrong url. Will you be able to provide the steps to recreate the above mentioned one (JS error) with steps?

avatar Bakual
Bakual - comment - 26 Mar 2014

Nah, URL is correct. The issue was that $img.src = 'new_value' doesn't target what you think it does. If you want to change the src attribute with jQuery, you need to use $img.attr('src', 'new_value')

PR is updated.

avatar AshanFernando
AshanFernando - comment - 26 Mar 2014

May be I encounter another issue. Will be able to try the following scenario and clarify.
Edit article with image and save -> go to versions -> select one and press the preview -> in the new window the image link is wrong and not shown

avatar Bakual
Bakual - comment - 26 Mar 2014

This PR deals with this preview button in the article edit screen:
preview

The image display in the Version -> Preview is indeed a different issue.

avatar infograf768 infograf768 - reference | a571b07 - 27 Mar 14
avatar infograf768 infograf768 - merge - 27 Mar 2014
avatar infograf768 infograf768 - close - 27 Mar 2014
avatar infograf768 infograf768 - change - 27 Mar 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-03-27 10:12:09
avatar infograf768 infograf768 - close - 27 Mar 2014
avatar Bakual Bakual - head_ref_deleted - 27 Mar 2014
avatar Bakual Bakual - reference | f8b8691 - 12 May 14

Add a Comment

Login with GitHub to post a comment