Forums › Forums › Search & Filter Pro › WPML Permalinks don't work after filter results
- This topic has 5 replies, 2 voices, and was last updated 10 years ago by
Ross.
-
Ross Moderator(Private) February 26, 2015 at 12:14 am #12430
Hi Kaspars
I think I see the problem
There is an ajax request which fetches the template – and once this has been retrieved it will get a url using something like
the_permalink
– but it seems that when this function is being called, it does not know which language it is in, so that the permalinks are for the default language – but referencing a foreign language post – which results in 404..How are you creating your translations for the search form? Do you see the flags on the Search & Filter page so that you can see/add translations? it seems that you may be creating many “english” language forms, but conditionally loading them on other pages – so the permalink you get back in your ajax request is always in english.
I’ve just sent you and update which has some WPML fixes – try this and let me know if the above information makes sense.
Thanks
Anonymous(Private) August 5, 2015 at 8:19 am #22702Hi Ross,
Sorry for late answer but I thought that this problem disappeared but now I see that it didn’t. I haven’t tested your code you sent me, should you please tell me which things to change or send a fix in this new version (Version 1.4.3)I am using this kind a setup –
Ross Moderator(Private) August 5, 2015 at 10:54 am #22739Hey Kaspars
Yeah it looks like you may be right – I think I understand the issue.
Essentially, to get your posts, a request is made to admin-ajax – and when in that environment maybe
get_permalink()
doesn’t take in to account the language.In S&F 2.0, I got rid of the admin-ajax stuff, and moved it all frontend – so I’m hoping the lang will be filtered properly.
I can send it to you test if you like? Its almost ready for release.
Thanks
-
AuthorPosts