Page 1 of 1

page loading too fast for HELPER to do it's work?

Posted: 2020-11-20 11:20
by onoehring
Hi,

I have encountered something very strange.
I am using AG Helper to make some fields readonly (I do not remember is this is an official feature).
--- Local ---
Locally (uniformserver - like xampp - with apache and mysql) page load is "slow" (that's ok and expected) - 20 seconds:
local.gif
local.gif (28.03 KiB) Viewed 2993 times
But: Everything works. The fields are correctly handled.
The console log of localhost looks like this:
local_con.png
local_con.png (2.18 KiB) Viewed 2993 times
--- Web ---
When I transfer the exact same files to a webserver (I tried two completely different hosters i.e. 1and1 and webgo.de) it's not working like this anymore!
Yes, the page loads faster now ... lightning fast to be exact, but the fields are not changed to readonly. Note: Only lookup fields (and lookup readonly) seem to be the problem.
On these servers it looks like this:
web.gif
web.gif (31.32 KiB) Viewed 2993 times
And there are errors showing up in the console log:
web_con.png
web_con.png (10.46 KiB) Viewed 2993 times

I notice the hint, that I should initialize AG helper in a different way. I will do so, but I do not think this will help.

I suspect, the problem is the load time of the page. AG Helper tries to put it's hand on the fields, but the page has not been loaded yet.
But
a) why does this happen only when the page is loading fast
b) how can I fix the problem (if I can) or is it
c) a bug in AG Helper?

Olaf

Re: page loading too fast for HELPER to do it's work?

Posted: 2020-11-20 11:43
by onoehring
Hi,

it get's stranger: When I reload the page (on the "live"/Web-site) - sometimes (! not every reload!) it works - sometimes not.

Olaf

Re: page loading too fast for HELPER to do it's work?

Posted: 2020-11-20 12:05
by jsetzer
onoehring wrote:
2020-11-20 11:20
... I do not remember is this is an official feature) ...
Hi Olaf,

no, it is not an official feature and not supported, sorry!

It should work with normal <input /> tags but I cannot guarantee for all possible datatypes and subtypes, nor for combined control-sets (like date-picker select boxes) or complex types like youtube-embeds or google-map embeds. That's definitely out of scope.

You can use it "as is" if it works for you.

Jan

Re: page loading too fast for HELPER to do it's work?

Posted: 2020-11-20 16:29
by onoehring
Hi Jan,

sure thing. I was so much surprised to see, that it does work - sometimes and the again not. Very, very strange and I do not have any idea (expect the "page was loaded to fast") why this should happen.

Olaf