1. #1
    Sencha User MaksFM's Avatar
    Join Date
    Sep 2012
    Location
    Krasnoyarsk
    Posts
    2
    Vote Rating
    0
    MaksFM is on a distinguished road

      0  

    Default bootstrap.json 404 (not found)

    bootstrap.json 404 (not found)


    Folder structure:
    folders.png

    app.json:
    Code:
    {
        "name": "Site",
    
        "requires": [
        ],
    
        "id": "064f9faf-5a76-42d1-aed5-df555632dfb0",    
        
        "theme": "ext-theme-gray",
        
        "web.mappings": "/var/www/localhost/public",
    
        "classpath": "${app.dir}/app.js,${app.dir}/app,${app.web.mappings}/js/common/app-ux"
    }
    local.properties:
    Code:
    app.out.base=ext
    build.dir=${app.web.mappings}/js/site
    skip.page=true
    By means of ZF2, according to $debug variable, I switch the following:
    $debug = true:
    HTML Code:
    <link href="/js/dev/bootstrap.css" media="screen" rel="stylesheet" type="text/css" />
    <script type="text/javascript" charset="utf-8" src="/js/dev/ext/ext-dev.js"></script>
    <script type="text/javascript" charset="utf-8" src="/js/dev/bootstrap.js"></script>
    <script type="text/javascript" charset="utf-8" src="/js/dev/app.js"></script>
    $debug = false:
    HTML Code:
    <link href="/js/site/resource/ext.css" media="screen" rel="stylesheet" type="text/css" />
    <script type="text/javascript" charset="utf-8" src="/js/site/app.js"></script>
    But in a debug mode ($debug = true), i have error:
    Code:
    GET http://localhost/bootstrap.json 404 (Not Found)
    Help me, how fix it?
    Correct path - http://localhost/js/dev/bootstrap.json

  2. #2
    Sencha User MaksFM's Avatar
    Join Date
    Sep 2012
    Location
    Krasnoyarsk
    Posts
    2
    Vote Rating
    0
    MaksFM is on a distinguished road

      0  

    Default I found the solution, it is possible to someone it will be useful.

    I found the solution, it is possible to someone it will be useful.


    For the correct formation of paths of "Ext.Loader.addClassPathMappings", in the bootstrap.js file, it is necessary to add "app.json", the following parameters:
    Code:
    {
        "web.mappings": "/var/www/localhost/public",
        
        "bootstrap.base.path": "${app.web.mappings}",
        
        "bootstrap.js.name": "bootstrap.js",
            
        "bootstrap.js": "${app.dir}/${app.bootstrap.js.name}",
        
        "bootstrap.css.name": "bootstrap.css",
            
        "bootstrap.css": "${app.dir}/${app.bootstrap.css.name}"
    }
    But unfortunately, the path of loading of "bootstrap.json" is static and doesn't change on any configuration properties. The code which loads "bootstrap.json", is added from the file determined by a variable - "$ {app.microloader.bootstrap}", in the end of "bootstrap.js" of the file. Therefore to correct an error of loading of "bootstrap.json", it is possible to use simply redirection with the help of ".htaccess" or any other means. Most likely, the decision built in "Sencha Cmd" while no, at least, I couldn't find it.

  3. #3
    Sencha - Support Team
    Join Date
    Mar 2012
    Location
    Lawrence, KS
    Posts
    285
    Vote Rating
    35
    greg.barry has a spectacular aura about greg.barry has a spectacular aura about

      0  

    Default


    Thanks for updating the thread with your findings!

Thread Participants: 1

Tags for this Thread