I’m using Kirby v2 and Uniform v2 on a multi language page and can’t get the uniform to work on all pages. I read the previous threads on this issue but can’t still get it to work.
I have a form and the logic in the site footer (snippet) and it works great on all the subpages (on the main language) but not on the home page. The form action looks like this:
action="<?php echo $page->url()?>/#main-footer"
I have tried to add and remove the “/” before #main-footer but still the same problem.
In Chrome Dev Tool I can see that Request Headers looks like this on the home page:
:authority: domain.com
:method: POST
:path: /
origin: https://domain.com
referer: https://domain.com/
On a subpage (/products for example) where the form works the Request Headers looks like this:
:authority: domain.com
:method: POST
:path: /products/
origin: https://domain.com
referer: https://domain.com/products
I’m guessing that the problem is that on the home page the origin ends without the trailing “/” but the referer do. I want my url:s to end without a trailing “/” so I have this inside my .htaccess:
Also. If I switch to the second language (url: https://domain.com/se/produkter) the form does not work on any pages. Request Headers looks like this then:
:authority: domain.com
:method: POST
origin: https://domain.com
referer: https://domain.com/se/produkter
This is starting to drive me crazy. I really hope some one can help me out here…
Yes it’s Uniform v2. It’s and old site and I don’t want to get stuck in an update at the moment… But if Uniform v3 will fix this issue, it might be worth it.
@felixbridell Could you open your browsers developer tools in the network tab, set it to “persist logs” (in Firefox, Chrome should have something like that, too) and then submit the form so that it fails? Then please show us a screenshot of the whole network log.
In my opinion, no. The versions can be separated very well with different branches and releases. Do you have many support requests from people who confuse the Uniform versions?
That’s too much noise in the log, sorry. Could you enable the filter for HTML responses only? Your first screenshot indicates that the server uses PHP 7.2. I don’t know if Kirby 2 or Uniform v2 even support that version. Maybe that’s the cause.
@mzur Kirby 2 definitely supports PHP 7.2, and I don’t think that’s the issue. At least I don’t have problems with PHP 7.2 and Kirby 2 and your plugin, not even on the home page.
I have Uniform running on a multilang site with the same form on the home page and sub pages. It works fine. Are you sure it not the .htaccess rules interfering, or some other server setting?