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

[3.0/2.1]: Installing packages/themes does not parse line breaks for the XML tags. #8195

Open
DiegoAndresCortes opened this issue May 4, 2024 · 2 comments

Comments

@DiegoAndresCortes
Copy link
Member

DiegoAndresCortes commented May 4, 2024

Basic Information

On a side note, I noticed that the XML parser for package-info.xml is broken and does not support line breaks within elements. This behavior cost me over an hour, as I didn't suspect this to be an issue. ;) It would be good to at least have this documented somewhere.

For example, this works:

<install for="2.1.4-2.1.99">
    <readme type="file" parsebbc="true">readme.txt</readme>
    <require-file name="obdaSameWindowLinks.php" destination="$sourcedir" />
    <hook hook="integrate_post_parsebbc" function="obdaSameWindowLinksReplaceTargetBlank" file="$sourcedir/obdaSameWindowLinks.php" />
    <hook hook="integrate_credits" function="obdaSameWindowLinksCredits" file="$sourcedir/obdaSameWindowLinks.php" />
</install>
<uninstall for="2.1.4-2.1.99">
    <hook hook="integrate_post_parsebbc" function="obdaSameWindowLinksReplaceTargetBlank" file="$sourcedir/obdaSameWindowLinks.php" reverse="true" />
    <hook hook="integrate_credits" function="obdaSameWindowLinksCredits" file="$sourcedir/obdaSameWindowLinks.php" reverse="true" />
    <remove-file name="$sourcedir/obdaSameWindowLinks.php" />
</uninstall>

On the other hand, this valid XML will cause the package installer to report that the package is broken:

<install for="2.1.4-2.1.99">
    <readme type="file" parsebbc="true">readme.txt</readme>
    <require-file name="obdaSameWindowLinks.php"
                  destination="$sourcedir" />
    <hook hook="integrate_post_parsebbc"
          function="obdaSameWindowLinksReplaceTargetBlank"
          file="$sourcedir/obdaSameWindowLinks.php" />
    <hook hook="integrate_credits"
          function="obdaSameWindowLinksCredits"
          file="$sourcedir/obdaSameWindowLinks.php" />
</install>
<uninstall for="2.1.4-2.1.99">
    <hook hook="integrate_post_parsebbc"
          function="obdaSameWindowLinksReplaceTargetBlank"
          file="$sourcedir/obdaSameWindowLinks.php"
          reverse="true" />
    <hook hook="integrate_credits"
          function="obdaSameWindowLinksCredits"
          file="$sourcedir/obdaSameWindowLinks.php"
          reverse="true" />
    <remove-file name="$sourcedir/obdaSameWindowLinks.php" />
</uninstall>
@MissAllSunday
Copy link
Contributor

I can confirm this, left a simple PR to resolve it.

@MissAllSunday
Copy link
Contributor

mmm #8237 references this issue and marks it as solved , I suppose I don't have enough permissions to do so anymore, anyway, this should be closed unless it also happens on 3.0 but last time I checked 3.0 it handles parsing differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants