Qtranslate Slug
[resolved] Global $post variable being replaced by _get_page_link() (3 posts)

  1. jmlfernandez
    Posted 3 years ago #


    I just noticed some issues after using WooCommerce + qTranslate + qTranslate-slug + qTML: Breadcrumbs on WooCommerce product pages were completely off, also, some (theme-specific) individual page/post related settings were not applied as they should.

    Disabling qTranslate-slug proved to solve those, so after scouring the code for a while I discovered the exact reason: global $post variable is replaced every time _get_page_link() is called, line 1293 @qtranslate-slug.php.

    I just created a temp variable where I stored the "old" one at the start of the function, only to restore it again before returning. May not be an ideal solution, but hey, now it works as a charm.



  2. Carlos
    Plugin Author

    Posted 3 years ago #

    Well if you are using an ecommerce plugin like woocommerce i doesn't reccommend to use qtranslate and qtranslate-slug because they are not compatible. Try to use WPML...

  3. Carlos
    Plugin Author

    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Qtranslate Slug
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.