Jump to content

Recommended Posts

Posted

Hello Team,

Just try with Demo : C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Touch\DBGrid - Infinite Scroll

And add an UnimEdit for filtring.

After an unsuccessful search (number of rows = 0), try performing a new search :

Ajax Error :  Cannot read properties of null (reading 'isLoading')

Could you please have a look. It's really restrictive for our current project !

NB: This error not appears on Infinite Scroll (desktop edition) 

DBGrid - Infinite Scroll - Copie.7z

Posted

Hello,

Try this workaround:

Create a file files\unibufferedfix.js in your project folder:

Ext.define('UniFix.data.virtual.Store', {
    override: 'Ext.data.virtual.Store',
    load: function (options) {
        var me = this, pageMap = me.pageMap, groups;
        if (pageMap && pageMap.getPageCount() === 0) {
            pageMap.clear();
            pageMap.setPageCount(null);
            groups = me.getGroups && me.getGroups();
            if (groups) { groups.clear(); }
        }
        return me.callParent(arguments);
    }
});

And add it to ServerModule.CustomFiles:

files/unibufferedfix.js

 

  • Upvote 1
Posted
8 hours ago, Sherzod said:

Hello,

Try this workaround:

Create a file files\unibufferedfix.js in your project folder:

Ext.define('UniFix.data.virtual.Store', {
    override: 'Ext.data.virtual.Store',
    load: function (options) {
        var me = this, pageMap = me.pageMap, groups;
        if (pageMap && pageMap.getPageCount() === 0) {
            pageMap.clear();
            pageMap.setPageCount(null);
            groups = me.getGroups && me.getGroups();
            if (groups) { groups.clear(); }
        }
        return me.callParent(arguments);
    }
});

And add it to ServerModule.CustomFiles:

files/unibufferedfix.js

 

BRAVO...BRAVO...BRAVO.... Sherzod !

Now it works fine :)

I spent 3 days with AI (Claude, Gemini, ChatGpt) none of them suggested a solution.

This proves that we always need the touch of a Human Expert.

 

Thx a gain...

  • Thanks 1
Posted
22 minutes ago, Abaksoft said:

BRAVO... BRAVO... BRAVO.... Sherzod!

Agora funciona bem :)

Passei 3 dias com IA (Claude, Gemini, ChatGPT) e nenhum deles sugeriu uma solução.

Isso prova que sempre precisamos do toque de um Especialista Humano.

 

Valeu por um ganho...

Sherzod.IA 😀

  • Happy 1
Posted
16 hours ago, Sherzod said:

Hello,

Try this workaround:

Create a file files\unibufferedfix.js in your project folder:

Ext.define('UniFix.data.virtual.Store', {
    override: 'Ext.data.virtual.Store',
    load: function (options) {
        var me = this, pageMap = me.pageMap, groups;
        if (pageMap && pageMap.getPageCount() === 0) {
            pageMap.clear();
            pageMap.setPageCount(null);
            groups = me.getGroups && me.getGroups();
            if (groups) { groups.clear(); }
        }
        return me.callParent(arguments);
    }
});

And add it to ServerModule.CustomFiles:

files/unibufferedfix.js

 

Sherzod ! 

Even Gemini AI congratulates you.

"This is excellent news! A huge well done to Sherzod for finding this fix. He is one of the framework's long-standing moderators and key pillars; his contributions to the official forum are always surgically precise. Why does his patch work while ours didn't? Sherzod’s analysis reveals an intimate knowledge of recent versions of UniGUI Mobile: the framework does not use the standard BufferedStore class (which we were patching) but rather a more modern architecture called Ext.data.virtual.Store (ExtJS Modern’s native virtual scrolling). When the grid refreshes to an empty state (zero rows), the calculated page count drops to zero (`getPageCount() === 0`). It is at this precise moment that he intercepts the process to force a cache clear (`pageMap.clear();`) and reset the data packets before the parent ExtJS method executes and attempts to access the problematic property."

She knows you, man !

;)

 

  • Like 1
Posted

@Abaksoft 

Mā shāʾ Allāh. Thank you, brother! I truly appreciate it.

To be honest, the solution is a combination of years of learning, practical experience, and, to some extent, the thoughtful use of AI as a research and development tool. I believe the future of programming is not humans versus machines, but humans working together with machines.

  • Like 3
  • 3 weeks later...
Posted
On 7/23/2026 at 1:11 AM, Sherzod said:

Hello,

Try this workaround:

Create a file files\unibufferedfix.js in your project folder:

Ext.define('UniFix.data.virtual.Store', {
    override: 'Ext.data.virtual.Store',
    load: function (options) {
        var me = this, pageMap = me.pageMap, groups;
        if (pageMap && pageMap.getPageCount() === 0) {
            pageMap.clear();
            pageMap.setPageCount(null);
            groups = me.getGroups && me.getGroups();
            if (groups) { groups.clear(); }
        }
        return me.callParent(arguments);
    }
});

And add it to ServerModule.CustomFiles:

files/unibufferedfix.js

 

 

Goodmorning Sherzod,

An add-on for Cloudflare

Adding unibufferedfix.js to serverModule / Customfiles  works fine on local test, but once you run it via CloudFlare (https), the same problem appears:

Ajax Error :  Cannot read properties of null (reading 'isLoading')

Asking Gemini, she tells me :

Quote

The fact that Sherzod's fix works on your local machine (localhost) but fails when going through Cloudflare is a classic issue linked to the aggressive caching of reverse proxies and content delivery networks (CDNs). Cloudflare is blocking or serving an old version of your static files (HTTP cache), preventing the smartphone from loading the new JS fix.

 She suggest this solution, and that works fine :)

Quote

You can bypass the CDN cache by adding a dynamic version parameter (query string) that Cloudflare will interpret as an entirely new file. In your UniServerModule.CustomFiles property, instead of simply writing `files/unibufferedfix.js`, add a dummy version to the end of the link: `files/unibufferedfix.js?v=1.0.1`.

Hoping this will help people who will take the same way...

  • Thanks 1
  • Upvote 1
×
×
  • Create New...