Details

      Description

      When publishing content through the eZ Publish api (both legacy and the new public API), the level attribute on header elements is set to "0" when the content is first edited through the back-office, and then "1" after saving the content once more.

      Steps to reproduce:

      • Through the legacy or new public API, create a new Article object, and set its intro or body to:

      <?xml version="1.0" encoding="utf-8"?>
      <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
        xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
        xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
          <header level="3">Level 3 Heading</header>
      </section>
      

      • Through the administration interface, edit the newly published object, and verify that the level attribute is not preserved correctly.

        Activity

        Hide
        Patrick Allaert (Inactive) added a comment -

        It looks like their is some confusion here between the internal storage format of ezxmltext attributes and the "eZ Simplified XML Input" format that may be used to enter ezxmltext from the backend in eZ Publish Legacy.

        The following "eZ Simplified XML Input" used to create some content in the admin interface:

        <header level="1">This is level 1</header>
        <header level="2">This is level 2</header>
        <header level="3">This is level 3</header>
        <header level="2">This is level 2</header>
        <header level="2">This is level 2</header>

        which doesn't have to be strictly valid XML is transformed into the strict ezxmltext internal format:

        <?xml version="1.0" encoding="utf-8"?>
        <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
          <section>
            <header>This is level 1</header>
            <section>
              <header>This is level 2</header>
              <section>
                <header>This is level 3</header>
              </section>
            </section>
            <section>
              <header>This is level 2</header>
            </section>
            <section>
              <header>This is level 2</header>
            </section>
          </section>
        </section>

        The "level" attribute of "header" is an "eZ Simplified XML Input" format and this format is not supported by the API which uses the internal one.

        Show
        Patrick Allaert (Inactive) added a comment - It looks like their is some confusion here between the internal storage format of ezxmltext attributes and the "eZ Simplified XML Input" format that may be used to enter ezxmltext from the backend in eZ Publish Legacy. The following "eZ Simplified XML Input" used to create some content in the admin interface: <header level="1">This is level 1</header> <header level="2">This is level 2</header> <header level="3">This is level 3</header> <header level="2">This is level 2</header> <header level="2">This is level 2</header> which doesn't have to be strictly valid XML is transformed into the strict ezxmltext internal format: <? xml version = "1.0" encoding = "utf-8" ?> < section xmlns:image = "http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml = "http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom = "http://ez.no/namespaces/ezpublish3/custom/" > < section > < header >This is level 1</ header > < section > < header >This is level 2</ header > < section > < header >This is level 3</ header > </ section > </ section > < section > < header >This is level 2</ header > </ section > < section > < header >This is level 2</ header > </ section > </ section > </ section > The "level" attribute of "header" is an "eZ Simplified XML Input" format and this format is not supported by the API which uses the internal one.
        Hide
        Patrick Allaert (Inactive) added a comment -

        Closed as this is actually not an issue.

        Show
        Patrick Allaert (Inactive) added a comment - Closed as this is actually not an issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Filipe Dobreira (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours, 35 minutes
              2h 35m