Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Call to a member function rawParams() on a non-object in /home/ccc/htdocs/w/extensions/SemanticWatchlist/includes/SWL_Emailer.php on line 43 #57

Closed
DestructionOfPlanetJupiter opened this issue Mar 2, 2015 · 10 comments
Labels

Comments

@DestructionOfPlanetJupiter
Call Stack
Time    Memory  Function    Location
1   0.0002  260240  {main}( )   ../index.php:0
2   0.0517  6524496 MediaWiki->run( )   ../index.php:46
3   0.0517  6524952 MediaWiki->main( )  ../MediaWiki.php:435
4   0.0526  6589784 MediaWiki->performRequest( )    ../MediaWiki.php:584
5   0.0541  6648136 SpecialPageFactory::executePath( )  ../MediaWiki.php:275
6   0.0549  6723632 SpecialPage->run( ) ../SpecialPageFactory.php:584
7   0.0549  6723712 SFFormEdit->execute( )  ../SpecialPage.php:363
8   0.1162  13001448    SFFormEdit->printForm( )    ../SF_FormEdit.php:43
9   0.1267  14498080    SFAutoeditAPI->execute( )   ../SF_FormEdit.php:88
10  0.1280  14518384    SFAutoeditAPI->doAction( )  ../SF_AutoeditAPI.php:116
11  0.9077  24983424    SFAutoeditAPI->doStore( )   ../SF_AutoeditAPI.php:915
12  0.9095  24986136    EditPage->internalAttemptSave( )    ../SF_AutoeditAPI.php:462
13  0.9123  25082832    Article->doEditContent( )   ../EditPage.php:1920
14  0.9123  25083624    Article->__call( )  ../EditPage.php:1920
15  0.9123  25084064    call_user_func_array ( )    ../Article.php:2006
16  0.9123  25084872    WikiPage->doEditContent( )  ../Article.php:2006
17  1.0654  26270840    WikiPage->doEditUpdates( )  ../WikiPage.php:2026
18  1.0656  26272432    AbstractContent->getSecondaryDataUpdates( ) ../WikiPage.php:2207
19  1.0656  26272480    ParserOutput->getSecondaryDataUpdates( )    ../AbstractContent.php:232
20  1.0681  26558136    LinksUpdate->__construct( ) ../ParserOutput.php:659
21  1.0681  26563312    wfRunHooks( )   ../LinksUpdate.php:143
22  1.0681  26563360    Hooks::run( )   ../GlobalFunctions.php:3995
23  1.0682  26564456    call_user_func_array ( )    ../Hooks.php:206
24  1.0682  26564840    SMW\MediaWiki\Hooks\HookRegistry->SMW\MediaWiki\Hooks\{closure}( )  ../Hooks.php:206
25  1.0685  26583568    SMW\MediaWiki\Hooks\LinksUpdateConstructed->process( )  ../HookRegistry.php:336
26  1.0686  26584040    SMW\ParserData->updateStore( )  ../LinksUpdateConstructed.php:62
27  1.0690  26627424    SMW\StoreUpdater->doUpdate( )   ../ParserData.php:234
28  1.0692  26627712    SMW\StoreUpdater->performUpdate( )  ../StoreUpdater.php:92
29  1.0729  26687816    SMW\StoreUpdater->doRealUpdate( )   ../StoreUpdater.php:128
30  1.0729  26688080    SMW\Store->updateData( )    ../StoreUpdater.php:169
31  1.0729  26688712    wfRunHooks( )   ../SMW_Store.php:210
32  1.0729  26688760    Hooks::run( )   ../GlobalFunctions.php:3995
33  1.0733  26723248    call_user_func_array ( )    ../Hooks.php:206
34  1.0733  26723672    SWLHooks::onDataUpdate( )   ../Hooks.php:206
35  1.0856  27046648    SWLGroup->notifyWatchingUsers( )    ../SemanticWatchlist.hooks.php:54
36  1.0868  27048000    wfRunHooks( )   ../SWL_Group.php:504
37  1.0868  27048048    Hooks::run( )   ../GlobalFunctions.php:3995
38  1.0869  27049016    call_user_func_array ( )    ../Hooks.php:206
39  1.0869  27049536    SWLHooks::onGroupNotify( )  ../Hooks.php:206
40  1.0919  27113880    SWLEmailer::notifyUser( )   ../SemanticWatchlist.hooks.php:89```
@mwjames
Copy link
Contributor

mwjames commented Mar 2, 2015

@kghbln Something went wrong with the wfMessage rawParams in SWL_Emailer.php#L41.

            $emailText .= '<h3> ' . wfMessage(
                'swl-email-changes',
                $changeSet->getEdit()->getTitle()->getFullText()->rawParams(
                    $changeSet->getEdit()->getTitle()->getFullURL()
                )->escaped() . ' </h3>'
            );

1a97b62#diff-6ac37b4bbe590e37025cd62da8ff94ba

@mwjames
Copy link
Contributor

mwjames commented Mar 4, 2015

Does not work ... smoothely. Throws out notices and header stuff.
I can create Semantic Forms with it though.
http://pastebin.com/es3Gr9A7

Moved to #59

@mwjames
Copy link
Contributor

mwjames commented Mar 4, 2015

Fixed with 09911cf

@mwjames mwjames closed this as completed Mar 4, 2015
@kghbln
Copy link
Member

kghbln commented Mar 4, 2015

@DestructionOfPlanetJupiter Thank you for testing and reporting the related issue.

@DestructionOfPlanetJupiter
Copy link
Author

I would fix it myself, but I have some difficulties in getting what is actually going on there. Always strange to see code posted by someone else, especially with comments missing ;)

@kghbln
Copy link
Member

kghbln commented Mar 4, 2015

Guess that makes two of us. Some I18n voodoo, I guess. :)

@DestructionOfPlanetJupiter
Copy link
Author

https://github.com/SemanticMediaWiki/SemanticWatchlist/blob/1a97b6292de67b09c8511480513c4dfae963a412/includes/SWL_CustomTexts.php

protected function initCustomTexts() {
if( !is_null( $this->customTexts ) ) {
return;
}
$this->customTexts = array();
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow(
'swl_groups',
'group_custom_texts',
array( 'group_name' => $this->group->getName() ),
'SWL::initCustomTexts'
);
$set = explode( '|', $row->group_custom_texts );
foreach( $set as $elem ) {
$parts = explode( '~', $elem );
if( !array_key_exists( $parts[0], $this->customTexts ) ) {
$this->customTexts[$parts[0]] = array();
}
$this->customTexts[$parts[0]][$parts[1]] = $parts[2];
}
}

The explode is rather pointless, considering that the entire function has a lot of null in it.
I will give it a try tomorrow.

@kghbln
Copy link
Member

kghbln commented Mar 4, 2015

Yeah, this is referenced in issue #59 where the conversation should continue to avoid mixing things.

@krabina
Copy link
Contributor

krabina commented Nov 20, 2015

This bus is marked closed, but I just pulled ~1.0 and I still get the very same error. Looking into 09911cf I still see the old, non-fixed code.

@mwjames
Copy link
Contributor

mwjames commented Nov 20, 2015

but I just pulled ~1.0

~1.0 doesn't include the patch according to [0].

[0] 1.0.0...master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants