Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29011

XmlText to RichText migration script breaks on <link> tags with ID filled out

    XMLWordPrintable

Details

    Description

      Currently, while upgrading from eZ Publish 5.4 to eZ Platform, if there were some <link> tags with ID parameter filled out in the XmlText FieldType, then running the migration script from https://github.com/ezsystems/ezplatform-xmltext-fieldtype (ezxmltext:convert-to-richtext) results in the following error:

        [Symfony\Component\Debug\Exception\ContextErrorException]
        Warning: DOMDocument::loadXML(): xml:id : attribute value 45678 is not an NCName in Entity, line: 2
      
      
      Exception trace:
       () at xxx\vendor\ezsystems\ezplatform-xmltext-fieldtype\bundle\Command\ConvertXmlTextToRichTextCommand.php:259
       Symfony\Component\Debug\ErrorHandler->handleError() at n/a:n/a
       DOMDocument->loadXML() at xxx\vendor\ezsystems\ezplatform-xmltext-fieldtype\bundle\Command\ConvertXmlTextToRichTextCommand.php:259
       EzSystems\EzPlatformXmlTextFieldTypeBundle\Command\ConvertXmlTextToRichTextCommand->convert() at xxx\vendor\ezsystems\ezplatform-xmltext-fieldtype\bundle\Command\ConvertXmlTextToRichTextCommand.php:188
       EzSystems\EzPlatformXmlTextFieldTypeBundle\Command\ConvertXmlTextToRichTextCommand->convertFields() at xxx\vendor\ezsystems\ezplatform-xmltext-fieldtype\bundle\Command\ConvertXmlTextToRichTextCommand.php:93
       EzSystems\EzPlatformXmlTextFieldTypeBundle\Command\ConvertXmlTextToRichTextCommand->execute() at xxx\vendor\symfony\symfony\src\Symfony\Component\Console\Command\Command.php:242
       Symfony\Component\Console\Command\Command->run() at xxx\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:861
       Symfony\Component\Console\Application->doRunCommand() at xxx\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:193
       Symfony\Component\Console\Application->doRun() at xxx\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php:84
       Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at xxx\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:117
       Symfony\Component\Console\Application->run() at xxx\app\console:29
      

      The migration stops at this Field.
      In the database, the fragment that causes the error looks like the following:

      <link xhtml:id="123" url_id="32">Test</link>
      

      Steps to reproduce

      1. Create a new eZ Publish installation.
      2. Create a new Article Content Object.
      3. Inside of one of the Article's Rich Text Fields, write any text (for example "Test"). Select this text and click "Insert/edit link" option. There, select "Https" option and insert "https://example.com" below it. Finally, put "123" into the ID parameter and click "OK". Publish the Article.
      4. Migrate to eZ Platform using this guide: https://doc.ezplatform.com/en/latest/migrating/migrating_from_ez_publish_platform/.
      5. Migrate XmlText to RichText (https://doc.ezplatform.com/en/latest/migrating/migrating_from_ez_publish_platform/#321-migrate-xmltext-content-to-richtext).
      6. During the execution of ezxmltext:convert-to-richtext command, you will be presented with the error described above.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jacek.foremski-obsolete@ez.no Jacek Foremski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: