Page MenuHomePhabricator

SocialProfile not compatible with MW 1.21 due to ContentHandler changes; major loss of functionality as a result
Closed, ResolvedPublic

Description

SocialProfile's UserProfile implements the social user profile via UserProfile/UserProfilePage.php and a function (wfUserProfileFromTitle) in UserProfile/UserProfile.php which is hooked to the ArticleFromTitle hook. Social profile pages can either be in the User: namespace or alternatively in the User_profile: namespace, depending on the user's personal preference. If the user has chosen a social profile over the standard wiki user page, then their social profile will be on the User: namespace and the wiki user page will be on the UserWiki: namespace.

The UserProfilePage class extends the core MediaWiki Article class and until MediaWiki 1.21, it worked flawlessly. Due to some major changes to core, of which I suspect that ContentHandler is the biggest, this no longer works as of MW 1.21. When running SocialProfile, social user pages do not display _at all_ and standard User: pages cannot be edited (due to the code in aforesaid wfUserProfileFromTitle function, which intentionally prevents editing of user pages since social profiles cannot be edited via ?action=edit but rather via Special:UpdateProfile).

The Apache/PHP error log has entries like this: " PHP Notice: Inaccessible property via __get(): user_id in /var/www/live/w/includes/Article.php on line 1918" which would be totally understandable...if I was trying to access an Article member variable, but user_id is a class member variable of the UserProfilePage class, defined in its constructor function, on line 23 (along with a bunch of other custom class member variables).

Some help in fixing SocialProfile for 1.21+ installations would be very much appreciated.


Version: master
Severity: major

Details

Reference
bz49280

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:57 AM
bzimport added a project: SocialProfile.
bzimport set Reference to bz49280.

This has somewhat been worked around in cb2e850b197915d83af628ba5139a31edca5eeea but it doesn't exactly address the underlying issue, which is that SocialProfile doesn't support ContentHandler, but at least it's not horribly broken now.

Hm, I think SocialProfile could benefit a lot from ContentHandler support...

Well, SocialProfile never received ContentHandler support, but at least the most acute issue (SP breaking when ContentHandler is present) was sorta fixed over two years ago, so no point in keeping this ticket open, I guess.