Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-31474 - fix embed anchor link converting to richtext #115

Merged
merged 1 commit into from
Apr 4, 2020

Conversation

ITernovtsii
Copy link
Contributor

Question Answer
JIRA issue EZP-31474
Type Bug
Target version 1.9
BC breaks no
Doc needed no

Currently, the converter works incorrectly for this XML:

<?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/">
  <paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">
    <link anchor_name="maincontent">
      <embed size="original" align="top" node_id="241190"/>
    </link>
  </paragraph>
</section>

It will result to empty object inserted into embed

<ezembed xlink:href="ezlocation://241190" ezxhtml:class="ez-embed-type-image">
	<ezlink/>
	<ezconfig><ezvalue key="size">original</ezvalue>ezconfig>
</ezembed>

This PR fixing it, so <ezlink xlink:href="#maincontent"/> will be created in converter.

TODO:

  • Implement feature / fix a bug.
  • Implement tests + specs and passing ($ composer test)
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@andrerom andrerom requested review from vidarl and alongosz March 16, 2020 09:15
@vidarl
Copy link
Member

vidarl commented Mar 16, 2020

Thank you. Would you be able to create a test for this? for instance in https://github.com/ezsystems/ezplatform-xmltext-fieldtype/tree/1.9/tests/lib/FieldType/Converter/Xslt/_fixtures

@ITernovtsii ITernovtsii force-pushed the fix-embed-anchor-link branch from 3547f28 to 4faf0b4 Compare March 23, 2020 16:47
@ITernovtsii
Copy link
Contributor Author

@vidarl Done. Added fixtures for the use-case.

@andrerom andrerom merged commit 568d79f into ezsystems:1.9 Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants