You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Steve Gill (JIRA)" <ji...@apache.org> on 2013/05/15 05:01:16 UTC

[jira] [Commented] (CB-3393) plugin_loader.js and path issue

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

Steve Gill commented on CB-3393:
--------------------------------

This issue hit me when I was using mobile spec. navigator.accelerometer was defined on my index.html after I installed the device motion plugin. Has no issue finding cordova_plugins.json. When I switched to the accelerometer tests, it reloads cordova.js but references it as ../cordova.js. This is fine because cordova.js is one directory above and the accelerometer tests are in the accelerometer directory. When it comes to plugin_loader.js code running, it can't find cordova_plugins.json. It looks for it in the accelerometer directory. 

Hope that makes sense
                
> plugin_loader.js and path issue
> -------------------------------
>
>                 Key: CB-3393
>                 URL: https://issues.apache.org/jira/browse/CB-3393
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS, Plugman
>            Reporter: Steve Gill
>            Assignee: Filip Maj
>
> Blackberry dudes added a commit to plugin_loader.js that made the path to cordova_plugins.js absolute. This broke plugin loading for ios + android. See https://github.com/apache/cordova-js/commit/8d59461c6f796f2c88a0eae2467cc663897ccce9
> I reverted that commit with https://github.com/apache/cordova-js/commit/757fa3c93d078fc9d1e393e671f81c6ed237bc06
> It works again on Android and iOS. Issue that arises now is that cordova.js expects cordova_plugins.json to be in the same directory as it. If you have cordova.js in a js directory and cordova_plugins.json exists in a directory above, the plugin will not load because it won't be able to find cordova_plugins.
> Can we reference cordova_plugins in a way that will work across platform?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira