cache bust error after upload to team server

2
Hello, My project works fine until I upload it to the team server (I'm the only developer/user). When I try and run it after having uploaded it the the team server I get this error: The 'cacheBust' parameter is missing. Update the index page in the theme by adding the cachebust to the 'dojoConfig' and to every url pointing to a static resource (e.g. scripts and stylesheets). See index-example.html in the deployment/web directory for an example of what the index page should look like. I have tried this with several projects. Does anyone have an idea of what is wrong? Thanks Fredrik
asked
3 answers
3

Open the theme file inside project directory: 'C/ProjectName/theme' Edit index.html with notepad.

add line: cacheBust: "{{cachebust}}" like so:

<script>
        dojoConfig = {
            isDebug: false,
            rtlRedirect: "index-rtl.html",
            baseUrl: "mxclientsystem/dojo/",
                cacheBust: "{{cachebust}}"
        };
    </script>

You need to add "?{{cachebust}}" before all links like so:

    <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css?{{cachebust}}">
    <link rel="stylesheet" href="mxclientsystem/mxui/ui/mxui.css?{{cachebust}}">
    <link rel="stylesheet" href="css/theme.css?{{cachebust}}">

rerun application and it should work.

Compare your html here:

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Mendix 5</title>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css?{{cachebust}}">
        <link rel="stylesheet" href="mxclientsystem/mxui/ui/mxui.css?{{cachebust}}">
        <link rel="stylesheet" href="css/theme.css?{{cachebust}}">
    </head>
    <body dir="ltr">
        <div id="content"></div>
        <script>
            dojoConfig = {
                isDebug: false,
                rtlRedirect: "index-rtl.html",
                baseUrl: "mxclientsystem/dojo/",
                cacheBust: "{{cachebust}}"
            };
        </script>
        <script>
            if (!document.cookie || !document.cookie.match(/(^|;)originURI=/gi))
                document.cookie = "originURI=/login.html?{{cachebust}}";
        </script>
        <script src="mxclientsystem/mxui/mxui.js?{{cachebust}}?{{cachebust}}"></script>
    </body>
</html>
answered
1

The answer is in release notes under Migration:

https://world.mendix.com/display/ReleaseNotes/5.15.0

answered
0

Hi there

 

I have resolved mine by closing the project,clear browsing data ,on C/ProjectName/theme' delete index.html. When starting up the  project again , the index will be created  automatically and should be working fine.

 I hope this helps someone.

answered