Codestyling Localization
[resolved] jQuery errors (11 posts)

  1. Triple P
    Posted 4 years ago #


    We're having some trouble with the scripts loaded on the Codestyling Localization admin page, rendering the plugin useless. Some of the errors we get:

    - Object.extend is not a function (on page load)
    - jQuery is not defined (on page load)
    - $ is not defined (on pressing edit button)

    Our admin area is secured with SSL. In our dev environment (which does not use the SSL protocol) the plugin works fine. Any idea how we could fix this problem?


  2. urmachtra
    Posted 4 years ago #

    I hope this is not off topic, but I enabled SSL for WordPress admin last weekend, and now some links are non-responsive, like the Edit link for a translation file.

  3. @urmachtra, unless you are also talking about scripts being loaded and SSL interfering with that, yes that's off topic. Please create your own thread instead.


  4. spyros
    Posted 4 years ago #

    @Jan Dembrowski. I think it is not off topic. I am also using the ssl for administration and every other plugins are 100% correct except Codestyling Localization. When I switch off ssl, then it is OK.

    IMHO there are some code problems for relative/absolute http/https address.

    Anyway great plugin!

  5. It was off topic, people should post their own threads instead of interrupting someone else's, and the most critical part (which I do not take seriously at all) and the absolute thing that got my attention:

    There is no "R" in my last name. ;)

  6. spyros
    Posted 4 years ago #

    @Jan Dembowski.

    Sorry for changing your name. Anyway this SSL problem is bug and that is all I can say.

  7. ajsalas
    Posted 4 years ago #

    Any solutions on this? I have the same error, but on a fresh wp install I'm new on this, so I'm not sure if ssl is enabled or not.

  8. urmachtra
    Posted 4 years ago #

    I thought my post was not offtopic as I was experiencing the same problems when SSL is activated.

    I created another topic with the same errors as the topic starter mentions.

  9. Alexandre Simard
    Posted 3 years ago #

    urmachtra and Triple P are talking about the same problem.

    When you are connecting over HTTPS, the plugin strips away all the scripts queued for embedding. jQuery, Prototype, etc. are no longer there. Since the plugin itself relies heavily on these libraries to work, it breaks down pretty fast, i.e. the "Edit" translation link.

    I've narrowed it down to the new Scripting Guard feature, introduced in version 1.9.21. Earlier versions should work OK over HTTPS. If you want the latest version, you'll have to deactivate Scripting Guard. The simplest way I've found is to comment out lines 2680 to 2684 in the main PHP file:

    function csp_load_po_edit_admin_page(){
    /*	add_filter('print_scripts_array', 'csp_filter_print_scripts_array');
    	add_action('admin_enqueue_scripts', 'csp_start_protection', 0);
    	add_action('in_admin_footer', 'csp_start_protection', 0);
    	add_action('admin_head', 'csp_self_script_protection_head', 9999);
    	add_action('admin_print_footer_scripts', 'csp_self_script_protection_footer', 9999);
    	wp_enqueue_script( 'thickbox' );

    Hope this helps someone, and hope Heiko will find the time to fix this. Cheers!

  10. codestyling
    Plugin Author

    Posted 3 years ago #

    will be fixed in version 1.99.25, SSL was not fully supported.

  11. Alexandre Simard
    Posted 3 years ago #

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic