Support » Plugin: Polylang » [Plugin: Polylang] URL lang parameter make crash external plugin

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chouby

    (@chouby)

    For what I have seen from your site /reservations/ is a page. There is a limitation coming from WordPress: it is not possible to add a taxonomy parameter (as language is for Polylang) for pages. Adding the ?lang= parameter to pages will automatically directs you to 404 page. I cannot go around this.

    Of course if some other plugin uses the same “lang” parameter as Polylang, it is likely that it will conflict and you get unexpected results.

    What is this plugin ? Is it downloadable somewhere ?

    Thread Starter txeo

    (@txeo)

    Hi

    Thanks for your quick answer.

    The plugin is a Reservation System Plugin created for using with WP, and it’s called Planyo (http://wordpress.org/extend/plugins/planyo-online-reservation-system/). Of course you can download and probe it, but you have to registrate with them, and configure some apartments or houses before probing the functionality we want to see. So you are free if you want to download and probe it, but i think it’s better if we make all the probes over mine. That’s your election. I will provide you below all the neccesary links to understand the whole problem.

    And well, once said that, I can’t agree with u, and now i’ll explain why (this post will be larger than the first:) ).

    As you said, reservations is a PAGE, not a POST, that’s true. But what you say here

    “There is a limitation coming from WordPress: it is not possible to add a taxonomy parameter (as language is for Polylang) for pages.”

    now is working for wordpress. Let’s see:

    http://rentapartmentinbarcelona.es/reservations/?foo=bar

    As you can see, no errors. A more elaborated parameters passing (using this time the planyo plugin):

    As you can see here, you can pass parameters at the end of the url, and they work.

    See what’s happen if i include ‘lang’ parameter:

    A 404 page is displayed inside the site.

    The problem is that planyo also suppors multilanguage, and for managing that, it uses the ‘lang’ parameter:

    A typical url used by planyo has this syntax:

    http://rentapartmentinbarcelona.es/reservations/?feedback_url=http%3A%2F%2Frentapartmentinbarcelona.es%2Freservations%2F&lang=en&calendar=6717&prefill=true&resource_id=12658&start_date=24%20Feb%202012&end_date=25%20Feb%202012

    This url doesn’t work –> I recieve a 404 error page.

    If i remove ONLY lang parameter: (the second parameter in the previous url)

    http://rentapartmentinbarcelona.es/reservations/?feedback_url=http%3A%2F%2Frentapartmentinbarcelona.es%2Freservations%2F&calendar=6717&prefill=true&resource_id=12658&start_date=24%20Feb%202012&end_date=25%20Feb%202012

    the url make the page works.

    So, parameters seems to work, BUT not ‘lang’, concretely.

    I expect to be clear in my explanation, and clarify you about the problem.

    Cheers from Spain.

    Plugin Author Chouby

    (@chouby)

    http://rentapartmentinbarcelona.es/reservations/?foo=bar
    As you can see, no errors.

    Yes. Because WordPress does not know “foo” and thus does not interpret it (rewrite rules are done like this). But “lang” does mean something and code is executed by two plugins which conflict and WordPress is lost…

    I did not want to test the plugin but just looking at some lines of code which could help or not. Unfortunately both plugins hardcode the ‘lang’ parameter…

    Thread Starter txeo

    (@txeo)

    Hi Chouby.

    So, reading you, the solution seems quite simple: Where i had a page, now i need to have a post, and problem solved. 🙂

    I have probed it and works correctly.

    You can see it testing urls in my above post now, those one that didn’t work now do.

    Thanks for you support.

    And cheers from Spain.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Polylang] URL lang parameter make crash external plugin’ is closed to new replies.