Support » Plugin: Qtranslate Slug » Language code not being added correctly by language switcher

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Pedro Carvalho

    (@pedroghandi)

    Hi elenavera, thanks for using QTS!

    the flags at the top are in a widget? they don’t seem to be working at all 🙁

    are you using qts widget right?

    Thread Starter elenavera

    (@elenavera)

    Yes, the flags are in a Widget (Language selector (QTS)).

    They are working but not as they should.

    The only slugs that I have translated by now are
    http://www.fisfas.com/llogar-casa-mallorca/
    http://www.fisfas.com/es/reserva-casa-mallorca/
    http://www.fisfas.com/en/book-villa-mallorca/
    http://www.fisfas.com/de/buchung-villa-mallorca/

    And the flags do change the slug correctly, but not the language code.

    Thank you for your help.

    Plugin Author Pedro Carvalho

    (@pedroghandi)

    there’s something really strange going on.

    I noticed you’re still using qtranslate. Do you mind changing to qtranslate-x? its an improvement and is currently active.

    Thread Starter elenavera

    (@elenavera)

    Do you know if I will loose the translations if I change to qtranslate-x?

    Thank you very much.

    Plugin Author Pedro Carvalho

    (@pedroghandi)

    no, qtx has a couple of options for converting/upgrading.

    nevertheless, please make a backup of your database before converting.

    Thread Starter elenavera

    (@elenavera)

    Hello,

    I have updated to qtranslate-x but the language switcher does not work either. If I disable qtranlate slug, the switcher works fine.

    If I enable debug in wp-config.com and without qtransalte slug I can see no error, but when it is enabled, I can see this:

    WordPress database error: [Table ‘evk_bonlloc.wq3rx40k7_termmeta’ doesn’t exist]
    SELECT term_id, meta_key, meta_value FROM wq3rx40k7_termmeta WHERE term_id IN (6) ORDER BY meta_id ASC

    WordPress database error: [Table ‘evk_bonlloc.wq3rx40k7_termmeta’ doesn’t exist]
    SELECT term_id, meta_key, meta_value FROM wq3rx40k7_termmeta WHERE term_id IN (3) ORDER BY meta_id ASC

    WordPress database error: [Table ‘evk_bonlloc.wq3rx40k7_termmeta’ doesn’t exist]
    SELECT term_id, meta_key, meta_value FROM wq3rx40k7_termmeta WHERE term_id IN (10) ORDER BY meta_id ASC

    Does this make any sense?

    Thanks,

    Elena

    Plugin Author Pedro Carvalho

    (@pedroghandi)

    Hi Elana, it does 🙂

    remove qts and install it again, it should create the tables it needs.

    Let me know how it went.

    Thread Starter elenavera

    (@elenavera)

    Hello,

    I deactivated and deleted qTranslate Slug and installed it again and I can see exactly the same errors in debug mode.

    Any other suggestions?

    Thank you very much for your help.

    Thread Starter elenavera

    (@elenavera)

    Hello, again. I have been deleting all “unnecessary” plugins and I think the DB errors do not exist anymore. Nevertheless, the problem persists. I have been testing different themes and I have noticed that the problem might be on the theme because the plugin does not work with them The Place Version: 1.9.4 By Hotel WP (the last version), the one I would like to use, but surprisingly it works fine with Twenty ThirteenVersion: 1.7

    I have tried using the code editting the theme header or footer
    <div> test <?php if (function_exists(‘qts_language_menu’) ) qts_language_menu(‘text’); ?></div>
    But it makes no difference.

    It looks like a problem with the theme. I will open a ticket with them to see if they can help.

    Meanwhile I have been testing different PHP environments and if I sues php7 I get this error. Does this make any sense?

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; QtranslateSlugWidget has a deprecated constructor in /wp-content/plugins/qtranslate-slug/includes/class-qtranslate-slug-widget.php on line 8

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; qTranslateXWidget has a deprecated constructor in /wp-content/plugins/qtranslate-x/qtranslate_widget.php on line 30

    Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/qtranslate-slug/includes/class-qtranslate-slug-widget.php:8) in /wp-content/plugins/qtranslate-x/qtranslate_core.php on line 384

    Never mind, if I use php5.6 the warnings do not appear, but the switcher does not work. I have tested adding the switcher using the code but it does not help.

    Thank you for your help.

    Plugin Author Pedro Carvalho

    (@pedroghandi)

    Hi Elena. thanks to you too, for trying out different solutions.

    Can you try to find if the theme tries to add_filter that might be relevant?

    Thread Starter elenavera

    (@elenavera)

    In funcionts.php I can see:

    // misc
    if (function_exists(‘qtrans_convertURL’)) {
    add_filter(‘home_url’, ‘qtrans_convertURL’);
    }

    I have removed that lines and it works fine now!!

    Thank you very much for your help.

    Plugin Author Pedro Carvalho

    (@pedroghandi)

    Glad you found it so quickly! 🙂

    enjoy!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Language code not being added correctly by language switcher’ is closed to new replies.