Last modified: 2013-05-28 04:58:24 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 T50486, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48486 - Many RDF link tags being added to page (in some cases thousands)
Many RDF link tags being added to page (in some cases thousands)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-15 01:31 UTC by Jamie Thingelstad
Modified: 2013-05-28 04:58 UTC (History)
4 users (show)

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


Attachments

Description Jamie Thingelstad 2013-05-15 01:31:36 UTC
I originally opened bug 48469 against Semantic Forms but further testing identified it was not Semantic Forms. This appears to be an issue in the current 1.9a master of Semantic MediaWiki.

I'm using the master branch (current pull) of Semantic Forms on a complicated
form at this URL:

http://wiki.planetkubb.com/w/index.php?title=Game:Pfälzer_Kubb_Open_2013_Final_Kubb%27Ings_v._Checkeletti_(Game_2)&action=formedit

when logged in and using edit with form the HTML output has 1,800+ lines of
"application/rdf+xml" links like:

<link type="application/rdf+xml" title="Game:Pfälzer Kubb Open 2013 Final
Kubb'Ings v. Checkeletti (Game 2)"
href="/w/index.php?title=Special:ExportRDF/Game:Pf%C3%A4lzer_Kubb_Open_2013_Final_Kubb%27Ings_v._Checkeletti_(Game_2)&amp;xmlmime=rdf"
/>

In the example I just pulled via curl there are 1,844 link tags bloating the
final HTML output to 616k.

Upon further debugging this is coming from SMW in ParserTextProcessor.php in the getRDFUrl function, see bug 48469, comment 6.
Comment 1 Jamie Thingelstad 2013-05-15 01:32:02 UTC
*** Bug 48469 has been marked as a duplicate of this bug. ***
Comment 2 Jamie Thingelstad 2013-05-15 01:40:54 UTC
I thought I would check another site and form and I can confirm this is happening there too. This seems to be a generic issue, but the number of links grows with the number of form elements.

http://wikiapiary.com/w/index.php?title=WikiApiary&action=formedit

has 162 instances of that link tag.
Comment 3 MWJames 2013-05-15 01:56:51 UTC
Could you try [1] and see if it solves the issue.

[1] https://gerrit.wikimedia.org/r/#/c/63273/
Comment 4 MWJames 2013-05-15 02:09:32 UTC
I do wonder if this only happens where SF is involved, because on pages such as smw.org or translatewiki I can't find those pages.
Comment 5 Jamie Thingelstad 2013-05-15 02:21:59 UTC
I could not get this behavior to display in any case other than editing with a form. If I edit the wikitext without the form, this doesn't happen. I'll try to the patch.
Comment 6 Jamie Thingelstad 2013-05-15 02:28:43 UTC
I did

git pull https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticMediaWiki refs/changes/73/63273/1

and indeed the thousands of link tags are no longer present. Thanks MWJames!
Comment 7 MWJames 2013-05-15 02:33:10 UTC
Well, above change was not in respond to this reported behaviour rather placing the link generation at the right place.

I don't hope SF is using some static function that stores state related information about objects (objects should read from the actual ParserOutput). The only function that calls ParserTextProcessor is the InternalParseBeforeLinks hook.

I'd like to have an input from SF an that behaviour because it only seems to occur when SF is involved.
Comment 8 Jamie Thingelstad 2013-05-15 02:44:21 UTC
The original bug I opened was bug 48469 on Semantic Forms but Yaron didn't think it was an issue with that. I also suspected it might have been Semantic Forms Inputs, but tests proved that wrong. And when I saw this is on WikiApiary too it was clear this is something with SMW and/or SF. I don't know the internals well enough, but looking at SF_FormPrinter.php is probably where any potential issue would be.
Comment 9 MWJames 2013-05-15 03:10:15 UTC
Jamie, it would help if you could try isolate which function is calling "ParserTextProcessor" or "InternalParseBeforeLinks" one after another.

In general, InternalParseBeforeLinks is called before an article is displayed or previewed and because ParserTextProcessorTest and HooksTest (includes the InternalParseBeforeLinks test) only show expected behaviour, it means some function is "ridding" the InternalParseBeforeLinks bus more often during a session.
Comment 10 MWJames 2013-05-28 04:58:24 UTC
[1] has been merged May 15 and while I still think it is an issue in connection with SF or SFI, the original issue of "too many RDF links" is no longer prevalent and therefore this bug is rendered fixed.

[1] https://gerrit.wikimedia.org/r/#/c/63273/

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


Navigation
Links