• Resolved afnana

    (@afnana)


    I added chinese translation and change all strings from english to chinese,but when i clicked on chinese flag,it gives me database establishing error. Can someone help me out please? Above is thesite link on which i am working.
    Thank you in advance

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello tehre,

    The problem seems to be the server; not allowing the website to access the database through “trp-ajax”
    But the code below should be a temporary fix (It will switch to admin-ajax.php)

    Create an empty plugin like this: https://gist.github.com/sareiodata/76f701e01db6685829db
    Add the following code to the end of it:
    /*
    * Revert to WP admin ajax instead of custom ajax url
    */
    add_filter( ‘trp_custom_ajax_url’, ‘trpc_use_wp_admin_ajax’);
    function trpc_use_wp_admin_ajax() {
    return admin_url( ‘admin-ajax.php’ );
    }

    Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality.

    Best regards,
    Cristian

    Since more than 6 days have passed since my colleague answered this ticket, we will close it and if you encounter other problems or have a question regarding TranslatePress, please create another ticket with the problem in question.

    Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Database Error’ is closed to new replies.