Page MenuHomePhabricator

Transclude Special:RelatedChanges on a page adds unexpected parameters to the URL
Closed, ResolvedPublic

Description

Initial report

Case 1

Two transclusions on https://ru.wikipedia.org/wiki/Проект:Электроника
RelatedChanges are at the bottom:

;Свежие правки в обсуждениях
<div style="height: 350px; border: 1px solid black; overflow: auto; padding: 3px" >
{{Служебная:Связанные правки/Категория:Статьи проекта Электроника  |limit=100 |namespace=0 |days=30 |associated=1}}
</div>
;Свежие правки в статьях
<div style="height: 350px; border: 1px solid black; overflow: auto; padding: 3px" >
{{Служебная:Связанные правки/Категория:Электроника  |limit=100 |namespace=0 |days=30 |associated=1}}
</div>

URL is now https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%BE%D0%B5%D0%BA%D1%82:%D0%AD%D0%BB%D0%B5%D0%BA%D1%82%D1%80%D0%BE%D0%BD%D0%B8%D0%BA%D0%B0?hidebots=1&hidecategorization=1&hideWikibase=1&limit=50&days=7&urlversion=2

Case 2, test

https://fr.wikipedia.org/wiki/Utilisateur:Trizek_(WMF)/Brouillon on my test page.
URL is now https://fr.wikipedia.org/wiki/Utilisateur:Trizek_(WMF)/Brouillon?hidebots=1&hidecategorization=1&hideWikibase=1&limit=50&days=7&urlversion=2

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is because mediawiki.rcfilters.filters is loaded on those pages, inited and then triggers

mw.rcfilters.Controller.prototype.replaceUrl() from rcfilters.init();

Change 398206 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/core@master] RCFilters: Don't load JS or redirect when transcluding

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

It adds foreign CSS too, messing with the page layout (removing the indentation between the page title and the content, for example).

It adds foreign CSS too, messing with the page layout (removing the indentation between the page title and the content, for example).

Do you have an example of that please? Is it changing how the results are supposed to be displayed by default or how they are supposed to be displayed following a local CSS?

Do you have an example of that please? Is it changing how the results are supposed to be displayed by default or how they are supposed to be displayed following a local CSS?

Go to case 1 and then go to https://ru.wikipedia.org/wiki/Проект:Химия for a comparison. Also see https://ru.wikipedia.org/wiki/Проект:Физика with the same effect (‘Материал из Википедии — свободной энциклопедии’ is presented without a margin).

I'm not sure to understand your problem. You want to have a margin like on the following example?

Capture d’écran_2017-12-19_15-57-32.png (338×392 px, 62 KB)

(It is taken from https://ru.wikipedia.org/wiki/Проект:Электроника. The one on top is a possible change, the one below is the current state.)

I'm not sure to understand your problem. You want to have a margin like on the following example?
(It is taken from https://ru.wikipedia.org/wiki/Проект:Электроника. The one on top is a possible change, the one below is the current state.)

Ah, I am sorry for not clarifying, the margin is not present right after the subtitle on top of the page. The CSS that is causing this:

.client-js #contentSub, .client-js form#mw-watchlist-resetbutton {
    display: none;
}

I trying to know if the change was local or not.

Ah, I am sorry for not clarifying, the margin is not present right after the subtitle on top of the page. The CSS that is causing this:

.client-js #contentSub, .client-js form#mw-watchlist-resetbutton {
    display: none;
}

I can't find this on https://ru.wikipedia.org/wiki/Проект:Электроника.

It's even worse.

See

Not only in the first case there is no return to the upper page ("< Участник:Jack who built the house") and the margin is eaten between "Материал из Википедии — свободной энциклопедии" and "Text in the beginning."; the page URL changes after load to https://ru.wikipedia.org/wiki/Участник:Jack_who_built_the_house?hidebots=1&hidecategorization=1&hideWikibase=1&limit=50&days=7&enhanced=1&target=related_changes_bug&urlversion=2 (note the disappearance of the "/related_changes_bug" part).

I've seen that. That's not cool.

To follow up on that:

It adds foreign CSS too, messing with the page layout (removing the indentation between the page title and the content, for example).

I'm still confused by that problem. What do you expect? To see a title, like "Recent changes for category:Электроника" on top of the results list? If so, there is pro and cons for that. It is easier to add a title manually than hide it for specific cases.

I uploaded a patch for this 5 days ago, but nobody's reviewed it yet. I'll poke some people.

Unfortunately we're in the holiday deployment freeze, so we probably can't deploy my fix until January 2nd.

What do you expect?

I don't mean the Recent changes block itself, what I mean is just disappeared margin here:

image.png (93×741 px, 15 KB)

Normally, there is a free space there.

Change 398206 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Don't load JS or redirect when transcluding

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

The specific fix (for unexpected parameters to the URL) is in place - transcluded RelatedChanges will go only with the parameters that are given in the transclusion itself - e.g. limit=100 |namespace=0 |days=30 |associated=1 showlinkedto=1.

The displayed result set won't depend on Preference settings for RC page or for RC/Related changes defaults settings - which is correct.