Results 1 to 4 of 4

Thread: bootstrap.json 404 (not found)

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

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

    Default 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
    400
    Vote Rating
    77
      0  

    Default

    Thanks for updating the thread with your findings!

  4. #4
    Sencha Premium Member
    Join Date
    Jan 2015
    Posts
    1
    Vote Rating
    0
      0  

    Default

    You need to add the json mime type to IIS.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •