Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.8
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readline 5.2
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      26601

      Description

      On an installation build end January 2010 with latest libraries Common Cartridge import is enabled but with a cartridge authorized by IMS I get the error "Schema not valid". See also forum contribution at http://moodle.org/mod/forum/discuss.php?d=143653.

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        Hi,

        assigning this to Darko, as far as they (UVCMS, Moodle Partner) know more than me about all the schema validation process.

        Ingo, is that package, or a reduced version available (IMS site or so) for easier testing?

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Hi, assigning this to Darko, as far as they (UVCMS, Moodle Partner) know more than me about all the schema validation process. Ingo, is that package, or a reduced version available (IMS site or so) for easier testing? Ciao
        Hide
        Ingo Dahn added a comment -

        I used Cartridge 1 of the IMS Valid Cartridges Package. I think this is available only for members of the CC Alliance. I can send it directly to the Moodle developers but I cannot put it on this public forum.
        Best
        ID

        Show
        Ingo Dahn added a comment - I used Cartridge 1 of the IMS Valid Cartridges Package. I think this is available only for members of the CC Alliance. I can send it directly to the Moodle developers but I cannot put it on this public forum. Best ID
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Really? We are CC-Alliance members too and I remember myself testing exactly that package (the one that includes practically everything) but authentication.

        Uhm.. strange. Could you try to enable debugging in your site to see if you get some PHP error/warning on the browser and/or web server logs? Also, can you report here the OS/PHP versions you are using? Just to cover the case of something being wrong/buggy in your environment and be able to reproduce it here.

        Going to tests Package 1 right now here... stay tuned. Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Really? We are CC-Alliance members too and I remember myself testing exactly that package (the one that includes practically everything) but authentication. Uhm.. strange. Could you try to enable debugging in your site to see if you get some PHP error/warning on the browser and/or web server logs? Also, can you report here the OS/PHP versions you are using? Just to cover the case of something being wrong/buggy in your environment and be able to reproduce it here. Going to tests Package 1 right now here... stay tuned. Ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Just to confirm that this package:

        ccvtd0001v1p14.zip - Common Cartridge Test Data Set - Validation Cartridge 1 (CCTDS-VC1-1)

        Has been restored here in my Moodle 1.9.7+ test environment without problem at all:

        • Checking for IMS-CC...
        • CC Format! Checking Schema...
        • Schema Valid!

        So it really sounds like some problem in your environment that we aren't detecting properly (wrong message) or some bug in your XML libraries leading to the failing validation.

        In any case, please, report your versions here. ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Just to confirm that this package: ccvtd0001v1p14.zip - Common Cartridge Test Data Set - Validation Cartridge 1 (CCTDS-VC1-1) Has been restored here in my Moodle 1.9.7+ test environment without problem at all: Checking for IMS-CC... CC Format! Checking Schema... Schema Valid! So it really sounds like some problem in your environment that we aren't detecting properly (wrong message) or some bug in your XML libraries leading to the failing validation. In any case, please, report your versions here. ciao
        Hide
        Ingo Dahn added a comment -

        Note: I used a more recent version of the cartridge: ccvtd0001v1p16.zip which is contained in CCv1p0ValidTestDataSetv1p28. The Moodle installation we are using has been set up for our project at European Schoolnet and I don't have access to the underlying OS. I asked Joris, who runs the Moodle, to comment here on this issue.
        ID

        Show
        Ingo Dahn added a comment - Note: I used a more recent version of the cartridge: ccvtd0001v1p16.zip which is contained in CCv1p0ValidTestDataSetv1p28. The Moodle installation we are using has been set up for our project at European Schoolnet and I don't have access to the underlying OS. I asked Joris, who runs the Moodle, to comment here on this issue. ID
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Hi again Ingo,

        just downloaded CCv1p0ValidTestDataSetv1p28 and ccvtd0001v1p16.zip has been imported here without problems too.

        So it seems something in your server is causing the validation to fail. As commented, try to run it with debug enabled and report here results and versions, TIA!

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Hi again Ingo, just downloaded CCv1p0ValidTestDataSetv1p28 and ccvtd0001v1p16.zip has been imported here without problems too. So it seems something in your server is causing the validation to fail. As commented, try to run it with debug enabled and report here results and versions, TIA! Ciao
        Hide
        Ingo Dahn added a comment -

        Hi,
        here is the debug output with the same cartridge restore:

        Aspect Moodle
        You are logged in as Ingo Dahn: Teacher (Return to my normal role)
        You are here

        • aspect
        • / ? test123
        • / ? Administration
        • / ? Course restore
        • / ? ccvtd0001v1p16.zip

        Course restore: ccvtd0001v1p16.zip

        • Creating temporary structures
        • Deleting old data
        • Copying zip file
        • Unzipping backup
        • Checking for IMS-CC...
          CC Format! Checking Schema...

        Warning: DOMDocument::schemaValidate(http://www.w3.org/2001/xml.xsd) [function.DOMDocument-schemaValidate]: failed to open stream: Connection timed out in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: I/O warning : failed to load external entity "http://www.w3.org/2001/xml.xsd" in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: Element '

        {http://www.w3.org/2001/XMLSchema}

        import': Failed to locate a schema at location 'http://www.w3.org/2001/xml.xsd'. Skipping the import. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate(http://www.w3.org/2001/xml.xsd) [function.DOMDocument-schemaValidate]: failed to open stream: Connection timed out in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: I/O warning : failed to load external entity "http://www.w3.org/2001/xml.xsd" in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: Element '

        {http://www.w3.org/2001/XMLSchema}

        import': Failed to locate a schema at location 'http://www.w3.org/2001/xml.xsd'. Skipping the import. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: attribute use (unknown), attribute 'ref': The QName value '

        {http://www.w3.org/XML/1998/namespace}

        base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: attribute use (unknown), attribute 'ref': The QName value '

        {http://www.w3.org/XML/1998/namespace}

        base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: attribute use (unknown), attribute 'ref': The QName value '

        {http://www.w3.org/XML/1998/namespace}

        base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: attribute use (unknown), attribute 'ref': The QName value '

        {http://www.w3.org/XML/1998/namespace}

        base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: attribute use (unknown), attribute 'ref': The QName value '

        {http://www.w3.org/XML/1998/namespace}

        base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: attribute use (unknown), attribute 'ref': The QName value '

        {http://www.w3.org/XML/1998/namespace}

        base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate]: Invalid Schema in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70
        The schema is not valid.

        An error has ocurred
        Stack trace:

        • line 1664 of lib/deprecatedlib.php: call to debugging()
        • line 8091 of backup/restorelib.php: call to error()
        • line 42 of backup/restore_precheck.html: call to restore_precheck()
        • line 152 of backup/restore.php: call to include_once()

        Moodle Docs for this page
        You are logged in as Ingo Dahn (Logout)
        Home

        • Validate HTML
        • Section 508 Check
        • WCAG 1 (2,3) Check
        Show
        Ingo Dahn added a comment - Hi, here is the debug output with the same cartridge restore: Aspect Moodle You are logged in as Ingo Dahn: Teacher (Return to my normal role) You are here aspect / ? test123 / ? Administration / ? Course restore / ? ccvtd0001v1p16.zip Course restore: ccvtd0001v1p16.zip Creating temporary structures Deleting old data Copying zip file Unzipping backup Checking for IMS-CC... CC Format! Checking Schema... Warning: DOMDocument::schemaValidate( http://www.w3.org/2001/xml.xsd ) [function.DOMDocument-schemaValidate] : failed to open stream: Connection timed out in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : I/O warning : failed to load external entity "http://www.w3.org/2001/xml.xsd" in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : Element ' {http://www.w3.org/2001/XMLSchema} import': Failed to locate a schema at location 'http://www.w3.org/2001/xml.xsd'. Skipping the import. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate( http://www.w3.org/2001/xml.xsd ) [function.DOMDocument-schemaValidate] : failed to open stream: Connection timed out in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : I/O warning : failed to load external entity "http://www.w3.org/2001/xml.xsd" in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : Element ' {http://www.w3.org/2001/XMLSchema} import': Failed to locate a schema at location 'http://www.w3.org/2001/xml.xsd'. Skipping the import. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : attribute use (unknown), attribute 'ref': The QName value ' {http://www.w3.org/XML/1998/namespace} base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : attribute use (unknown), attribute 'ref': The QName value ' {http://www.w3.org/XML/1998/namespace} base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : attribute use (unknown), attribute 'ref': The QName value ' {http://www.w3.org/XML/1998/namespace} base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : attribute use (unknown), attribute 'ref': The QName value ' {http://www.w3.org/XML/1998/namespace} base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : attribute use (unknown), attribute 'ref': The QName value ' {http://www.w3.org/XML/1998/namespace} base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : attribute use (unknown), attribute 'ref': The QName value ' {http://www.w3.org/XML/1998/namespace} base' does not resolve to a attribute declaration. in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [function.DOMDocument-schemaValidate] : Invalid Schema in /localhost/home/httpdata/public_html/moodleAspect/backup/cc/restore_cc.php on line 70 The schema is not valid. An error has ocurred Stack trace: line 1664 of lib/deprecatedlib.php: call to debugging() line 8091 of backup/restorelib.php: call to error() line 42 of backup/restore_precheck.html: call to restore_precheck() line 152 of backup/restore.php: call to include_once() Moodle Docs for this page You are logged in as Ingo Dahn (Logout) Home Validate HTML Section 508 Check WCAG 1 (2,3) Check
        Hide
        Darko Miletic added a comment -

        This is the patch that solves the problem

        Show
        Darko Miletic added a comment - This is the patch that solves the problem
        Hide
        Darko Miletic added a comment -

        The problem here is that in schemas shipped with CC validator xml.xsd file is downloaded from internet. In case when server does not have access to the external internet validation fails since libxml2 can not download missing file.

        I modified the main scheme validation file and added xml.xsd.

        This patch is based on current MOODLE_19_STABLE branch.

        Let me know Eloy if problem persists.

        Show
        Darko Miletic added a comment - The problem here is that in schemas shipped with CC validator xml.xsd file is downloaded from internet. In case when server does not have access to the external internet validation fails since libxml2 can not download missing file. I modified the main scheme validation file and added xml.xsd. This patch is based on current MOODLE_19_STABLE branch. Let me know Eloy if problem persists.
        Hide
        Darko Miletic added a comment -

        done

        Show
        Darko Miletic added a comment - done
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Hi Darko,

        thanks for the quick response. I've just applied your patch (after some problems, it was somehow incorrect) both to 19_STABLE and HEAD. Now the validations happens without network connectivity.

        But, although working... I'm getting these 2 warnings:

        Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Element '

        {http://www.w3.org/2001/XMLSchema}

        import': Skipping import of schema located at 'http://www.w3.org/2001/xml.xsd' for the namespace 'http://www.w3.org/XML/1998/namespace', since this namespace was already imported with the schema located at '/Users/stronk7/cvs_moodle/moodle_19_stable/backup/cc/schemas/xml.xsd'. in /Users/stronk7/cvs_moodle/moodle_19_stable/backup/cc/restore_cc.php on line 70

        Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate]: Element '

        {http://www.w3.org/2001/XMLSchema}

        import': Skipping import of schema located at 'http://www.w3.org/2001/xml.xsd' for the namespace 'http://www.w3.org/XML/1998/namespace', since this namespace was already imported with the schema located at '/Users/stronk7/cvs_moodle/moodle_19_stable/backup/cc/schemas/xml.xsd'. in /Users/stronk7/cvs_moodle/moodle_19_stable/backup/cc/restore_cc.php on line 70

        Dupe import of namespace?

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Hi Darko, thanks for the quick response. I've just applied your patch (after some problems, it was somehow incorrect) both to 19_STABLE and HEAD. Now the validations happens without network connectivity. But, although working... I'm getting these 2 warnings: Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate] : Element ' {http://www.w3.org/2001/XMLSchema} import': Skipping import of schema located at 'http://www.w3.org/2001/xml.xsd' for the namespace 'http://www.w3.org/XML/1998/namespace', since this namespace was already imported with the schema located at '/Users/stronk7/cvs_moodle/moodle_19_stable/backup/cc/schemas/xml.xsd'. in /Users/stronk7/cvs_moodle/moodle_19_stable/backup/cc/restore_cc.php on line 70 Warning: DOMDocument::schemaValidate() [domdocument.schemavalidate] : Element ' {http://www.w3.org/2001/XMLSchema} import': Skipping import of schema located at 'http://www.w3.org/2001/xml.xsd' for the namespace 'http://www.w3.org/XML/1998/namespace', since this namespace was already imported with the schema located at '/Users/stronk7/cvs_moodle/moodle_19_stable/backup/cc/schemas/xml.xsd'. in /Users/stronk7/cvs_moodle/moodle_19_stable/backup/cc/restore_cc.php on line 70 Dupe import of namespace? Ciao
        Hide
        Darko Miletic added a comment -

        Simply ignore this. It is just harmless notice generated because two xsd files also include xml.xsd.

        Show
        Darko Miletic added a comment - Simply ignore this. It is just harmless notice generated because two xsd files also include xml.xsd.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Roger. Thanks Darko!

        Show
        Eloy Lafuente (stronk7) added a comment - Roger. Thanks Darko!

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: