Forums Forums Search & Filter Pro WPML Permalinks don't work after filter results

Viewing 5 posts - 1 through 5 (of 5 total)
  • Ross Moderator
    #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
    #22702

    Hi 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 –

    Screen Shot

    Ross Moderator
    #22739

    Hey 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

    Anonymous
    #22761

    Thanks for answer. If you could send me the files to test, that would be great!

    Ross Moderator
    #22762
    This reply has been marked as private.
Viewing 5 posts - 1 through 5 (of 5 total)