Dear all,
when working with a recently updated to 2.0 SMW [1], I encounter the following
problems with subobjects and redirects.
Problem #1: export of RDF fails with "Data for a subobject of PageA cannot be
added to PageB'"
----------------------------------------------------------
When running SemanticMediaWiki/maintenance/dumpRDF.php following exception
occurs, stack below [2]: 'Data for a subobject of PageA cannot be added to
PageB'
PageB is a redirect to PageA. PageB used lots of template with semantic data.
When the information on PageB became outdated, a redirect has been inserted to
point the newer page PageA. PageA uses also lots of templates with subobjects.
Deleting page PageB solves the issue. However, there are thousands of redirects
in this wiki and they can't be deleted.
Unfortunately, I can not reproduce this issue in my test environment (same SMW
and MW versions) and I have no developer access to the system having this
problem.
Did anybody encountered this issue too? Any ideas how to fix this?
My assumption was that the reason for this bug lies in inconsistent semantic
data. Maybe because some refreshJobs aren't done yet.
When trying to debug redirects and data refresh jobs in my test environment, I
encountered the problem with job loops and redirects, which might be connected:
Problem #2: Infinite jobqueue runs
----------------------------------------------------------
There was a discussion on infinite jobqueue runs recently on this list.
However, I found this way easier to reproduce the problem.
When inserting a redirect into a page that existed before and had semantic data
on it, two SMW_UpdateJobs are inserted into the queue. When executed, these
jobs spawn identical jobs, which causes the queue to loop forever.
I can reproduce this behavior with the following procedure:
* Create a page and insert a subobject. Save the page.
* Edit the page again and insert a redirect, i.e. #REDIRECT [[AnotherPage]].
Save the page.
** The table 'smw_fpt_redi' has no entry for this page. I think there should be
one, right?
** The subobject and its properties are still in table 'smw_object_ids' and the
page is not marked as redirect.
** Now two new SMW_UpdateJobs are in the queue (one for origin page, one for
target page of the redirect). When executed, these jobs spawn identical jobs
again -> loops forever
** The RDF dump still produces the page with its subobject.
truncate smw_object_ids, smw_prop_stats; and runnning rebuildData.php shows the
page as a redirect in smw_object_ids. Just running rebuildData.php alone does
not help.
I assume the solution would be to detect that a redirect has been inserted into
a page that has semantic data and removed its semantic data properly.
Unfortunately, I haven't found a way to do this.
Any hints and suggestions are appreciated!
Thanks!
Daniel
[1]
MediaWiki 1.22.7
Semantic MediaWiki 2.0
[2]
Exception from line 601 of
www/htdocs/extensions/SemanticMediaWiki/includes/SemanticData.php: Data for a
subobject of PageA cannot be added to PageB.
Backtrace:
#0
www/htdocs/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_Sql3StubSemanticData.php(320):
SMW\SemanticData->addSubSemanticData(SMWSql3StubSemanticData)
#1
www/htdocs/extensions/SemanticMediaWiki/includes/storage/SQLStore/SMW_Sql3StubSemanticData.php(171):
SMWSql3StubSemanticData->addSubSemanticDataToInternalCache(SMW\DIProperty)
#2
www/htdocs/extensions/SemanticMediaWiki/includes/export/SMW_ExportController.php(128):
SMWSql3StubSemanticData->getSubSemanticData()
#3
www/htdocs/extensions/SemanticMediaWiki/includes/export/SMW_ExportController.php(452):
SMWExportController->serializePage(SMW\DIWikiPage, integer)
#4
www/htdocs/extensions/SemanticMediaWiki/includes/export/SMW_ExportController.php(422):
SMWExportController->printAll(boolean, integer, integer)
#5 www/htdocs/extensions/SemanticMediaWiki/maintenance/dumpRDF.php(158):
SMWExportController->printAllToOutput(boolean, integer, integer)
#6 www/htdocs/extensions/SemanticMediaWiki/maintenance/dumpRDF.php(92):
SMW\Maintenance\DumpRdf->generateRdfToChannel()
#7 www/htdocs/maintenance/doMaintenance.php(113):
SMW\Maintenance\DumpRdf->execute()
#8 www/htdocs/extensions/SemanticMediaWiki/maintenance/dumpRDF.php(164):
require_once(string)
#9 {main}
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel