• I am running WordPress 3.8.1 on NGINX 1.4.4. Until recently, I was using Apache 2.4. Since changing, the SyntaxHighlighter Evolved (version 0.7.8.4) popup box that appears when clicking the ‘pre’ or ‘code’ TinyMCE button in the Visual Editor, is empty and unresponsive. The box appears, but the usual data entry fields and drop-down box to select which language to use are missing; it’s just a blank white screen. There are no relevant entries in either NGINX error or access logs. I am using the same browser, without any changed settings, as when running WordPress on Apache. In fact, everything is the same except for the HTTP daemon and SSL protocols.

    Surely I am not the only WordPress on NGINX user who has experienced this problem. How do I fix it?

    n.b. I am accessing WordPress admin over SSL, using a 3072-bit RSA certificate and 4096-bit Diffie-Hellman parameters. However, even when accessing wpadmin over SSL using a 2048-bit RSA cert and no DHE (as when I was using Apache), I experience the same problem. It’s worth noting, that when using SyntaxHighlighter’s ‘pre’ button on Apache, the padlock icon in Firefox’s address bar would change to a shield icon, and I would have to click this icon and select disabling protection as, by default, it would disable SyntaxHighlighter’s javascript box. After disabling the protection, the page would reload, I would then click the ‘pre’ button again and it would operate without a problem. No such behaviour with NGINX: just an empty, unresponsive popup box.

    https://www.ads-software.com/plugins/syntaxhighlighter/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I had this error but with the core paste from word tinymce plugin.

    If you are using one of the popular WordPress nginx configs that are available with a google search. I adjust the following line to include htm and it fixed the problem.

    location ~* \.(jpg|jpeg|gif|css|png|js|ico|html|htm)$ { access_log off; expires max; }

    Hope that works for you.

    Thread Starter ngxwpsyntax

    (@ngxwpsyntax)

    Thanks for replying, pro120. I couldn’t use any of the popular WordPress NGINX configurations because they didn’t work. For example, every time I add that location block you described[*], it breaks my site. Images won’t load, then javascript won’t load and it turns the site into a mess. Any idea why?

    Here is the configuration I came up with that works:

    server {
            server_name domain.tld www.domain.tld;
            add_header  Cache-Control "public";
            add_header  X-Frame-Options "DENY";
            limit_req   zone=gulag burst=200 nodelay;
            expires     max;
    
            listen 80;
            listen 443 ssl;
            include conf.d/ssl;
    
            root /usr/local/www/domain.tld;
            index index.html index.htm index.php;
    
            location = /favicon.ico { return 204; }
    
            location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ { deny all; }
    
            location ~ /\. {
                    deny all;
                    access_log off;
                    log_not_found off;
            }
    
            location / {
                    root /usr/local/www/wordpress;
                    try_files $uri $uri/ /index.php?$args;
    
                            location ~ \.php$ { include conf.d/php-fpm; }
            }
    
            location ~ \.php$ { include conf.d/php-fpm; }
    
            error_page   500 502 503 504  /50x.html;
            location = /50x.html { root   /usr/local/www/nginx-dist; }
    }

    And the included php-fpm:

    fastcgi_pass unix:/var/run/php-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    try_files  $uri = 404;
    fastcgi_split_path_info  ^(.+\.php)(.*)$;
    fastcgi_index  index.php;
    fastcgi_intercept_errors  on;
    fastcgi_ignore_client_abort  off;
    fastcgi_connect_timeout  60;
    fastcgi_send_timeout  180;
    fastcgi_read_timeout  180;
    fastcgi_buffer_size  128k;
    fastcgi_buffers  4 256k;
    fastcgi_busy_buffers_size  256k;
    fastcgi_temp_file_write_size  256k;
    fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
    fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
    include fastcgi_params;

    [*] the line that breaks my site:
    location ~* \.(jpg|jpeg|gif|css|png|js|ico|html|htm)$ { access_log off; expires max; }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘TinyMCE 'pre' button popup box not working properly’ is closed to new replies.