Problem with update js views in browser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zuzz
    Member
    • Nov 2023
    • 42

    Problem with update js views in browser

    Version 8.0.5, fresh installation
    browser firefox 115.5.0esr

    1. Custom view Qqq1/record/detail, code below

    2. Changings:
    selectTab5 -> selectTab6
    setup5 -> setup6
    afterRender5 -> afterRender6

    3.
    On espocrm:
    rebuild
    clear cache
    On browser:
    reload page​
    Ctrl+F5

    as result I see popup "setup5" not setup6, "afterRender5" not afterRender6 (screenshot in attach).
    The only way to update browser espocrm js custom views is to clear browser cache.

    -----------------
    define('custom:views/Qqq1/record/detail', ['views/record/detail'], function (Dep) {

    return Dep.extend({


    setup: function() {
    Dep.prototype.setup.call(this);
    debugger;
    alert("setup5");
    },

    afterRender: function() {
    Dep.prototype.afterRender.call(this);
    debugger;
    alert("afterRender5");
    },
    });
    });​
    Last edited by Zuzz; 12-06-2023, 05:53 PM.
  • Zuzz
    Member
    • Nov 2023
    • 42

    #2
    It becomes great problem.
    We update custom views, and changings do not delivered to client browsers.
    The only way is to clear browser cache.
    Is it any quick solution ?

    Comment

    • yuri
      Member
      • Mar 2014
      • 8455

      #3
      Hey, 'great problem' is an exaggeration.

      I recommend do customization as an installable extension. Once you install an extension, it will update appTimestamp in the data/config.php.

      You can update it manually (e.g. add 1), then the browser will understand that the cache is not actual anymore and clear it.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment


      • yuri
        yuri commented
        Editing a comment
        We will add a CLI command in the future version.
    • Zuzz
      Member
      • Nov 2023
      • 42

      #4
      appTimestamp solves it.
      Thanks a lot.

      Comment

      Working...