Page MenuHomePhabricator

Sidebar Links with ampersand (&)
Closed, DeclinedPublic

Description

Author: mariogzuk

Description:
If I use a link such as
http://sourceforge.net/tracker/?atid=712840&group_id=127437&func=browse which
contains an ampersand the link target shows up to
http://..../index.php/--error:_link_target_missing--.


Version: 1.5.x
Severity: normal
URL: http://unattended.technikz.de

Details

Reference
bz5243

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:08 PM
bzimport set Reference to bz5243.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

For these situations, create a page in the MediaWiki namespace and place the URL
in that. Then reference the message name (minus the MediaWiki prefix) instead of
the URL in the sidebar.

mariogzuk wrote:

Why you resolved this? This is a bug! The dokumentation says tha with version
1.5 it will be possible to simple add URLs into the sidebar. That works as well
as you dont use the ampersand. What you wrote is a solution---but it doenst
solve the problem......

The sidebar works like this: you supply the names of MediaWiki localized message
keys in MediaWiki:Sidebar. The referenced messages contain descriptive text (for
the text part), or link names (for the links). The links can either be URLs or
wiki page titles.

As long as that's working, and you seem to be agreeing that it is, this is a
WORKSFORME. If it's not working, provide some more specific information please.

mariogzuk wrote:

Ok try out that in the sidebar:

http://somewhere.com/test.html?zz=1&xy=2 |Linkname

In the function checkTitle ( &$title, &$name ) file Skin.php the $title is no
object (in the case of the example above). But I dont know where to search for
the reason why this is no object. And if it is no object the error: link target
missing is the retun of this function.

What more informations do you need?

robchur wrote:

An ampersand is not a valid character in a page title. Hence it fails. Hence the
reason we provide another means of doing it.

The documentation is either wrong or needs clarification.

mariogzuk wrote:

Its not valid in the page title, but this is a link....... Just forget it if
nobody wants|need it.

Rob, an ampersand *is* a valid character in a page title.

Mario, you need to use message names in MediaWiki:Sidebar. The contents of the messages
are then loaded, and *those* contain the text and link names.

mariogzuk wrote:

I dont understand it. Please give me an example how to use such a link in the
sidebar:

http://somewhere.com/test.html?zz=1&xy=2 |Linkname

If nobody has a solution and anybody means that this is no bug just close this
"bug".....

In MediaWiki:Sidebar:

  • Linkurl|Linkname

In MediaWiki:Linkurl:
http://somewhere.com/test.html?zz=1&xy=2

In MediaWiki:Linkname:
My Cool Link

mariogzuk wrote:

In MediaWiki:Sidebar:

  • Linkurl|Linkname

Did you read the report? This is exactly what is whout a function if you use a
link with an ampersamd....

(In reply to comment #9)
In MediaWiki:Sidebar:

  • Linkurl | Linkname
  • mailto:name@domain.tld?Subject=this&body=Hello%20my%20dear%20Wikiadmin | Mail

to Admin

Reopening the bug, because this really does not work.

robchur wrote:

(In reply to comment #9)

mailto:name@domain.tld?Subject=this&body=Hello%20my%20dear%20Wikiadmin

^^ that bit goes in something like MediaWiki:Email-url. You then put "email-url"
in MediaWiki:Sidebar. This is documented at
http://www.mediawiki.org/wiki/Help:Navigation_bar!

(In reply to comment #12)

.. that bit goes in something like MediaWiki:Email-url. You then put "email-url"
in MediaWiki:Sidebar. This is documented at

http://www.mediawiki.org/wiki/Help:Navigation_bar#Link_target

Thanks for the extremly helpful link.
I refactored that specific section and added a complex example for "mailto:..."

Everything works as explained - "indirect addressing" via the MediaWiki:my-url
is a very surprising feature here.

mariogzuk wrote:

  • Since MediaWiki version 1.5, you can alternatively link to an external URL by

just inserting the target URL before the vertical bar, as in this example:

http://www.domain.com |Link to Domain

That is the MAIN content of this bug. Because this doesnt work as described!
Please dont post everer and ever agian the old style to do the "linking".

Thank you

That sounds like it would cause confusion from people trying to use strings that are
not message keys; I'd strongly recommend removing this so that the message keys can
work consistently.