Last modified: 2014-03-14 19:55:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52399, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50399 - {{fullurl:}} does not resolve to commons.m.wikimedia.org but to commons.wikimedia.org
{{fullurl:}} does not resolve to commons.m.wikimedia.org but to commons.wikim...
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.22.0
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 53180 62640 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-28 21:53 UTC by Rainer Rillke @commons.wikimedia
Modified: 2014-03-14 19:55 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rainer Rillke @commons.wikimedia 2013-06-28 21:53:57 UTC
When using {{fullurl:{{FULLPAGENAME}}|action=x}}, even when visiting commons.m.wikimedia.org, the link generated points to commons.wikimedia.org.

Expected behavior: Link pointing to commons.m.wikimedia.org
Comment 1 Jon 2013-07-01 17:39:43 UTC
Could I ask why this is the expected behaviour?

It is generating a link to the canonical url. On a mobile phone this will redirect to the mobile site. On a desktop it would redirect to desktop. I don't see why expect different behaviour - am I misunderstanding something?

In what cases would it be useful to generate a link that takes you to mobile rather than desktop?

If this is useful I could imagine (although not sure how complicated this would be) a new wiki syntax - but that should be a new feature request.
{{mobileurl:{{FULLPAGENAME}}|action=x}}
Comment 2 Rainer Rillke @commons.wikimedia 2013-07-01 22:41:00 UTC
(In reply to comment #1)
> On a mobile phone this will redirect to the mobile site.
So using protocol relative URLs and fullurl has the same effect? Is this expected behaviour?

> On a desktop it would redirect to desktop.
It doesn't "redirect". The generated URL points directly to the "desktop" version.

> In what cases would it be useful to generate a link that takes you to mobile
> rather than desktop?
If someone found the mobile version very pleasant and want to use it with a desktop device.

If this doesn't fit in your philosophy just close this.
Comment 3 Jon 2013-07-01 22:55:26 UTC
This would essentially meaning changing the content that renders for mobile on desktop and would thus effect our caching infrastructure and performance of mobile.

Currently {{fullurl has no idea if you are invoking it from mobile or desktop so always creates a desktop link). The desktop link should be protocol relative. e link to the desktop site should redirect to mobile if and only if the user is on a mobile device.


If you think such a feature would be useful please do raise an enhancement bug for the creation of a {{mobileurl: shortcut to do so. However this would fit into a feature request for the MediaWiki parser - not much we can do here in the mobile team -
You can raise a bug for this suggestion here:
https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki&component=Parser

Thanks for raising this
Comment 4 Rainer Rillke @commons.wikimedia 2013-07-02 08:14:14 UTC
Formerly, Wikimedia had secure.wikimedia.org and {{fullurl: was aware if the visitor was on that domain, as far as I can remember, thus I thought it can't be that hard. I apologize for my naive thinking.
Comment 5 Max Semenik 2013-08-21 22:27:13 UTC
*** Bug 53180 has been marked as a duplicate of this bug. ***
Comment 6 Derk-Jan Hartman 2013-08-21 23:01:39 UTC
The problem here is one of the oldest in MediaWiki linking. You can't use a local url to create an 'external' link and you can't use an internal link if you want/need to add query elements:

This is not possible:
[[Special:UserLogin?returnto=anotherpage]]

This would be ideal, but is not possible
[{{localurl:Special:UserLogin|returnto=anotherpage}} linkname]

So we use this:
[{{fullurl:Special:UserLogin|returnto=anotherpage}} linkname]

So yes indeed, we used to have to fragment the cache for exactly this problem when we used secure.wikimedia.org

I don't think we want to repeat that, but it is something that needs solving in core in order to sustainably avoid that we redirect users left and right. (Note that the fullurl links are frequent in many UI messages for instance.

I can't find the ticket for this right now, but I'm sure there is one out there for this problem.
Comment 7 Ryan Kaldari 2013-08-21 23:41:06 UTC
Reopening. Here's an example of how this can be an actual issue for a mobile user:
1. Go to en.m.wikipedia.org/wiki/NoExisto (on either a mobile device or desktop)
2. Click "Start the NoExisto article"

Expected result:
You get the mobile editing interface.

Actual result:
You get the desktop editing interface.

Yes, the cache would be fragmented, but only in the rare cases that a page is using fullurl to work around the problem described by Derk-Jan.
Comment 8 Jon 2014-03-14 19:55:31 UTC
*** Bug 62640 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links