[MediaWiki-l] Template displays different values for Firefox, Chrome

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Template displays different values for Firefox, Chrome

Paul Galbraith
Can anybody help me understand why this template displays different values
in Firefox than it does in Chrome?

https://ddowiki.com/page/Template:Item

You can see quite clearly in the two examples that are on the template
page, if you check in different browsers.  In Firefox the results are what
I would expect, the link labels are "Carnifex" and "mirror".  However, in
Chrome (and Edge) the labels are "I:Carnifex" and "I:mirror", which based
on the template code I would not expect at all.  Does anyone know why this
is happening?
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

Dan Garry (Deskana)
I can't reproduce the problem; I see "Carnifex" and "mirror" in both Chrome
and Firefox.

I don't know what could be causing it, so can't recommend much other than
the standard things such clearing your cache, etc.

Dan

On Tue, 10 Dec 2019 at 03:21, Paul Galbraith <[hidden email]>
wrote:

> Can anybody help me understand why this template displays different values
> in Firefox than it does in Chrome?
>
> https://ddowiki.com/page/Template:Item
>
> You can see quite clearly in the two examples that are on the template
> page, if you check in different browsers.  In Firefox the results are what
> I would expect, the link labels are "Carnifex" and "mirror".  However, in
> Chrome (and Edge) the labels are "I:Carnifex" and "I:mirror", which based
> on the template code I would not expect at all.  Does anyone know why this
> is happening?
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

Brian Wolff
Well this weird. I was able to reprofuce the I on samsung internet browser
but not firefox. Also template: was shortened to T: in interface as well
(in the view source page which should be uncached). I've never seen
anything like this before.


Can you paste all namespace configs from LocalSettings.php? Especially
$wgExtraNamespaces. Do you have any extensions that do weird things with
namespaces or hook into any of the Linker/linkrenderer hooks?

On Tue, Dec 10, 2019 at 1:35 AM Dan Garry (Deskana) <[hidden email]>
wrote:

> I can't reproduce the problem; I see "Carnifex" and "mirror" in both Chrome
> and Firefox.
>
> I don't know what could be causing it, so can't recommend much other than
> the standard things such clearing your cache, etc.
>
> Dan
>
> On Tue, 10 Dec 2019 at 03:21, Paul Galbraith <[hidden email]>
> wrote:
>
> > Can anybody help me understand why this template displays different
> values
> > in Firefox than it does in Chrome?
> >
> > https://ddowiki.com/page/Template:Item
> >
> > You can see quite clearly in the two examples that are on the template
> > page, if you check in different browsers.  In Firefox the results are
> what
> > I would expect, the link labels are "Carnifex" and "mirror".  However, in
> > Chrome (and Edge) the labels are "I:Carnifex" and "I:mirror", which based
> > on the template code I would not expect at all.  Does anyone know why
> this
> > is happening?
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

David Gerard-2
I saw the problem as reported in Firefox and Chromium, both on Linux.

On Tue, 10 Dec 2019 at 10:46, Brian Wolff <[hidden email]> wrote:

>
> Well this weird. I was able to reprofuce the I on samsung internet browser
> but not firefox. Also template: was shortened to T: in interface as well
> (in the view source page which should be uncached). I've never seen
> anything like this before.
>
>
> Can you paste all namespace configs from LocalSettings.php? Especially
> $wgExtraNamespaces. Do you have any extensions that do weird things with
> namespaces or hook into any of the Linker/linkrenderer hooks?
>
> On Tue, Dec 10, 2019 at 1:35 AM Dan Garry (Deskana) <[hidden email]>
> wrote:
>
> > I can't reproduce the problem; I see "Carnifex" and "mirror" in both Chrome
> > and Firefox.
> >
> > I don't know what could be causing it, so can't recommend much other than
> > the standard things such clearing your cache, etc.
> >
> > Dan
> >
> > On Tue, 10 Dec 2019 at 03:21, Paul Galbraith <[hidden email]>
> > wrote:
> >
> > > Can anybody help me understand why this template displays different
> > values
> > > in Firefox than it does in Chrome?
> > >
> > > https://ddowiki.com/page/Template:Item
> > >
> > > You can see quite clearly in the two examples that are on the template
> > > page, if you check in different browsers.  In Firefox the results are
> > what
> > > I would expect, the link labels are "Carnifex" and "mirror".  However, in
> > > Chrome (and Edge) the labels are "I:Carnifex" and "I:mirror", which based
> > > on the template code I would not expect at all.  Does anyone know why
> > this
> > > is happening?
> > > _______________________________________________
> > > MediaWiki-l mailing list
> > > To unsubscribe, go to:
> > > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> > >
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

Hershel Robinson-2
Interesting. On my Linux box, I see it on Chromium but not Firefox, and
both are the latest versions.

On 12/10/19 1:47 PM, David Gerard wrote:

> I saw the problem as reported in Firefox and Chromium, both on Linux.
>
> On Tue, 10 Dec 2019 at 10:46, Brian Wolff <[hidden email]> wrote:
>>
>> Well this weird. I was able to reprofuce the I on samsung internet browser
>> but not firefox. Also template: was shortened to T: in interface as well
>> (in the view source page which should be uncached). I've never seen
>> anything like this before.
>>
>>
>> Can you paste all namespace configs from LocalSettings.php? Especially
>> $wgExtraNamespaces. Do you have any extensions that do weird things with
>> namespaces or hook into any of the Linker/linkrenderer hooks?
>>
>> On Tue, Dec 10, 2019 at 1:35 AM Dan Garry (Deskana) <[hidden email]>
>> wrote:
>>
>>> I can't reproduce the problem; I see "Carnifex" and "mirror" in both Chrome
>>> and Firefox.
>>>
>>> I don't know what could be causing it, so can't recommend much other than
>>> the standard things such clearing your cache, etc.
>>>
>>> Dan
>>>
>>> On Tue, 10 Dec 2019 at 03:21, Paul Galbraith <[hidden email]>
>>> wrote:
>>>
>>>> Can anybody help me understand why this template displays different
>>> values
>>>> in Firefox than it does in Chrome?
>>>>
>>>> https://ddowiki.com/page/Template:Item
>>>>
>>>> You can see quite clearly in the two examples that are on the template
>>>> page, if you check in different browsers.  In Firefox the results are
>>> what
>>>> I would expect, the link labels are "Carnifex" and "mirror".  However, in
>>>> Chrome (and Edge) the labels are "I:Carnifex" and "I:mirror", which based
>>>> on the template code I would not expect at all.  Does anyone know why
>>> this
>>>> is happening?
>>>> _______________________________________________
>>>> MediaWiki-l mailing list
>>>> To unsubscribe, go to:
>>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>>
>>> _______________________________________________
>>> MediaWiki-l mailing list
>>> To unsubscribe, go to:
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>

--
http://civihosting.com/
Simply the best in Linux hosting -- Shared and VPS

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

David Gerard-2
On Tue, 10 Dec 2019 at 12:06, Hershel Robinson
<[hidden email]> wrote:

> Interesting. On my Linux box, I see it on Chromium but not Firefox, and
> both are the latest versions.

no no, I mean I saw the same behaviour as the original reporter, and
you, are seeing


- d.

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

Hershel Robinson-2
What I see on  in Firefox 71 is correct, meaning "Carnifex" and here is
a screenshot:

https://imgur.com/9zZG9Hp.png

and on Chromium "Version 78.0.3904.108 (Official Build) Arch Linux
(64-bit)" I see "I:Carnifex" and here is a screenshot:

https://imgur.com/vpI09M0.png

Hershel

--
http://civihosting.com/
Simply the best in Linux hosting -- Shared and VPS

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

David Gerard-2
yep, that's what I see

On Tue, 10 Dec 2019 at 12:18, Hershel Robinson
<[hidden email]> wrote:

>
> What I see on  in Firefox 71 is correct, meaning "Carnifex" and here is
> a screenshot:
>
> https://imgur.com/9zZG9Hp.png
>
> and on Chromium "Version 78.0.3904.108 (Official Build) Arch Linux
> (64-bit)" I see "I:Carnifex" and here is a screenshot:
>
> https://imgur.com/vpI09M0.png
>
> Hershel
>
> --
> http://civihosting.com/
> Simply the best in Linux hosting -- Shared and VPS
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

WikiMedia General mailing list
To me it looks like JS related issue.

What are you using to rewrite Item:Pagename to just Pagename. On the Pagenames with Prefix ie namespace the list of pagenames all have the I: prefix. Plus, I can see the the FOUC (for lack of a better general term) as all links are rewritten with the I: prefix which has to be JS. Disabling JavaScript the prefix disappears and browsing to various page names the prefix stays there.

Tom

> On Dec 10, 2019, at 7:21 AM, David Gerard <[hidden email]> wrote:
>
> yep, that's what I see
>
>> On Tue, 10 Dec 2019 at 12:18, Hershel Robinson
>> <[hidden email]> wrote:
>>
>> What I see on  in Firefox 71 is correct, meaning "Carnifex" and here is
>> a screenshot:
>>
>> https://imgur.com/9zZG9Hp.png
>>
>> and on Chromium "Version 78.0.3904.108 (Official Build) Arch Linux
>> (64-bit)" I see "I:Carnifex" and here is a screenshot:
>>
>> https://imgur.com/vpI09M0.png
>>
>> Hershel
>>
>> --
>> http://civihosting.com/
>> Simply the best in Linux hosting -- Shared and VPS
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

Bartosz Dziewoński
In reply to this post by Paul Galbraith
On 2019-12-10 04:20, Paul Galbraith wrote:

> Can anybody help me understand why this template displays different values
> in Firefox than it does in Chrome?
>
> https://ddowiki.com/page/Template:Item
>
> You can see quite clearly in the two examples that are on the template
> page, if you check in different browsers.  In Firefox the results are what
> I would expect, the link labels are "Carnifex" and "mirror".  However, in
> Chrome (and Edge) the labels are "I:Carnifex" and "I:mirror", which based
> on the template code I would not expect at all.  Does anyone know why this
> is happening?

This is caused by the code here:
https://ddowiki.com/page/MediaWiki:Gadget-nsShortener.js

$( 'a.item' ).each( function() {
        $( this ).html( 'I:' + $( this ).html() );
} );

This adds the "I:" before the links.

I think the differences between different browsers are not because of
the browsers, but because of the basically random loading order. This
piece of code relies on the "item" CSS class, which is added by JS code
here: https://ddowiki.com/page/MediaWiki:Common.js

$( 'a[href^="/page/Item:"]' ).each( function() {
     $( this ).addClass( 'item' );
     $( this ).html( $( this ).html().replace( 'Item:', '' ) );
} );

However there is nothing to enforce that it runs before that one. If
they run in the wrong order, the "I:" won't be added.

Try adding "|dependencies=site" to the entry for "nsShortener" on
https://ddowiki.com/page/MediaWiki:Gadgets-definition , I think that's
the right way to fix this.

--
Bartosz Dziewoński

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Template displays different values for Firefox, Chrome

Paul Galbraith
Wow thanks very much, Bartosz and everybody else who's responded.  I'm brand new to mediawiki and never would have been able to figure this out on my own.

⁣Get BlueMail for Android ​

On Dec. 10, 2019, 10:20, at 10:20, "Bartosz Dziewoński" <[hidden email]> wrote:

>On 2019-12-10 04:20, Paul Galbraith wrote:
>> Can anybody help me understand why this template displays different
>values
>> in Firefox than it does in Chrome?
>>
>> https://ddowiki.com/page/Template:Item
>>
>> You can see quite clearly in the two examples that are on the
>template
>> page, if you check in different browsers.  In Firefox the results are
>what
>> I would expect, the link labels are "Carnifex" and "mirror".
>However, in
>> Chrome (and Edge) the labels are "I:Carnifex" and "I:mirror", which
>based
>> on the template code I would not expect at all.  Does anyone know why
>this
>> is happening?
>
>This is caused by the code here:
>https://ddowiki.com/page/MediaWiki:Gadget-nsShortener.js
>
>$( 'a.item' ).each( function() {
> $( this ).html( 'I:' + $( this ).html() );
>} );
>
>This adds the "I:" before the links.
>
>I think the differences between different browsers are not because of
>the browsers, but because of the basically random loading order. This
>piece of code relies on the "item" CSS class, which is added by JS code
>
>here: https://ddowiki.com/page/MediaWiki:Common.js
>
>$( 'a[href^="/page/Item:"]' ).each( function() {
>     $( this ).addClass( 'item' );
>     $( this ).html( $( this ).html().replace( 'Item:', '' ) );
>} );
>
>However there is nothing to enforce that it runs before that one. If
>they run in the wrong order, the "I:" won't be added.
>
>Try adding "|dependencies=site" to the entry for "nsShortener" on
>https://ddowiki.com/page/MediaWiki:Gadgets-definition , I think that's
>the right way to fix this.
>
>--
>Bartosz Dziewoński
>
>_______________________________________________
>MediaWiki-l mailing list
>To unsubscribe, go to:
>https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l