Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Multilingual form shown in wrong language

form

Started by Marco Cevoli 5 years ago · 8 replies · 577 views
5 years ago

My issue is related to this post /forum/forms-blueprints/multilanguage-forms-missing-until-cache-is-cleared-t5400 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: https://qabiria.com/it/contattaci
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.

5 years ago

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

5 years ago

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 🤔

5 years ago

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...

5 years ago

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
5 years ago

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

5 years ago

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. 🙂

5 years ago

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

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 99 16 hours ago
General · by pamtbaau, 21 hours ago
1 63 21 hours ago
General · by Andy Miller, 1 day ago
0 48 1 day ago
General · by Marcel, 12 months ago
6 357 5 days ago
General · by Duc , 6 days ago
3 45 6 days ago