Last modified: 2011-01-12 16:46:40 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 T28450, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26450 - Loading of Javascript doesn't work in embedded special pages
Loading of Javascript doesn't work in embedded special pages
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://discoursedb.org/wiki/RunQuery_...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-27 22:43 UTC by Yaron Koren
Modified: 2011-01-12 16:46 UTC (History)
2 users (show)

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


Attachments

Description Yaron Koren 2010-12-27 22:43:19 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.
Comment 1 Niklas Laxström 2010-12-28 09:23:10 UTC
When embedding, you should add the necessary things into ParserOutput. Otherwise it will only works first time on uncached vies.
Comment 2 Yaron Koren 2010-12-28 20:12:53 UTC
Hi Niklas,

Could you be more specific about what needs to be added? Or point to some code that does it the right way?
Comment 3 edgard 2011-01-10 00:44:39 UTC
Hi guys. Any news? :)
Comment 4 Niklas Laxström 2011-01-10 09:41:37 UTC
There is no right way to do it. Until there is one, I assume global $wgParser works.
Comment 5 edgard 2011-01-10 12:08:28 UTC
What you think, Yaron? :)
Comment 6 edgard 2011-01-12 14:07:41 UTC
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
Comment 7 Niklas Laxström 2011-01-12 14:14:10 UTC
Please come to #mediawiki IRC channel if you need help, bugzilla is not the best place for that.
Comment 8 Yaron Koren 2011-01-12 16:46:40 UTC
Niklas - thanks for the hint; using $wgParser did indeed work. I'm marking this bug as "invalid".

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


Navigation
Links