Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip for image field in article shows wrong path #6799

Closed
Harmageddon opened this issue Apr 18, 2015 · 13 comments
Closed

Tooltip for image field in article shows wrong path #6799

Harmageddon opened this issue Apr 18, 2015 · 13 comments

Comments

@Harmageddon
Copy link
Contributor

Steps to reproduce the issue

  1. Create or edit an article in backend.
  2. In the tab "Images and links", set two different images for intro and fulltext image.
  3. Move your mouse over the fulltext image field.

Expected result

The path for the fulltext image should be displayed when hovering over the respective field.

Actual result

Instead, the tooltip always shows the path for the intro image.

Additional comments

Reported by user Cartho on joomla-bugs.de (original post), confirmed by @zero-24 and me. The JavaScript for this behavior comes from /libraries/cms/form/field/media.php (JFormFieldMedia class), but I wasn't able to fix it yet.

@dgrammatiko
Copy link
Contributor

There is #5871 which corrects this problem but will not be available before 3.5, unless @phproberto decides otherwise.

PS: the problem is fixed #5871 only for the bootstrap layout not for the classic mootools js.

@Harmageddon
Copy link
Contributor Author

@dgt41 Thank you, I didn't know this PR. I just applied it and the bug here is not really fixed, but the tooltip for the path is removed completely in Isis instead. I'm not sure if this is desireable. Also, as you wrote, the bug still exists in Hathor.

@dgrammatiko
Copy link
Contributor

@Harmageddon I just tested it again here and it looks ok:
screen shot 2015-04-18 at 9 41 39

Also in article (multiple media fields):
screen shot 2015-04-18 at 9 43 27

But yes the mootols is still wrong

@Harmageddon
Copy link
Contributor Author

@dgt41 I re-tested and commented on the PR.

@dgrammatiko
Copy link
Contributor

@Harmageddon I had a quick look at the code and I have to say that tips don’t respect the current field because the code behind them doesn’t care about the field id, so the tip in a multiple fields page will always show the first field...

@brianteeman
Copy link
Contributor

Note this is also true on ANY page that has two media fields as reported #7285


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6799.

This was referenced Jun 30, 2015
@gunjanpatel
Copy link
Contributor

So, do we have code fix for this issue? I guess Yes as far as I read the above conversation. But we have that for Joomla 3.5 series.
In summery, We have fix for this issue and it should be in "Confirmed" status. We should change it "pending" and close this issue in reference with the patch link?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6799.

@Bakual
Copy link
Contributor

Bakual commented Aug 6, 2015

The issue is basically coming from this line: https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/form/field/media.php#L260
The ID is given there hardcoded into the JavaScript code. Since that code is only loaded once per pageload and is supposed to work for all instances of the field, this obviously fails and takes the path of the first media field.
The fix is to either determine the field ID in the JavaScript code (or pass it when called) or have that code added multiple times.
Either way should work and will fix it in staging.

@dgrammatiko
Copy link
Contributor

@gunjanpatel It’s half solved, meaning the code for media layouts that used jquery+bootstrap is working fine but the old one with mootools still buggy. @Bakual is right with the comment above. Now someone needs to code that as well...

@luisorozoli
Copy link

@gunjanpatel @Bakual @dgt41 Do you know if this issue will be fix for the version 3.5?? Thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6799.

@dgrammatiko
Copy link
Contributor

@luisorozoli @Harmageddon @gunjanpatel can you test #8100 ?

@gunjanpatel
Copy link
Contributor

Thanks @dgt41 for fix. Tested and works fine.

@zero-24
Copy link
Member

zero-24 commented Oct 19, 2015

Closing as we have a now RTC PR here: #8100 Thanks.

@zero-24 zero-24 closed this as completed Oct 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants