Skip to content

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

@DiegoAndresCortes

Description

@DiegoAndresCortes

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>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions