Extension talk:Semantic Tasks

About this board

archive 1


Update to work with SMW 4.x

2
Krabina (talkcontribs)

ST is currently not working with SMW 4.x. We are working on an update that will be available soon.

Kghbln (talkcontribs)

That's cool! I just hope that the repo does not get forked to some other source location. Keeping fingers crossed.

Reply to "Update to work with SMW 4.x"

$wgSemanticTasksNotifyIfUnassigned

2
Summary by Tosfos

Fixed in version 2.0.1

Kghbln (talkcontribs)

Is this configuration parameter actually working when using the 2.0.0 release? I guess it will not though I think this is a useful one.

Tosfos (talkcontribs)

This should be working as of version 2.0.1. See here.

What is the difference between ...

1
Kghbln (talkcontribs)

... the configuration parameters $stgPropertyAssignedTo and $stgPropertyHasAssignee? I do not see an apparent one.

Reply to "What is the difference between ..."

Does not recognize SMW 3.x

4
Summary by Kghbln

Fixed with the 2.0.0 release.

Krabina (talkcontribs)

Tried to install it on MW 1.31 and SMW 3.0. If I enable it, the extension does not recognize that SMW is installed. It displays that it needs SMW and quits.

Kghbln (talkcontribs)

I believe one of the reasons is that SMW switched to extension registration while this one expects "classic" registration. However even if this would not happen I am pretty sure that this extension will not work either due to other breaking changes in SMW 3.0

Krabina (talkcontribs)

Indeed. If I remove the registration check, the extenson shows up in Special:Version without errors. But if I try to use it, the following error appears:

/index.php?title=Vorlage:Neuigkeit&action=submit   Error from line 424 of .../extensions/SemanticTasks/SemanticTasks.classes.php: Call to private method SMW\DataValues\PropertyValue::makeUserProperty() from context 'SemanticTasksMailer'
Backtrace:
#0 ../extensions/SemanticTasks/SemanticTasks.classes.php(166): SemanticTasksMailer::getQueryResults(string, array, boolean)
#1 ../extensions/SemanticTasks/SemanticTasks.classes.php(39): SemanticTasksMailer::getAssignees(string, string, User)
#2 ../includes/Hooks.php(177): SemanticTasksMailer::findOldValues(WikiPage, User, WikitextContent, string, integer, NULL, NULL, integer, Status)
#3 ../includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#4 ../includes/page/WikiPage.php(1618): Hooks::run(string, array)
#5 ../includes/EditPage.php(2214): WikiPage->doEditContent(WikitextContent, string, integer, boolean, User, string, array, integer)
#6 ../includes/EditPage.php(1506): EditPage->internalAttemptSave(array, boolean)
#7 ../includes/EditPage.php(652): EditPage->attemptSave(array)
#8 ../includes/actions/EditAction.php(60): EditPage->edit()
#9 ../includes/actions/SubmitAction.php(38): EditAction->show()
#10 ../includes/MediaWiki.php(500): SubmitAction->show()
#11 ../includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#12 ../includes/MediaWiki.php(861): MediaWiki->performRequest()
#13 ../includes/MediaWiki.php(524): MediaWiki->main()
#14 ../index.php(42): MediaWiki->run()
#15 {main}
Kghbln (talkcontribs)

It would have been nice to be proven wrong.

Michele.Fella (talkcontribs)

PHP Warning:  require_once(/app/www/mediawiki-1.28.2/extensions/SemanticTasks/../../maintenance/maintenance.php): failed to open stream: No such file or directory in /app/www/mediawiki-1.28.2/extensions/SemanticTasks/ST_CheckForReminders.php on line 6

PHP Fatal error:  require_once(): Failed opening required '/app/www/mediawiki-1.28.2/extensions/SemanticTasks/../../maintenance/maintenance.php' (include_path='.:/usr/share/pear:/usr/share/php') in /app/www/mediawiki-1.28.2/extensions/SemanticTasks/ST_CheckForReminders.php on line 6

shouldn't maintenance.php be Maintenance.php (with leading uppercase "M")?

Kghbln (talkcontribs)

Indeed, the file in core (master) starts uppercase. Dunno when this changed.

Error in MW 1.23.x and SMW 2.3

5
Summary by Kghbln

The suggested and tested fix was added with https://gerrit.wikimedia.org/r/#/c/284476/ Use REL1_27 for best experience.

Krabina (talkcontribs)

Upon saving a page that assignes a value to the property Assigned to:: the follwing error is displayed.

Fatal error: Call to a member function getEmail() on a non-object in .../extensions/SemanticTasks/SemanticTasks.classes.php on line 293

Only when I deactivate the extension I can save the page.

NancyGertrudiz (talkcontribs)

I think this issue is more related with mail configuration and not to the extension.

Fustbariclation (talkcontribs)

I'm getting the same error. Also when I save something. It also goes away if I remove the extension.

Tosfos (talkcontribs)

Please try the following change in that file, at around line 179:

                        $assignee_name = $task_assignees->getNextText( SMW_OUTPUT_WIKI );
                        /** @todo Create User object */
                        $assignee_name = explode( ":", $assignee_name );
+                       
+                       if ( !isset( $assignee_name[1] ) ) {
+                               return array();
+                       }
                        $assignee_name = $assignee_name[1];
Kghbln (talkcontribs)

MW 1.24 and Class getQueryResults

1
NancyGertrudiz (talkcontribs)

The class include "/includes/SMW_QueryProcessor.php"

Comment this code line and SemanticTasks works!!

Reply to "MW 1.24 and Class getQueryResults"

MW 1.20.x and SMW 1.8.x

2
86.10.117.178 (talkcontribs)

This extension seems to break with the above versions. It leads to an error upon editing any page:

Somebody tried to use spaces in a cache title! (Assigned to) Backtrace:

  1. 0 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_Sql3SmwIds.php(302): SMWSql3SmwIds->setCache('Assigned to', 102, , , 0, )
  2. 1 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_Sql3SmwIds.php(225): SMWSql3SmwIds->getDatabaseIdAndSort('Assigned to', 102, , , , true, false)
  3. 2 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_Sql3SmwIds.php(327): SMWSql3SmwIds->getSMWPageIDandSort('Assigned to', 102, , , , true, false)
  4. 3 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_Readers.php(166): SMWSql3SmwIds->getSMWPageID('Assigned to', 102, , , true)
  5. 4 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3.php(298): SMWSQLStore3Readers->getPropertyValues(Object(SMWDIWikiPage), Object(SMWDIProperty), NULL)
  6. 5 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_Property.php(203): SMWSQLStore3->getPropertyValues(Object(SMWDIWikiPage), Object(SMWDIProperty))
  7. 6 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/storage/SMW_PrintRequest.php(155): SMWDIProperty->findPropertyTypeID()
  8. 7 /home/jfield2/public_html/mediawiki/extensions/SemanticMaps/includes/SM_GeoCoordsHooks.php(46): SMWPrintRequest->getTypeID()
  9. 8 [internal function]: SMGeoCoordsHooks::addGeoCoordsDefaultFormat(false, Array, Array)
  10. 9 /home/jfield2/public_html/mediawiki/includes/Hooks.php(216): call_user_func_array('SMGeoCoordsHook...', Array)
  11. 10 /home/jfield2/public_html/mediawiki/includes/GlobalFunctions.php(3823): Hooks::run('SMWResultFormat', Array)
  12. 11 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/params/SMW_ParamFormat.php(101): wfRunHooks('SMWResultFormat', Array)
  13. 12 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/params/SMW_ParamFormat.php(48): SMWParamFormat->getDefaultFormat()
  14. 13 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/params/SMW_ParamFormat.php(140): SMWParamFormat->getValidFormatName('auto')
  15. 14 /home/jfield2/public_html/mediawiki/extensions/Validator/includes/definitions/ParamDefinition.php(719): SMWParamFormat->formatValue('auto', Object(Param), Array, Array)
  16. 15 /home/jfield2/public_html/mediawiki/extensions/Validator/includes/Param.php(213): ParamDefinition->format(Object(Param), Array, Array)
  17. 16 /home/jfield2/public_html/mediawiki/extensions/Validator/includes/Validator.php(341): Param->format(Array, Array, Object(ValidatorOptions))
  18. 17 /home/jfield2/public_html/mediawiki/extensions/Validator/includes/Validator.php(281): Validator->doParamProcessing()
  19. 18 /home/jfield2/public_html/mediawiki/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php(59): Validator->validateParameters()
  20. 19 /home/jfield2/public_html/mediawiki/extensions/SemanticTasks/SemanticTasks.classes.php(356): SMWQueryProcessor::getProcessedParams(Array, Array)
  21. 20 /home/jfield2/public_html/mediawiki/extensions/SemanticTasks/SemanticTasks.classes.php(135): SemanticTasksMailer::getQueryResults('Form:Server...', Array, false)
  22. 21 /home/jfield2/public_html/mediawiki/extensions/SemanticTasks/SemanticTasks.classes.php(31): SemanticTasksMailer::getAssignees('Assigned to', 'Form:Server', Object(User))
  23. 22 [internal function]: SemanticTasksMailer::findOldValues(Object(WikiPage), Object(User), '?Thi...', , 0, NULL, NULL, 98, Object(Status))
  24. 23 /home/jfield2/public_html/mediawiki/includes/Hooks.php(216): call_user_func_array('SemanticTasksMa...', Array)
  25. 24 /home/jfield2/public_html/mediawiki/includes/GlobalFunctions.php(3823): Hooks::run('ArticleSave', Array)
  26. 25 /home/jfield2/public_html/mediawiki/includes/WikiPage.php(1434): wfRunHooks('ArticleSave', Array)
  27. 26 [internal function]: WikiPage->doEdit('<noinclude>?Thi...', , 98)
  28. 27 /home/jfield2/public_html/mediawiki/includes/Article.php(1820): call_user_func_array(Array, Array)
  29. 28 /home/jfield2/public_html/mediawiki/includes/EditPage.php(1451): Article->__call('doEdit', Array)
  30. 29 /home/jfield2/public_html/mediawiki/includes/EditPage.php(1451): Article->doEdit('<noinclude>?Thi...', , 98)
  31. 30 /home/jfield2/public_html/mediawiki/includes/EditPage.php(986): EditPage->internalAttemptSave(Array, false)
  32. 31 /home/jfield2/public_html/mediawiki/includes/EditPage.php(379): EditPage->attemptSave()
  33. 32 /home/jfield2/public_html/mediawiki/includes/actions/EditAction.php(51): EditPage->edit()
  34. 33 /home/jfield2/public_html/mediawiki/includes/actions/EditAction.php(71): EditAction->show()
  35. 34 /home/jfield2/public_html/mediawiki/includes/Wiki.php(427): SubmitAction->show()
  36. 35 /home/jfield2/public_html/mediawiki/includes/Wiki.php(304): MediaWiki->performAction(Object(Article))
  37. 36 /home/jfield2/public_html/mediawiki/includes/Wiki.php(536): MediaWiki->performRequest()
  38. 37 /home/jfield2/public_html/mediawiki/includes/Wiki.php(446): MediaWiki->main()
  39. 38 /home/jfield2/public_html/mediawiki/index.php(59): MediaWiki->run()
  40. 39 {main}
Reply to "MW 1.20.x and SMW 1.8.x"

Compatibility with SMW 1.6+ ?

1
MLCT (talkcontribs)

I am seeing conflicts when trying to use tasks with semantic mediawiki 1.6 and higher. This all seems to circle around SMW's use of the validator extension, as this is the point it joined the code. Is anyone else having these issues? Mediawiki 1.18.2 or 1.19 vanilla on an empty wiki doesn't make any difference, but if I use SMW 1.5.6 tasks works fine, but anything 1.6 and above gives no task emails (no errors either). Putting debug breadcrumbs in the code suggests that the SMW query that tasks calls leads to the "assigned to" response being the pagename rather than the text/username following the "assigned to" text.

I shall play around with the code, looking at the diffs that occurred between 1.5.6 and 1.6 in SMW_QueryProcessor.php, as I am happy to hack my own installation to get this working rather than waiting for a release.

Reply to "Compatibility with SMW 1.6+ ?"

PHP Catchable fatal error: Method MailAddress::__toString() must return a string value in [...]/includes/UserMailer.php on line 128

1
85.220.170.130 (talkcontribs)

Hi,

i get always above error during saving a page with "[[Assigned to::User:<USERNAME>]]" property. Is that a known issue?

following versions i use: MediaWiki 1.18.1 PHP 5.3.6-13 Semantic Bundle (version 20120308) yesterday with version 20120124) SemanticTasks 1.4.1

Thanks

Reply to "PHP Catchable fatal error: Method MailAddress::__toString() must return a string value in [...]/includes/UserMailer.php on line 128"
Return to "Semantic Tasks" page.