terminal42 / contao-conditionalformfields

Display form fields conditionally in Contao Open Source CMS
MIT License
18 stars 11 forks source link

CONTAO 4.13 and Chrome does not work #64

Closed mv-soft777 closed 1 year ago

mv-soft777 commented 2 years ago

Hallo,

I have used the extension for a formular.

In Browser FireFox its work correct, but NOT in Chrome.

Every cache has been cleared, then the display works once. After that not again.

If you jump to other pages and then back to the form, the dependent field appears completely wrong.

The page cache of the CONTAO page was also set to 0.... unfortunately no improvement.

mv-soft777 commented 2 years ago

Ups.... hier das Problem in deutsch:

Ich habe die Erweiterung für ein Formular verwendet.

Im Browser Firefox funktioniert es korrekt, aber NICHT in Chrome.

Jeder Cache wurde gelöscht: Dann funktioneirt die Anzeige einmalig. Danach wieder nicht.

Springt man zu anderen Seiten und danach wieder zum Formular, erscheint das abhängiges Feld vollkommen falsch.

Auch der Seiterncache der CONTAO- Seite wurde auf 0 gesetzt.... leider keine Besserung.

denniserdmann commented 2 years ago

I have the same problem (and think the contao version doesn'nt matter).

I guess it has something to do that the script is loaded inside the head. So on a fresh reload, the function gets called before the html is rendered completely. If the page is already cached, the html is ready when the function is called.

Depending on your condition it can work with a cleared cache or only when the page is already cached.

If i copy the script to the bottom of the page it works for me regardless of caching. So i think the solution would be to move the script to the end or call the function at the bottom of the page (see contao slider: script in head, call at the end of the page)

denniserdmann commented 2 years ago

Andy already tried to fix this problem here https://github.com/terminal42/contao-conditionalformfields/commit/714e7e86a34a3f40659d6b0597dce40ce6bf7ea7 but maybe the problem is still there in some way (i'm using Version 3.0.6).

frontendschlampe commented 2 years ago

@denniserdmann I think, the version with the fix is not published yet.

@aschempp do you have an idea, when you will publish the new version?

frontendschlampe commented 2 years ago

I ask again :-) @aschempp do you have an idea, when you will publish the new version?

Toflar commented 2 years ago

Just stumbled across this and tagged the latest commit as 3.0.7 - does that fix the issue?