Last modified: 2012-02-16 19:52:49 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 T36044, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34044 - URLs with semantic property of type URL comes out with http:////...
URLs with semantic property of type URL comes out with http:////...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All Linux
: Unprioritized trivial with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 34312 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-30 17:15 UTC by Magnus Enger
Modified: 2012-02-16 19:52 UTC (History)
5 users (show)

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


Attachments

Description Magnus Enger 2012-01-30 17:15:42 UTC
Tested with MediaWiki 1.18.0, Semantic MediaWiki 1.7.0.1. 

* Steps to Reproduce:

Create 
- a property "Website" of type "URL" 
- a template "URLtest" that contains a field called "URL", that outputs the field in two different ways: 

1. {{{URL}}}
2. [[Website::{{{URL|}}}]]

Use the template in a page, like this: 

{{URLtest|URL=http://example.com/}}

* Actual Results:

1. Outputs the URL as expected

2. Outputs it as <a href="http:////example.com/">http://example.com/</a>

In the factbox at the bottom of the page it is output as <a href="http:////example.com/">http:////example.com/</a>

Live example: http://bibliotekhistorie.no/index.php/Norsk_Bibliotekforening

Expected Results:

Both 1. and 2. should output http://example.com/ and the link in the factbox should also be correct. 

* Additional Information:

If I change the property of "Website" from "URL" to "Text", there are no extra slashes in the URL. 

Firefox will try to gloss over this problem - when you hover over a link it will not show the extra slashes and links will work, but if you view source or use the "insepect element" function of Firebug you can still see it. Internet Explorer is less "kind" and there the links with extra slashes will not work.
Comment 1 badon 2012-02-09 06:07:13 UTC
I have encountered this bug too. The template steps are not required (I am using SMW 1.7.0.2). Any property of type URL will show an incorrect URL in the SMW factbox, with extra forward slashes. I haven't noticed the problem anywhere else but the factbox. It appears properties can be queried and displayed normally, outside the factbox.
Comment 2 [[kgh]] 2012-02-10 00:33:06 UTC
*** Bug 34312 has been marked as a duplicate of this bug. ***
Comment 3 [[kgh]] 2012-02-10 00:36:31 UTC
As per badon. Thus changing to trivial, though a hopefully quick fix will be cool.
Comment 4 Jeroen De Dauw 2012-02-10 01:20:34 UTC
Workaround: use foo.bar instead of http://foo.bar as value.

Hopeful fix: r111141

Would be great if this could be verified. I find this code rather confusing, so hope I did not break the URL stuff on some other place now...
Comment 5 [[kgh]] 2012-02-12 11:48:43 UTC
I just tested your fix. The behaviour within the factbox is now as expected and it is also possible to query for URLs without side effects. The links work and everything looks fine. :)

The workaround is not really feasible since you get validation errors then using forms. You are asked to include http://
Comment 6 Gregor Hagedorn 2012-02-16 07:40:04 UTC
I just run into this bug as well, good to see it already fixed. However, the newest release of SMW 

(updated via
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMediaWiki/REL_1_7_0_2 SemanticMediaWiki
)

still seems to contain the bug. Do you recommend upgrading to unstable, or will there be a bug-fix release soon? (I would prefer the latter).

This bug is fundamentally breaking SMW. It was also hard to find. We now understand that it does not break any of the testing browsers (IE 8/9, FF, Chrome) that we regularly use, it only breaks some browsers (definitely older IE, but we also have one smartphone report, not which browser that is).
Comment 7 [[kgh]] 2012-02-16 10:08:06 UTC
SMW 1.7.1 will be around in approximately two weeks. I would wait for this release, since mostly ancient IE versions seem to be involved.
Comment 8 Jeroen De Dauw 2012-02-16 17:43:50 UTC
Yes, in two weeks. 

> This bug is fundamentally breaking SMW.

It's a formatting issue of values in one of the lesser used data types, does not seem like a very fundamental issue :)

> It was also hard to find. We now understand that it does not break any of the testing browser

As far as I can see this is not browser related at all, so how do you figure it is?
Comment 9 Gregor Hagedorn 2012-02-16 19:46:11 UTC
> > This bug is fundamentally breaking SMW.
> 
> It's a formatting issue of values in one of the lesser used data types, does
> not seem like a very fundamental issue :)

It makes the resulting pages unusable for users with certain browsers. They click on presumed links and report that it is "completely" broken. Whether that is "fundamental" or not depends of course.
 
> > It was also hard to find. We now understand that it does not break any of the testing browser
> 
> As far as I can see this is not browser related at all, so how do you figure it
> is?

FF, IE 8ff, Chrome are ERROR tolerant. To my knowledge it is not standard conformant for a domain name to start with two slashes, as in "http:////www...". So in this sense it is browser related, and because the reports were not reproducible in our test browsers, we did not understand them. I guess this is the reason why the bug remained unreported so long - we had the bug for a long time, but could not figure it out.
Comment 10 badon 2012-02-16 19:52:49 UTC
It may be browser related because some browsers might try to detect the problem
and correct it transparently for the user. That's my best guess.

I was able to work around the problem by adding a text URL property type that contains the same data. In any case, the text URL property type is the only way to gain control over link formatting, as far as I know, such as if you want to change the link text from a URL to something more descriptive ("click here to see X").

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


Navigation
Links