Hi,
thanks for your question.
The problem here is that your server is set up to block requests to text files (with a .txt extension).
However, the DataTables JavaScript library tries to load the text file http://alan.binhoster.com/wordpress/wp-content/plugins/wp-table-reloaded/languages/datatables/lang-zh_CN.txt, which contains the translated strings for the features. You can see the error message, when trying to open that link.
You will need to contact your webhost to have them change this behavior in the server configuration.
Best wishes,
Tobias
thanks for your reply, though since it is a free service I am using, I doubt they will give any attention to my request.
thanks anyway, at least I know the problem root, thanks again.
Hi,
yeah, in that case, chances are indeed not too good 🙁
Best wishes,
Tobias
Since I am not good with program, I have a silly idea, don’t know if it is possible.
Can the program be modified in some way, to let the DataTables JavaScript library tries to load, not the text file, but a file like php or something? If I save the “languages/datatables/lang-zh_CN.txt” as a “lang-zh_CN.php”, can it be read then?
Thanks
Just some silly thought.
Hi,
yes, that’s actually a good idea, and it’s worth a try.
You can use one of the many plugin filter hooks to modify the URL that is loaded. Please try this:
– Make a copy of the “lang-zh_CN.txt” file and rename it to .php.
– Add the following code to your theme’s “functions.php”:
function wp_table_reloaded_change_language_file_url( $url ) {
return 'http://alan.binhoster.com/wordpress/wp-content/plugins/wp-table-reloaded/languages/datatables/lang-zh_CN.php';
}
add_filter( 'wp_table_reloaded_url_datatables_language_file', 'wp_table_reloaded_change_language_file_url' );
Regards,
Tobias
hello, I tried edit the controller-frontend.php, and change”.txt”into”.php”,works fine now, but surely it will be undone when the next update of this plugin is applied, so I will try your method as well, thanks for the attention.
Hi,
exactly, all modifications of plugin files will be reverted when the plugin is updated.
However, my method also requires some work when updating: You would have to recreate that copy of the lang-zh_CN.php file, as it also will be removed. So, an even better way might be to place that file in your theme folder, and then change the URL in my code accordingly. That way, you won’t have to do anything when the plugin is updated.
Best wishes,
Tobias