Page MenuHomePhabricator

WYSIWYG extension tries to use protected variable styles of includes/OutputPage.php in MW1.24
Closed, DeclinedPublic

Description

In MW 1.24 variable styles which is defined in includes/OutputPage.php has been changed from public to protected. Because of this there is now a problem with MW extension:wysiwyg where BeforePageDisplay hook is trying to use $out->styles variable (using function onBeforePageDisplay): result is fatal error and extension will not start.

So far workarounds which I have been able to find are change type of variable "styles" back to "public" in OutputPage.php of MW or comment out lines ~191-211 in CKeditor.body.php of wysiwg.

With my limited skills of PHP programming, I have been unsuccessful with my attempts to "extend" visibility of protected variable "styles" from OutputPage.php to wysiwyg. Is it possible to solve this in code of extension somehow?

For a similar case about styles, see T76461.
For a similar case about mCoreRights, see T76264.
For a similar case about mLinktags, see T76168.

Event Timeline

riparap raised the priority of this task from to Needs Triage.
riparap updated the task description. (Show Details)
riparap changed Security from none to None.
riparap subscribed.
Aklapper triaged this task as Lowest priority.Dec 2 2014, 1:36 PM

Also note that the comment above that line has been saying "For internal use; add settings in the skin via $this->addStyle()" since 2008 so this would be something to fix in the WYSIWYG extension instead.

I have no idea where the maintainers of https://www.mediawiki.org/wiki/Extension:WYSIWYG track their bugs as there are no hints on their wikipage so you might not receive much attention in this ticket.

https://www.mediawiki.org/wiki/Extension_talk:WYSIWYG#Protected_variable_.24styles_of_MW_1.24_vs._CKeditor.body.php_51135 might be the better place for the time being.

Aklapper renamed this task from Protected variable styles of includes/OutputPage.php in MW1.24 vs. extension using it to WYSIWYG extension tries to use protected variable styles of includes/OutputPage.php in MW1.24.Dec 2 2014, 1:42 PM

IMO the WYSIWYG extension needs to be fixed, OutputPage::styles is not meant for public usage and was documented as so.

IMO the WYSIWYG extension needs to be fixed

+1

I have no idea where the maintainers of https://www.mediawiki.org/wiki/Extension:WYSIWYG track their bugs as there are no hints on their wikipage so you might not receive much attention in this ticket.

So i think this ticket can be closed?

I'd keep this here as this task is under WYSIWYG (well, "extensions-other"). Though likely nobody will see it...

Details of the problem can be found here: https://www.mediawiki.org/wiki/Thread:Project:Support_desk/Protected_variable_styles_of_includes/OutputPage.php_vs._extension_using_it

I have two question:

  1. Is it still possible to do current actions of wysiwyg onBeforePageDisplay hook using functions that inludes/OuputPage offers?
  2. With latest available browser versions, is there still a need for this kind of style sheet processing that hook onBeforePageDisplay of wysiwyg is doing?
Pppery subscribed.

Extension was archived.