Author: amh.public
Description:
Temporary patch to SMW_Serializer_RDFXML.php as suggested by Markus on semediawiki-user mailing list
The SMW_dumpRDF script does not appear to work properly for MW 1.16.2, SMW
1.5.5.2 or 1.5.6, on PHP 5.2.10. I have a variety of other extensions installed, but these problems persist even if I disable all other extensions (none of which require patching MW or SMW code). All properties in the system have their own pages and types, and all types have their own pages.
The script will go through some content and generate a file up to about 330 KB, then stop with the following error message:
Catchable fatal error: Argument 1 passed to SMWSerializer::requireDeclaration() must be an instance of SMWExpResource, instance of SMWExpData given, called in /path/to/extensions/SemanticMediaWiki/includes/export/SMW_Serializer_RDFXML.php on line 158 and defined in /path/to/extensions/SemanticMediaWiki/includes/export/SMW_Serializer.php on line 218
I have only tested this on a system with multiple wikis that use a lot of shared code and symlinks, e.g., "cd /path/to/mwinstall; export MW_INSTALL_PATH=. && php extensions/SemanticMediaWiki/maintenance/SMW_dumpRDF.php -o /path/to/file"
The result is the same whether I use "-o /path/to/file" or "> /path/to/file".
The "/path/to" above represents the actual path; it gets reported in full by the error message and correctly reports the symlink target.
The attached patch from Markus to includes/export/SMW_Serializer_RDFXML.php seems to allow the export to work. I have not fully validated the export data, but the dump appears to capture everything it is supposed to.
Version: unspecified
Severity: enhancement
Attached: