You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/05/06 00:36:00 UTC

[jira] [Commented] (CB-13979) getEditConfigs() and getConfigFiles() only work for the first tag

    [ https://issues.apache.org/jira/browse/CB-13979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16464955#comment-16464955 ] 

ASF GitHub Bot commented on CB-13979:
-------------------------------------

dpogue opened a new pull request #19: CB-13979: More consistency for config.xml lookups
URL: https://github.com/apache/cordova-common/pull/19
 
 
   Fix as proposed in https://issues.apache.org/jira/browse/CB-13979
   
   I'd like to try to get a unit test written to confirm this fix before merging.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> getEditConfigs() and getConfigFiles() only work for the first <platform> tag
> ----------------------------------------------------------------------------
>
>                 Key: CB-13979
>                 URL: https://issues.apache.org/jira/browse/CB-13979
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-common
>    Affects Versions: Master
>            Reporter: Kevin Christopher Henry
>            Assignee: Darryl Pogue
>            Priority: Minor
>
> I ran into something strange - my configuration would change based on the ordering of elements in config.xml.
> Looking at the source code, the culprit is getEditConfigs() and getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only look in the first platform tag for config directives:
> {{var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');}}
> {{var platform_edit_configs = platform_tag ? platform_tag.findall('edit-config') : [];}}
> This should probably be something like this instead (untested):
> {{var platform_edit_configs = this.doc.findall('./platform[@name="' + platform + '"]/edit-config');}}
> And similarly for getConfigFiles().



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org