Page MenuHomePhabricator

Many RDF link tags being added to page (in some cases thousands)
Closed, InvalidPublic

Description

HTML generated showing the thousands of link tags.

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.


Version: master
Severity: normal

Attached:

Details

Reference
bz48469

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:35 AM
bzimport set Reference to bz48469.

Yikes! That RDF stuff is weird, but it's not coming from Semantic Forms - I have no idea what's producing it.

Very weird. Perhaps it's something with Semantic Forms Inputs? I'm using regex validation extensively in that form. The excessive links are not there when the page is viewed, or when source is edited. They are only there with the form is displayed. Must be something to do with either Forms or Form Inputs I would think.

Try removing the SFI input(s) from that form, then.

Yeah... no go. I disabled SFI entirely in LocalSettings and the edit page still had thousands of link tags added. Scanning the codebase for "rdf+xml" to see if I can come upon anything.

I just did a baseline update on all my extensions (groping for straws) but I still have thousands of link rdf+xml tags. I'm on 1.20.3 and I think 1.21 is dropping tomorrow. I'll upgrade and see if this persists, and then debug further if it is.

Okay, some information. I tracked down what is generating these links. SMW in ParserTextProcessor.php in the getRDFUrl function. I added a debug string to the title and generated the page and got the debug string, so this is the function that is being called 1,000+ times and adding stuff to the page. Looks like this should be moved to SMW bug. Doing that...

  • This bug has been marked as a duplicate of bug 48486 ***
Unknown Object (User) added a comment.May 15 2013, 2:44 AM

Actually this is still a SF bug since it doesn't occur in SMW itself and only in connection with SF [1] moves the link generation to an appropriate place (out of ParserTextProcessor) but it doesn't explain the mass generation for when SF is involved.

PS: The only place where ParserTextProcessor is called is the InternalParseBeforeLinks hook.

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

Judging from that other bug report, it looks like whatever was causing this to happen was changed/fixed on the SMW side, so I'm setting this back to "invalid".