Resolved

Reported for: WPML String Translation 3.0.8

Resolved in: 3.0.9

Topic Tags: Compatibility

Symptoms

If you switch the backend language to any other than the default language of your WPML install you will see crashes related to memory.

The issue is caused by the plugin Quform hooking on the WordPress hook “user_has_cap” and making gettext requests – which changes the language mid-request and thus causing a loop in WPML logic.

Workaround

The issue will be fixed in the next version of WPML String Translation

To fix this – and only if you know what you are doing and AFTRE having a full backup – go to wp-content/plugins/quform/library/Quform/Permissions.php and change the function

    public function getAllCapabilities()
    {
        return apply_filters('quform_capabilities', array(
            'quform_full_access' => __('Full Access', 'quform'),
            'quform_view_dashboard' => __('View Dashboard', 'quform'),
            'quform_list_forms' => __('List Forms', 'quform'),
            'quform_add_forms' => __('Add Forms', 'quform'),
            'quform_edit_forms' => __('Edit Forms', 'quform'),
            'quform_delete_forms' => __('Delete Forms', 'quform'),
            'quform_view_entries' => __('View Entries', 'quform'),
            'quform_edit_entries' => __('Edit Entries', 'quform'),
            'quform_delete_entries' => __('Delete Entries', 'quform'),
            'quform_resend_notifications' => __('Resend Notifications', 'quform'),
            'quform_view_tools' => __('View Tools Page', 'quform'),
            'quform_export_entries' => __('Export Entries', 'quform'),
            'quform_export_forms' => __('Export Forms', 'quform'),
            'quform_import_forms' => __('Import Forms', 'quform'),
            'quform_settings' => __('Edit Settings', 'quform'),
            'quform_help' => __('View Help Page', 'quform')
        ));
    }

to:

    public function getAllCapabilities()
    {
        return apply_filters('quform_capabilities', array(
            'quform_full_access' => ('Full Access'),
            'quform_view_dashboard' => ('View Dashboard'),
            'quform_list_forms' => ('List Forms'),
            'quform_add_forms' => ('Add Forms'),
            'quform_edit_forms' => ('Edit Forms'),
            'quform_delete_forms' => ('Delete Forms'),
            'quform_view_entries' => ('View Entries'),
            'quform_edit_entries' => ('Edit Entries'),
            'quform_delete_entries' => ('Delete Entries'),
            'quform_resend_notifications' => ('Resend Notifications'),
            'quform_view_tools' => ('View Tools Page'),
            'quform_export_entries' => ('Export Entries'),
            'quform_export_forms' => ('Export Forms'),
            'quform_import_forms' => ('Import Forms'),
            'quform_settings' => ('Edit Settings'),
            'quform_help' => ('View Help Page')
        ));
    }