Narendra Ojha
Narendra Ojha

Reputation: 683

qTranslate issue in WordPress 4.0

I have updated WordPress to latest version (4.0) this morning. After upgrading everything seems fine except qTranslate.

The editor does not show language switcher tabs and qtranslate throws following warning:

The qTranslate Editor has been disabled because it has not been tested with this version of WordPress. This step is a safety feature to provide the functionality of a secure WordPress. To reactivate click here (may cause data loss). To remove this message, please upgrade qTranslate to the appropriate version.

On activating plugin from the click here link above, language switcher tabs are visible but they do not work as expected. When text tab is clicked it show nothing.

I had resolved same issue in WordPress 3.9.2 with the help of this post but in new verson it doesn't seem to be working.

Upvotes: 1

Views: 5359

Answers (6)

Arsen Darbinyan
Arsen Darbinyan

Reputation: 1

Change access level to public for those functions:

public display_tablenav()

public get_table_classes()

In qtranslate-x\admin\qtx_configuration.php file.

You can see that in this version QTX_LanguageList extends from WP_List_Table class, and this ones functions are public:

class QTX_LanguageList extends WP_List_Table
{
    private $_clean_uri;
    private $_language_names;

    public function __construct($language_names,$clean_uri) {

        parent::__construct(array('screen' => 'language'));
        $this->_language_names = $language_names;
        $this->_clean_uri = $clean_uri;
    }

    public function get_columns() {
        return array(
            'code' => _x('Code', 'Two-letter Language Code meant.', 'qtranslate'),
            'flag' => __('Flag', 'qtranslate'),
            'name' => __('Name', 'qtranslate'),
            'action' => __('Action', 'qtranslate'),
            'edit' => __('Edit', 'qtranslate'),
            'stored' => __('Stored', 'qtranslate')
        );
    }


    protected function column_default( $item, $column_name ) { return $item[$column_name]; }
    protected function get_default_primary_column_name() { return 'name'; }
    protected function display_tablenav($which){}
    protected function get_table_classes() { return array( 'widefat', 'qtranxs-language-list' ); }
......
}

Upvotes: 0

Frank
Frank

Reputation: 11

It would seem that the free plugin has been killed.

But the payed version is still there

Upvotes: -1

Narendra
Narendra

Reputation: 11

Including all of the above comments, following post also helps me a lot to fix the issue.

https://gist.github.com/warenhaus/10990386

Upvotes: 1

YOLO
YOLO

Reputation: 1

I have just installed wordpress 4.0.1, and i had the same message. Just try this change in the following file : qtranslate/qtranslate.php, and it seems to work :

// qTranslate Editor will only activated for the given version of Wordpress. // Can be changed to use with other versions but might cause problems and/or data loss! define('QT_SUPPORTED_WP_VERSION', '3.8.1');

to

define('QT_SUPPORTED_WP_VERSION', '4.0.1');

Thank you, it helps a lot !

Upvotes: 0

maioman
maioman

Reputation: 18734

I've also updated qtranslate just changing the version in qtranslate.php , but on the WP support blog I found a thread where some people also had to change a line in qtranslate_core on line 455

return $before.strftime($format, $date).$after;

to

return strftime($format, $date).$after;

changing it didn't effect my qtrans-plugin, but keep it in mind as it maybe useful in the future.

Upvotes: 2

brasofilo
brasofilo

Reputation: 26065

First, backup your database, then edit the main plugin file qtranslate/qtranslate.php changing the supported version to '4.0':

// qTranslate Editor will only activated for the given version of Wordpress.
// Can be changed to use with other versions but might cause problems and/or data loss!
define('QT_SUPPORTED_WP_VERSION', '3.8.1');

If there are no conflicts or bugs, the plugin should work ok.

Upvotes: 2

Related Questions