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

in eZXMLText, a <P> tag is being add to a link when it surrounds an image

    Details

    • Sprint:
      Pollux Core S5

      Description

      Please check Links around embedded images produce broken HTML, on eZ Community, for more details.

      If you add an image to an eZXMLText attribute and suround the image with a link, a <P> tag will be added in the frontend what not only breaks the formatting but differs from what was been doing in legacy.

      Steps to Reproduce

      <link href="http://google.com"><embed view="embed" size="medium" custom:offset="0" custom:limit="5" href="ezobject://110" /></link>
      

      • Create an article
      • Replicate the code below in eZOE by executing the following actions:
        • In the body attribute, insert an image and leave all the options as default.
        • Click on the image, add a link and make it point to google (for example).
      • Publish the article
      • In ezpublish.yml, add "legacy_mode: true" to one of your siteaccesses to make sure the design will be legacy
      • Clear the caches
      • Open the article in two different siteaccesses: one with "legacy_mode: true", the other standard for the new stack
      • Inspect the webpage's code

      Legacy siteaccess's code

      <code>
      <div class=""><div class="content-view-embed">
      	<div class="class-image">
      		<div class="attribute-image">
      			<a href="http://google.com" target="_self">
      				<img src="/var/ezdemo_site/storage/images/media/images/funel/526-1-eng-GB/funel_medium.png" 
                                              width="200" height="124"  style="border: 0px solid ;"
                                              alt="funel" title="funel" />
      			</a>    
      </code>
      

      Symfony siteaccess's code

      <div class="attribute-long">
      	<div class="ezxmltext-field">
      		<p>
      			<a href="http://google.com" target="_self">
      				<div>
      					<div class="content-view-embed">
      						<div class="class-image">
      							<div class="attribute-image">
      								<img src="/var/ezdemo_site/storage/images/media/images/funel/526-1-eng-GB/funel_medium.png"
      									 width="200" height="124"  style="border: 0px solid ;"
      									 alt="funel" title="funel" />
      

      As you can see, there's a "<P>" tag surrounding the link in the Symfony stack.

        Issue Links

          Activity

          Hide
          Bertrand Dunogier added a comment - - edited

          Reverts done.

          I'm thinking we should consider a follow-up for this. The base issue is actually fixed, and the patch itself works fine. But we are missing a couple elements, like in templates and controllers, plus some doc.

          Show
          Bertrand Dunogier added a comment - - edited Reverts done. I'm thinking we should consider a follow-up for this. The base issue is actually fixed, and the patch itself works fine. But we are missing a couple elements, like in templates and controllers, plus some doc.
          Hide
          Petar Spanja (Inactive) added a comment -

          The link is missing when rendering through new stack because the embed image template was not updated for added parameters.

          Pull request: https://github.com/ezsystems/DemoBundle/pull/131

          Show
          Petar Spanja (Inactive) added a comment - The link is missing when rendering through new stack because the embed image template was not updated for added parameters. Pull request: https://github.com/ezsystems/DemoBundle/pull/131
          Show
          Petar Spanja (Inactive) added a comment - DemoBundle PR merged in: https://github.com/ezsystems/DemoBundle/commit/13dd1c5785cdcd80ea075ea41195f64aeadbda8e
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA.
          Hide
          Gunnstein Lye added a comment -

          Regression: https://jira.ez.no/browse/EZP-24710 Paragraphs are stripped on the front-end if an XML block is published with the editor disabled

          Show
          Gunnstein Lye added a comment - Regression: https://jira.ez.no/browse/EZP-24710 Paragraphs are stripped on the front-end if an XML block is published with the editor disabled

            People

            • Assignee:
              Unassigned
              Reporter:
              Eduardo Fernandes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              10 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 - 1 week, 4 days, 7 hours, 55 minutes
                1w 4d 7h 55m

                  Agile