Extension talk:Semantic Tasks

Jump to navigation Jump to search

About this board

archive 1


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.

Reply to "Does not recognize SMW 3.x"
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.

Reply to "require maintenance.php"

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"
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"
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"

There is no result format for 'auto'.

2
128.229.4.2 (talkcontribs)

I get the following error when I activate SemanticTasks in the semantic-bundle and clicking the save page button. Can you please let me know if I am missing something?

There is no result format for 'auto'. Backtrace:

  1. 0 /var/www/html/paxwiki/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php(94): SMWQueryProcessor::getResultPrinter('auto', true)
  2. 1 /var/www/html/paxwiki/extensions/SemanticTasks/SemanticTasks.classes.php(348): SMWQueryProcessor::createQuery('Test Page[[...', Array, true, 'auto', Array)
  3. 2 /var/www/html/paxwiki/extensions/SemanticTasks/SemanticTasks.classes.php(124): SemanticTasksMailer::getQueryResults('Test Page[[...', Array, false)
  4. 3 /var/www/html/paxwiki/extensions/SemanticTasks/SemanticTasks.classes.php(20): SemanticTasksMailer::getAssignees('Assigned to', 'Test Page', Object(User))
  5. 4 [internal function]: SemanticTasksMailer::findOldValues(Object(Article), Object(User), 'Test?d?dsa?dsa?...', , 0, NULL, NULL, 98, Object(Status))
  6. 5 /var/www/html/paxwiki/includes/Hooks.php(158): call_user_func_array(Array, Array)
  7. 6 /var/www/html/paxwiki/includes/Article.php(2090): wfRunHooks('ArticleSave', Array)
  8. 7 /var/www/html/paxwiki/includes/Article.php(1976): Article->doEdit('Test?d?dsa?dsa?...', , 98)
  9. 8 /var/www/html/paxwiki/includes/EditPage.php(1076): Article->updateArticle('Test?d?dsa?dsa?...', , false, false, false, )
  10. 9 /var/www/html/paxwiki/includes/EditPage.php(2656): EditPage->internalAttemptSave(false, false)
  11. 10 /var/www/html/paxwiki/includes/EditPage.php(415): EditPage->attemptSave()
  12. 11 /var/www/html/paxwiki/includes/EditPage.php(296): EditPage->edit()
  13. 12 /var/www/html/paxwiki/includes/Wiki.php(522): EditPage->submit()
  14. 13 /var/www/html/paxwiki/includes/Wiki.php(69): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
  15. 14 /var/www/html/paxwiki/index.php(114): MediaWiki->performRequestForTitle(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
  16. 15 {main}
Yaron Koren (talkcontribs)

I believe Jeroen fixed this in SVN at some point recently.

Reply to "There is no result format for 'auto'."
Jojalozzo (talkcontribs)

I revised the page some but I made some assumptions, especially about the internals in 'Cron job' but in other places also, which a knowledgeable person should review. My apologies for any errors. I hope it was an improvement. Jojalozzo 15:47, 22 August 2011 (UTC)

Reply to "Revised"
Lstep (talkcontribs)

I can't send any email, I get an error in the mailer/mediawiki logs:

UserMailer::send: sending mail to "myemail@mydomain.com" <>
Sending mail via internal mail() function
Mar  3 18:15:45 server postfix/sendmail[6730]: fatal: www-data(33): No recipient addresses found in message header
Error sending mail

It seems that it takes my email as the username, and puts nothing in <>

Maybe I didn't specify correctly the 'assigned to' property ? I did the following in a page :

[[Assigned to::myemail@mydomain.com]]

Is the syntax correct ?

Reach Out to the Truth (talkcontribs)

From the documentation: "Assigned to, and Carbon copy property values should be of the form: User:<username>"

Unless the user actually has an email address as their username, that won't work.

Reply to "Error when sending an email"