What an exciting day it has been! It seems that last night there was a widespread update for Redhat/Centos operating systems that run the webservers of many web hosting providers. This update included a version of the libxml2 library that is used by PHP when utilizing XML. This updated version of libxml2 seems to be causing widespread problems for existing PHP frameworks, projects and code that make use of those XML features. One of these is our own RokCommon library that is used by RokGallery and RokSprocket for both Joomla and WordPress. We make use of a static method called DOMDocument::schemavalidate() which seems to have broken with this last update, so please read more for a quick fix...
If you see an error resembling the following:
Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Invalid Schema in /home/userhome/public_html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/Xml.php on line 263 Fatal error: Uncaught exception 'InvalidArgumentException' with message '[ERROR 3070] complex type 'service': The content model is not determinist. (in /home/userhome/public_html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/services.xsd - line 38, column 0) [ERROR 3070] complex type 'argument': The content model is not determinist. (in /home/userhome/public_html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/services.xsd - line 69, column 0) [ERROR 3070] complex type 'call': The content model is not determinist. (in /home/userhome/public_html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/services.xsd - line 79, column 0)' in /home/userhome/public_html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/Xml.php:265 Stack trace: #0 /home/userhome/public_html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/Xml.php(223): RokCommon_Service_Container_Loader_File_Xml->validate(Object(DOMDocument)) #1 /home/userhome/public_html/libraries/rokcommon/RokCommon/Service/Con in /home/userhome/public_html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/Xml.php on line 265
The quick fix is to locate the Xml.php file that exists in RokCommon and comment out the line that makes the schemaValidate() call.
Find the following code on line 223
Comment it out by prepending // to the begining of the line, like so:
We plan on releasing updates for both RokSprocket and RokGallery for both Joomla and WordPress in the next day or so. This will have this RokCommon fix in it as well as any other bug fixes we have in the queue, so keep an eye out for that!