• Resolved ben2358723823567

    (@ben2358723823567)


    Hi,

    First of all, qTranslate-X is a nice plugin. Thank you for your efforts in making this happen.

    I’m using qTranslate-X 3.4.6.8 and WordPress 4.5.3 with the RAW mode on (not the language buttons at the top of the editor).

    The plugin works as expected across the whole site EXCEPT for one very frustrating thing that I cannot seem to understand how to fix. I have one page with exactly the following content and it is left 100% untouched by qTranslate-X!…

    —————————-

    [row cols_nr=”2″]

    [col size=”8″]

    [:en]

    [heading title=”Events” subtitle=””]

    [:fr]

    [heading title=”événements” subtitle=””]

    [:]

    [eo_events]
    %start{j}% %start{M}% / %start{Y}%+%event_title%%event_excerpt{20}%
    [/eo_events]

    [/col]

    [col size=”4″]

    [heading title=”Instagram” subtitle=””]

    [instagram-feed]

    [/col]

    [/row]

    —————————-

    We’re soon launching the website (next week) but this small page fails to translate properly and is left totally untouched! Both qTranslate-X square brackets (and the content in it) show as-is on the page… Why?!

    Could you guys try and give me pointers to help me fix the issue please?

    I have tried the oldschool way with the angular brackets like <!–:en–> and also curly brackets {:en} then I read a bunch of support threads all of which didn’t seem related to this issue… all to no avail.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • No, different type of brackets will not help. That place needs integration: https://qtranslatexteam.wordpress.com/integration/ Is that your PHP code? Which plugin does it belong to? You need to find PHP code. that generates this output and look for filters that you could employ or something like this. The details depend on how it is done.

    Thread Starter ben2358723823567

    (@ben2358723823567)

    Hi John, thank you so much for replying. Just to make sure we’re on the same track, the square brackets work on every page, except if it contains [row] [col] shortcodes, it’s pretty weird. If I remove the [row] [col] then the qTranslate square brackets are processed as usual and everything is good… but the client wants the columns :-/

    BTW, we’re using this theme: https://pikarthouse.com/wp/arkfield/about-agency/

    Edit: By using find/replace, I have found a file containing what makes the rows and columns in that theme:

    ———————

    // allow the theme or other plugins to “hook” into this shortcode’s params
    $this->params = apply_filters(‘pixcodes_filter_params_for_’ . strtolower($this->name), $this->params);

    add_shortcode(‘col’, array( $this, ‘add_column_shortcode’) );
    add_shortcode(‘row’, array( $this, ‘add_row_shortcode’) );

    // Create second level shortcodes
    add_shortcode(‘col_inner’, array( $this, ‘add_column_shortcode’) );
    add_shortcode(‘row_inner’, array( $this, ‘add_row_shortcode’) );

    ———————

    Can we somehow wrap these function calls with your function to translate?

    Thread Starter ben2358723823567

    (@ben2358723823567)

    Well, I proceeded to mass find “function add_column_shortcode” which lead me to another function including another file called col.php in which there was this code:

    <?php echo $this->get_clean_content( $content ) ?>

    So what I did is replace it with this:

    <?php _e($this->get_clean_content( $content )) ?>

    AND GUESS WHAT? IT WORKS! ??

    Thank you so much for your pointers, what an adventure this was! Why are the WP themes developpers not always using _e() instead of echo? All of this would never have happened if they used _e()!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Some qTranslate-X square brackets are left unprocessed!’ is closed to new replies.