Page MenuHomePhabricator

Bug: Page image thumbnails in history, saved pages, etc. do not respect namespace
Closed, ResolvedPublic1 Estimated Story Points

Assigned To
Authored By
Mholloway
Aug 17 2015, 9:37 PM
Referenced Files
F3364583: pasted_file
Feb 16 2016, 7:37 PM
F3364605: pasted_file
Feb 16 2016, 7:37 PM
F3364607: pasted_file
Feb 16 2016, 7:37 PM
F3364588: pasted_file
Feb 16 2016, 7:37 PM
F3364585: pasted_file
Feb 16 2016, 7:37 PM
F3364611: pasted_file
Feb 16 2016, 7:37 PM
F3140205: Screenshot_2015-12-23-13-55-07.png
Dec 23 2015, 10:27 PM
F3140196: Screenshot_2015-12-23-13-52-27.png
Dec 23 2015, 10:27 PM

Description

Steps to reproduce:

  1. Visit "User:Eloquence" and save the page.
  2. View saved pages list, see no page image thumbnail.
  3. Visit "Eloquence" and save the page.
  4. View saved pages list, see that both have a thumbnail from the mainspace Eloquence article.
  5. View history, see same.

Event Timeline

Mholloway raised the priority of this task from to Needs Triage.
Mholloway updated the task description. (Show Details)
Mholloway subscribed.

Probably related to, or a duplicate of, T107842: "Fix PageImagePersistenceHelper so it does not inappropriately set the namespace of all pages to null"

Bug still exists in current master branch.

@Dbrant, I'm thinking bug backlog, low priority,

Re-checked with 2.1.136-alpha-2015-12-18.

View saved pages list, see no page image thumbnail.

There is a thumbnail for any page in Saved and Recent:

Screenshot_2015-12-23-13-52-27.png (1×1 px, 121 KB)

Screenshot_2015-12-23-13-39-19.png (1×1 px, 132 KB)

  1. Search history presents, in fact, thumbnail images(not grey ones) for pages in File name space. Saved pages from File namespace do not display those images on Saved/History pages. You can see that discrepancy for File: "A challenge for Robin Hood"

Screenshot_2015-12-23-13-55-07.png (1×1 px, 433 KB)

  1. There is another issue with "User:Eloquence" page - filed as T122364: [2.1.136-alpha-2015-12-18]Collapsible templates are not fully displayed

@Dbrant Should we treat #2 as a bug?

bearND changed the task status from Open to Stalled.Feb 16 2016, 7:37 PM

I can repro this but a fix is more complicated than I thought.

Example data used: "User:Braveheart" and "Braveheart". This is how the DB looks like:

pasted_file (166×537 px, 20 KB)
pasted_file (199×530 px, 25 KB)

The app currently does this query:

SELECT savedpages.namespace, savedpages.title, pageimages.imageName FROM savedpages LEFT OUTER JOIN pageimages ON (savedpages.site = pageimages.site AND savedpages.title = pageimages.title)

pasted_file (92×474 px, 15 KB)

This is why we get the duplicate thumbnails.

One issue is that the title in the pageimages table includes the namespace prefix, see first screenshot.

Then I changed the app code to not add the prefix for pageimages entries.
I thought I could add the namespace columns to the join to make it work but this results in no thumbnails at all.

pasted_file (159×570 px, 21 KB)

pasted_file (163×774 px, 24 KB)

SELECT savedpages.namespace, savedpages.title, pageimages.imageName FROM savedpages LEFT  OUTER JOIN pageimages ON (savedpages.site = pageimages.site AND savedpages.title = pageimages.title AND savedpages.namespace = pageimages.namespace)

pasted_file (90×243 px, 6 KB)

MBinder_WMF set the point value for this task to 1.May 18 2016, 7:49 PM
Dbrant claimed this task.