Jump to content

Topic on Extension talk:SocialProfile

exception when creating a page

5
Mwssnov (talkcontribs)

mw_1.38 && (sp_1.38 || sp_master) if i want to create a page in the user namespace eg user:user\newpage get exception MediaWiki internal error.

Original exception: [7ed5ff5d67faf0f3f8fe2f13] /page/User:Root/dsf Error: Call to a member function getName() on bool Backtrace: from \w\extensions\SocialProfile\UserProfile\includes\UserProfile.php(85)

  1. 0 \w\extensions\SocialProfile\UserProfile\includes\UserProfileHooks.php(118): UserProfile->__construct()
  2. 1 \w\includes\HookContainer\HookContainer.php(338): UserProfileHooks::onArticleFromTitle()
  3. 2 \w\includes\HookContainer\HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()

...

lines from 117 in UserProfileHooks.php: if ( $wgUserPageChoice ) { $profile = new UserProfile( $pageTitle ); $profile_data = $profile->getProfile();

i can catch the exception and redirect to main page, but is not good solution

Ciencia Al Poder (talkcontribs)
Mwssnov (talkcontribs)

I added: $wgNamespacesWithSubpages = [ NS_MAIN => true, NS_USER => true ]; And cutback my exception catch ) It works. Add this to description page.

Jack Phoenix (talkcontribs)

MediaWiki 1.38 isn't a Long-Term Support (LTS) release of MediaWiki anyway so it hasn't ever been tested and any and all support for it has been and remains coincidental at best; refer to social tools/MediaWiki compatibility, but basically always use master version of SocialProfile and other social tools with the latest LTS release of MediaWiki, that's something that's actually tested and supported.

Mwssnov (talkcontribs)

pf) I have no doubt that all the same would be in 1.39 )

Reply to "exception when creating a page"