•  
      request #31063 Improve XML import error
    Infos
    #31063
    Guilhem Bonnefille (CS) (gbonnefille)
    2023-03-10 12:38
    2023-02-10 16:48
    32668
    Details
    Improve XML import error

    In some situations, the import of a Project XML archive fails with:

    RuntimeException: La structure du fichier n'est pas du XML valide in /usr/share/tuleap/src/common/Project/XML/XMLFileContentRetriever.php L55
    

    In this situation, the error was an invalid character (here a vertical tab, \v).

    Even with java installed, nothing more explicit.

    Import | Export
    14.3
    EL7 (CentOS|RHEL)
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Nicolas Terray (nterray)
    Closed
    2023-03-10
    Attachments
    Empty
    References

    Follow-ups

    User avatar

    In order to collect some clue, I changed the usr/share/tuleap/src/common/Project/XML/XMLFileContentRetriever.php L55 with:

            if (! empty($errors)) {
                foreach($errors as $error) {
                echo "\t", $error->message;
                }
                throw new RuntimeException($GLOBALS['Language']->getText('project_import', 'invalid_xml'));
            }