You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Chris Emerson (JIRA)" <ji...@apache.org> on 2013/09/03 13:53:51 UTC

[jira] [Commented] (CB-4708) injectPluginScript() can't find cordova_plugins.js when app is on an HTML file in a sub folder of www

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

Chris Emerson commented on CB-4708:
-----------------------------------

I tried throwing together a test app this AM to show the behavior here - but findCordovaPath() actually seems to be working regardless if I do my cordova.js include via <script> on the HTML page or via a document.write via my app.js file - so it's possible there is another twist/condition that my main app is introducing here that is causing the core issue. I'll research more and post back when I have more detail.
                
> injectPluginScript() can't find cordova_plugins.js when app is on an HTML file in a sub folder of www
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CB-4708
>                 URL: https://issues.apache.org/jira/browse/CB-4708
>             Project: Apache Cordova
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>         Environment: iOS / Xcode 4.6.3 (4H1503)
> OS X 10.8.4
>            Reporter: Chris Emerson
>            Assignee: Andrew Grieve
>              Labels: cordova_plugins.js,, injectPluginScript, plugins,
>
> Summary: 
> injectPluginScript() can't find cordova_plugins.js when app is on an HTML file in a sub folder of www. 
> Details:
> I've confirmed that the cordova_plugins.js file that sits in the www folder never gets loaded if the app has navigated to an html file in a sub folder of www. 
> In my app/tests I have 14 plugins loading. The [moduleList] object that is instantiated and set in cordova.js confirms this when I check moduleList.length on the initial load of the app. However, when I check after navigating to a html file in a sub folder of www the moduleList object is empty. 
> The final confirmation of my theory/issue is that if I copy the current cordova_plugins.js file to the sub folder where my app has navigated to the moduleList object *does* get populated correctly, the finishPluginLoading() in cordova.js finishes successfully and my plugins are available in the app once again.

--
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