Page MenuHomePhabricator

Saving pages broken in MW 1.24 - "Fatal error: Cannot access protected property EditPage::$mTokenOk"
Closed, ResolvedPublic

Description

The following MW 1.24 change made some member variables of the MW EditPage class protected:

https://gerrit.wikimedia.org/r/#/c/133484/

As a result, saving a page using a form fails with "Fatal error: Cannot access protected property EditPage::$mTokenOk".

That member variable is accessed in SF's includes/SF_AutoeditAPI.php on line 465.

I can think of these 2 solutions:

  1. Get a core change accepted that makes EditPage::$mTokenOk public again. (Or alternatively, since SF only reads it: a core change that adds a method to return it, and then changing SF to use that.)
  1. Have SF derive the EditPage class and add a method to return $mTokenOk, then use the new class and its method instead.

Version: master
Severity: critical

Details

Reference
bz67522

Event Timeline

bzimport raised the priority of this task from to Needs Triage.
bzimport set Reference to bz67522.
JoelKP created this task.Jul 4 2014, 6:24 AM

Can confirm this!

Change 151370 had a related patch set uploaded by Legoktm:
Fix for Ia9baaf0b: Make previously public variables public again

https://gerrit.wikimedia.org/r/151370

Change 157178 had a related patch set uploaded by Brian Wolff:
Make EditPage::tokenOK public for SemanticForms.

https://gerrit.wikimedia.org/r/157178

Change 157178 merged by jenkins-bot:
Make EditPage::tokenOK public for SemanticForms.

https://gerrit.wikimedia.org/r/157178

(In reply to Gerrit Notification Bot from comment #4)

Change 157178 had a related patch set uploaded by Brian Wolff:
Make EditPage::tokenOK public for SemanticForms.

https://gerrit.wikimedia.org/r/157178

This reverts the visibility change in core (In order to fix the immediate issue). It should probably be looked into if the way that SemanticForms uses EditPage is appropriate.

Change 158286 had a related patch set uploaded by Reedy:
Make EditPage::tokenOK public for SemanticForms.

https://gerrit.wikimedia.org/r/158286

Change 158286 merged by jenkins-bot:
Make EditPage::tokenOK public for SemanticForms.

https://gerrit.wikimedia.org/r/158286

Change 151370 merged by jenkins-bot:
Fix for Ia9baaf0b: Make previously public variables public again

https://gerrit.wikimedia.org/r/151370

Change 171631 had a related patch set uploaded by Foxtrott:
Initialize variable $pageExists; remove direct use of EditPage::$mTokenOk

https://gerrit.wikimedia.org/r/171631

Change 171631 merged by Foxtrott:
Initialize variable $pageExists; remove direct use of EditPage::$mTokenOk

https://gerrit.wikimedia.org/r/171631