Multilingual form shown in wrong language

My issue is related to this post Multilanguage forms missing until cache is cleared but I prefer to open another one, because that discussion went far beyond my skills and I can’t tackle it.

I have this page: Contattaci | Servizi di traduzione e scrittura professionale | Qabiria
Somehow, sometimes the contact form appears in Spanish instead of Italian.

I don’t know if it depends on Grav core, LangSwitcher or Forms.

Any help to troubleshoot this would be appreciated.

Thanks in advance.

How does your template, where form is included, look like. How does the frontmatters of the page and form look like?

You can find a zip with template and pages here:

At a glance template and frontmatter looks fine (although I don’t think you need to pass page: page to form template). And I can’t reproduce the issue - form load for the language it supposed to :thinking:

To reproduce it, I did the following: open the home page (without language) in a browser whose first language is not Italian (I tried with Spanish), the Spanish home page shows up, then you go to Contacto, the correct contact page in Spanish shows up, but if you click on the language switcher (bottom right) and choose Italiano, the page switches to Italian, but the actual form is in Spanish. When I empty the cache from the back-end, then the issue goes away…

Clicked Contact in en and got es form. It feels like form itself is cached. What if you add cache_enable: false to each .md? I think it might do as a workaround, but maybe a proper GH issue would be in order here

1 Like

I confirm that cache_enable: false in each .md seems to solve the issue.
Thanks for your help.

I spoke too soon.

Disabling cache didn’t solve the problem. I keep seeing the form in a language different than the language page… I’ll open a ticket on Github page for the Form plugin. If someone has other ideas, I’m all ears. :slight_smile:

Yes, I guess an Issue on GH would be best, as it requires more debugging.