Last modified: 2014-11-20 09:15:23 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 T26134, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24134 - LivePreview: styles added by extensions are missing
LivePreview: styles added by extensions are missing
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Normal normal (vote)
: Future release
Assigned To: Nobody - You can work on this!
:
: 24162 24843 25021 51770 (view as bug list)
Depends on:
Blocks: 36060 39272
  Show dependency treegraph
 
Reported: 2010-06-27 02:51 UTC by Liangent
Modified: 2014-11-20 09:15 UTC (History)
21 users (show)

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


Attachments

Description Liangent 2010-06-27 02:51:50 UTC
If I write some <source>, I cannot use LivePreview to preview them.
Comment 1 Roan Kattouw 2010-06-28 16:05:27 UTC
Is this a bug against Live Preview or against the preview tab in Extension:UsabilityInitiative?
Comment 2 Liangent 2010-06-28 16:34:17 UTC
I guess it's Live Preview. I found this bug on a Wikimedia wiki. But if another has the same bug it should be fixed as well.
Comment 3 Roan Kattouw 2010-06-28 17:16:54 UTC
(In reply to comment #2)
> I guess it's Live Preview. I found this bug on a Wikimedia wiki. But if another
> has the same bug it should be fixed as well.
It probably does. Cloning this bug for live preview.
Comment 4 Roan Kattouw 2010-06-28 17:18:41 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I guess it's Live Preview. I found this bug on a Wikimedia wiki. But if another
> > has the same bug it should be fixed as well.
> It probably does. Cloning this bug for live preview.
bug 24162
Comment 5 Roan Kattouw 2010-06-29 19:44:00 UTC
I hear Adam is poking at preview anyway...
Comment 6 db [inactive,noenotif] 2010-08-21 15:46:29 UTC
*** Bug 24843 has been marked as a duplicate of this bug. ***
Comment 7 db [inactive,noenotif] 2010-09-02 18:24:00 UTC
*** Bug 25021 has been marked as a duplicate of this bug. ***
Comment 8 Roan Kattouw 2010-09-12 19:00:13 UTC
This might be something we could fix in a clever way now that we have the resource loader.
Comment 9 Chad H. 2011-03-08 19:46:16 UTC
*** Bug 24162 has been marked as a duplicate of this bug. ***
Comment 10 Thehelpfulone 2012-06-22 19:45:12 UTC
Reassign to default per bug 37789
Comment 11 Krinkle 2012-08-12 05:24:39 UTC
(In reply to comment #8)
> This might be something we could fix in a clever way now that we have the
> resource loader.

Yes, but to solve this bug we need more than just JavaScript though.

Using ResourceLoader makes sense. Possible implementation:
* Use an API module to parse it (action=parse I suppose)
* Somehow keep track of modules being added to the load queue by the parser (I think some component in the parser already has its own addModules() list)
* Expose that through a new property in action=parse

We already have something a bit like it (action=parse&prop=headitems) but that is 1) plain html, 2) includes default ones that are already on the page.


https://www.mediawiki.org/w/api.php?format=jsonfm&action=parse&text=%3Csource%3Etest%3C/source%3E&prop=text|displaytitle|headitems|headhtml
Comment 12 Krinkle 2012-08-12 06:20:05 UTC
*** Bug 36060 has been marked as a duplicate of this bug. ***
Comment 13 Mark A. Hershberger 2012-09-28 16:48:54 UTC
Removing 1.20.0 milestone since it doesn't look like any actual work has been done on this.
Comment 14 Derk-Jan Hartman 2013-07-31 11:39:31 UTC
*** Bug 51770 has been marked as a duplicate of this bug. ***
Comment 15 Bartosz Dziewoński 2014-04-16 14:07:47 UTC
Krinkle's solution from comment 11 looks reasonably straightforward to implement, ParserOutput does in fact track its own module list. 

Doing the above won't help for SyntaxHighlight, which doesn't use ResourceLoader for its styles (instead generating the <style/> element itself). It shouldn't be very hard to change this, either.
Comment 16 Gerrit Notification Bot 2014-04-16 21:21:32 UTC
Change 126843 had a related patch set uploaded by Bartosz Dziewoński:
Use ResourceLoader modules for style loading

https://gerrit.wikimedia.org/r/126843
Comment 17 Gerrit Notification Bot 2014-04-16 21:25:32 UTC
Change 126848 had a related patch set uploaded by Bartosz Dziewoński:
ApiParse: Add prop=modules

https://gerrit.wikimedia.org/r/126848
Comment 18 Bartosz Dziewoński 2014-04-16 21:29:13 UTC
The two backend patches above I submitted should make it totally possible to do this by using the action=parse API. Anyone feels like doing that?
Comment 19 Gerrit Notification Bot 2014-04-29 22:22:21 UTC
Change 126848 merged by jenkins-bot:
ApiParse: Add prop=modules

https://gerrit.wikimedia.org/r/126848
Comment 20 Gerrit Notification Bot 2014-05-04 16:47:07 UTC
Change 131346 had a related patch set uploaded by TheDJ:
Improve LivePreview

https://gerrit.wikimedia.org/r/131346
Comment 21 Gerrit Notification Bot 2014-05-04 19:02:29 UTC
Change 126843 merged by jenkins-bot:
Use ResourceLoader modules for style loading

https://gerrit.wikimedia.org/r/126843
Comment 22 Derk-Jan Hartman 2014-11-11 16:11:48 UTC
Did some more work on this, but I don't have a full picture of the exact dependencies of the mw modules yet, and i'm quite certain that they are also a bit 'sloppy' right now, so some stuff isn't working 100%.

On a normal page transclusion, it works without the dreaded loaderScripts param now though.

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


Navigation
Links