Last modified: 2012-10-07 17:08:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42769, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40769 - Validator: Call to undefined method SpecialPageFactory::addAliases()
Validator: Call to undefined method SpecialPageFactory::addAliases()
Status: RESOLVED WORKSFORME
Product: MediaWiki extensions
Classification: Unclassified
Validator (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-04 15:56 UTC by Nischay Nahata
Modified: 2012-10-07 17:08 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nischay Nahata 2012-10-04 15:56:19 UTC
Fatal error: Call to undefined method SpecialPageFactory::addAliases() in /homepages/29/d407628538/htdocs/mediawiki_MapTest/extensions/Validator/includes/definitions/ParamDefinition.php on line 545


see live at http://openurban.net/mediawiki_MapTest/index.php?title=Special:FormEdit/Project/NITK
Comment 1 Jeroen De Dauw 2012-10-06 14:50:51 UTC
Heh, wtf... No idea how it ends up having a SpecialPageFactory there... I will have a look at the Semantic Maps provided form inputs myself in a moment and see if I can reproduce the issue.
Comment 2 Nischay Nahata 2012-10-06 18:19:23 UTC
heh, this might interest you
http://openurban.net/mediawiki_MapTest/index.php?title=Map
Comment 3 Jeroen De Dauw 2012-10-06 18:56:34 UTC
Occurs with Google Maps form input on that wiki. This input is working fine for me. Did you modify the extension code?
Comment 4 Nischay Nahata 2012-10-06 20:24:14 UTC
The wiki is using all semantic extensions in alpha state, and no I didn't use any modified code there.
Comment 5 Nischay Nahata 2012-10-06 20:27:50 UTC
I noted that the wiki is using PHP version < 5.3.0, could that be the problem?
I had to replace all __DIR__ for this
Comment 6 Jeroen De Dauw 2012-10-06 21:22:55 UTC
Maps and Semantic Maps >=2.0 need PHP >=5.3. Running them on PHP 5.2.x is asking for problems, and will soon become much harder to pull of as more and more PHP 5.3 features are used. Do consider updating your PHP.

> could that be the problem?

Maybe, although I can't think of any particular code that would cause the issue you have.

> The wiki is using all semantic extensions in alpha state

Not correct, SMW is at 1.8 beta 1. And SRF is at 1.7.1, which is a stable release.

If you want me to further look at this I need more info, for instance a full stack trace. If possible, please update the extensions either to master or go back to their latest stable release.
Comment 7 Nischay Nahata 2012-10-06 21:30:05 UTC
(In reply to comment #6)

> If you want me to further look at this I need more info, for instance a full
> stack trace. If possible, please update the extensions either to master or go
> back to their latest stable release.

By alpha I meant that they are in master state.

The error seems to be somewhere below line 228 in Param.php, it says compat
code in a comment.
will a debug_backtrace() help you?
Comment 8 Jeroen De Dauw 2012-10-06 23:00:02 UTC
Yes, it's compat code still there because Maps is using some deprecated stuff. It's actually been removed on my dev branch already.

A backtrace would be helpful yes.

Looking at the code I still don't see any way how you'd end up with a SpecialPageFactory object... It's quite possible you'll either have to debug this yourself on your box or will need to hack around it. It's probably not to hard to make newFromParameter behave correctly.
Comment 9 Nischay Nahata 2012-10-07 05:51:10 UTC
The host only provides two PHP Version settings PHP 5 and PHP-dev
I upgraded to PHP-dev and the problems seemed to go away now.
I suspect this issue has been caused due to get_called_class().

Can you verify the map is loading properly
http://openurban.net/mediawiki_MapTest/index.php?title=Map
it keeps on saying "loading map..." on my browser.
Comment 10 Jeroen De Dauw 2012-10-07 16:54:59 UTC
I also considered get_called_class, but it has a compatibility fallback in Validator. I do hope it's not broken...

I'm getting a map, so I'm guessing you already fixed it.

Closing the bug, please do reopen if you continue to have the issue.
Comment 11 Jeroen De Dauw 2012-10-07 16:59:05 UTC
Oh wow, PHP 5.4.7... good to know it works fine with that as well :)
Comment 12 Nischay Nahata 2012-10-07 17:01:57 UTC
It does, but I would recommend you test get_called_class() once.
Comment 13 Jeroen De Dauw 2012-10-07 17:08:02 UTC
Feel free to test yes :) Or to write a test. Since the dev version no longer supports 5.2 I'm really not going to downgrade my PHP just to try it.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links