-
Notifications
You must be signed in to change notification settings - Fork 29
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-30513: eZXMLText Migration: link tags containing embed-inline + other elements fails #110
base: 1.7
Are you sure you want to change the base?
Conversation
…ther elements fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RichText DocBook-wise it's ok, but...
We need to test it, because I have feeling that OE will crash (as mentioned in JIRA).
I'm not up to speed with the migration command. Do you have a recommendation how I could quickly test that migration? Preferably w/o creating Legacy instance and using it with Legacy Bridge ;)
What you want to test is how eZ Platform/OE deals with the that DocBook, right?. Then I would just insert the docbook markup provided in tests into existing content objects in a ezplatform db using mysql client ( change the IDs to valid ones of course ). If you want to test the migration itself, without legacy, just run the provided tests :
|
// After Expanding converter such links will contain only single embed element | ||
$xpathExpression = '//embed[parent::link]|//embed-inline[parent::link]'; | ||
$xpathExpression = '//embed[parent::link][count(preceding-sibling::*)+count(following-sibling::*)=0]|//embed-inline[parent::link][count(preceding-sibling::*)+count(following-sibling::*)=0]'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After giving it more thought, I'm not convinced that we should distinguish here a case where there's only one embed. It should be handled uniformly:
<para>Link:
<link xlink:href="ezlocation://333" xlink:show="none">Foo
<ezembedinline xlink:href="ezcontent://444" view="embed-inline">
<ezconfig>
<ezvalue key="size">original</ezvalue>
</ezconfig>
</ezembedinline>
bar
<ezembedinline xlink:href="ezcontent://445" view="embed-inline">
<ezconfig>
<ezvalue key="size">original</ezvalue>
</ezconfig>
</ezembedinline>
2
</link>
</para>
and
<para>Link:
<link xlink:href="ezlocation://333" xlink:show="none">Foo
<ezembedinline xlink:href="ezcontent://444" view="embed-inline">
<ezconfig>
<ezvalue key="size">original</ezvalue>
</ezconfig>
</ezembedinline>
bar
</link>
</para>
The only reason we would make a distinction here would be if UI was different for both cases. However I cannot imagine UI which would take advantage of link inside of embed-inline.
TODO:
$ composer test
)$ composer fix-cs
).