Page MenuHomePhabricator

Gallery image with link=<internal page#section> going to top of <internal page>
Closed, ResolvedPublic

Description

Author: shadow

Description:
Setup:

  • have Mediawiki site (Site)
  • created a page (Page)
  • created section on Page (Section)
  • uploaded file to Site (Image.png)

The following does not appear to be working correctly:

<gallery>
File:Image.png|link=Page#Section
</gallery>

Instead of taking me to Page#Section, clicking on this image takes me to the top of Page. Oddly, if the Page#Section is part of an external site, it seems to work (unless a caption is added)

<gallery>
File:Image.png|link=http://www.Site.com/Page#Section
</gallery>

I started a discussion prior to creating this bug report:
http://www.mediawiki.org/wiki/Help_talk:Images#Linked_images_in_gallery

I've also setup a test page on my own wiki site
http://wiki.agent-a.com/Test


Version: 1.21.x
Severity: normal

Details

Reference
bz62343

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz62343.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Mar 6 2014, 9:23 PM

Thanks for taking the time to report this!

I'm not sure if I can reproduce from the steps mentioned above. Does this require JWPlayer to be installed?
Because when I scroll down on http://wiki.agent-a.com/JWPlayer , I only see "Could not load plugins: File not found". Or I just don't understand which image I was expected to click on the test page. :(

For the records (<gallery>): https://www.mediawiki.org/wiki/Help:Images#Rendering_a_gallery_of_images

shadow wrote:

Hey Andre,

There is no need to have JWPlayer installed, http://wiki.agent-a.com/JWPlayer is simply where I am directing my internal link examples. The images to click on are all on http://wiki.agent-a.com/Test.

The first two images are outside of a <gallery></gallery>, one internal link and one external link. These both work.

Next I have a <gallery></gallery> with three images.

The first image is an internal link. It takes me to the top of the correct page, but it does not take me to the section of the page specified in the link (click the internal link image outside of the gallery for expected behavior).

The second image is an external link. It works completely.

The third image is an external link to the same location as the second image. By accident I discovered that if you add a caption to the image in the gallery, the link stops working completely.

Hopefully the only thing necessary to reproduce the error is to try clicking on all five images on http://wiki.agent-a.com/Test, and then viewing the source.

Thanks,
Andy

Got it! Thanks!

Might be a duplicate report in the Parser area...

Change 141569 had a related patch set uploaded by Brian Wolff:
Allow fragments in link= parameter in <gallery> tags.

https://gerrit.wikimedia.org/r/141569

Change 141569 merged by jenkins-bot:
Allow fragments in link= parameter in <gallery> tags.

https://gerrit.wikimedia.org/r/141569