Last modified: 2011-01-12 16:46:40 UTC
It appears that special pages defined as inheriting from 'IncludableSpecialPage', and then embedded within another page, don't get their Javascript loaded correctly. The extension Semantic Forms defines such a special page, 'RunQuery', and you can see the problem when trying to press the button here: http://discoursedb.org/wiki/RunQuery_embed_test Here, by contrast, is the same page when not embedded: http://discoursedb.org/wiki/Special:RunQuery/Author If you look at the HTML source for the two pages, in the former page the Javascript resources that the special page loads are missing. This problem seems to have been in effect since at least MediaWiki 1.16. I looked into it a little, and it looks like the problem comes about because, when the special page is embedded, the OutputPage object that gets displayed to the screen is different from the $wgOut that the special page adds its Javascript to.
When embedding, you should add the necessary things into ParserOutput. Otherwise it will only works first time on uncached vies.
Hi Niklas, Could you be more specific about what needs to be added? Or point to some code that does it the right way?
Hi guys. Any news? :)
There is no right way to do it. Until there is one, I assume global $wgParser works.
What you think, Yaron? :)
Niklas, I sorry to bother. Yaron doesnt have time right now to help with this issue. Is it possible for you to help me with a workaround for now? This functionality really would make a difference for my wiki... Would it be hard to implement? Edgard
Please come to #mediawiki IRC channel if you need help, bugzilla is not the best place for that.
Niklas - thanks for the hint; using $wgParser did indeed work. I'm marking this bug as "invalid".