SemanticMediaWiki / SemanticSignup

Allows adding additional fields to the user registration form, which get placed on the new users' user page, as well as stored semantically.
https://www.mediawiki.org/wiki/Extension:SemanticSignup
Other
6 stars 3 forks source link

PHP Fatal error: Class 'SemanticSignup' not found #1

Closed jchapin closed 9 years ago

jchapin commented 9 years ago

We installed the SemanticSignup extension on:

MediaWiki   1.22.0
PHP 5.5.3-1ubuntu2.3 (apache2handler)
MySQL   5.5.37-0ubuntu0.13.10.1

with Semantic Extensions:

Semantic Drilldown (Version 2.0)    (3cea705)
Semantic Forms (Version 2.7)
Semantic Forms Inputs (Version 0.9.0 alpha) (9343704)
Semantic MediaWiki (Version 1.9.1.1)
Semantic Result Formats (Version 1.9.1)
SemanticSignup (Version 0.5.0)  (f510826)

We followed the documentation on the page for the SemanticSignup extension, setting up the appropriate configuration options in LocalSettings.php. When we went to the Special:CreateAccount page and were forwarded on to the custom signup form we created, the page wouldn't render and the following error showed up in the Apache 2 log.

[Mon Jan 05 22:16:17.213259 2015] [:error] [pid 31052] [client XXX.XXX.XXX.XXX:22835] PHP Fatal error:  Class 'SemanticSignup' not found in /var/www/mediawiki-1.22.0/extensions/SemanticSignup/SemanticSignup.hooks.php on line 28, referer: https://hostname.domain.tld/w/index.php?title=Special:UserLogin&returnto=Special%3ACreateAccount&returntoquery=

Line 28 in the file was:

$url = htmlspecialchars( SemanticSignup::getTitleFor( 'SemanticSignup' )->getFullURL() );

Which can be found here:

https://github.com/SemanticMediaWiki/SemanticSignup/blob/master/SemanticSignup.hooks.php#L28

A quick grep through the code didn't find definition of a SemanticSignup class and the majority of calls to the function getTitleFor was the SpecialPage class.

Just to triage the situation I changed the line to:

$url = htmlspecialchars( SpecialPage::getTitleFor( 'SemanticSignup' )->getFullURL() );

The page rendered, the form functioned perfectly, and we were able to create an account using our new form.

Thanks for the extension. I wanted to notify you of this just in case this is something that needed to be addressed.

kghbln commented 9 years ago

Never used it either. So it will be very cool if @jchapin could do the honours

mwjames commented 9 years ago

Expected to be solved by #2