Title: Can&#039;t use with HTTPS ?
Last modified: August 22, 2016

---

# Can't use with HTTPS ?

 *  Resolved [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/)
 * Sorry for my bad English because i’m from VietNam !
    I use this plugin in WordPress
   4.0 and SSL secure enabled (HTTPS). When i use this plugin to submit comment ,
   its running normal , but when post comment , it show this error (Unknown error
   occured “Something went wrong, your comment has not been posted. ” ) but the 
   comment is posted to the dashboard comment moderation normaly . I mean this comment
   posted complete but the plugin show error ( instead of done alert ) . Can you
   explain me how to fix this problem ? I think it related to HTTPS issue ?
 * [https://wordpress.org/plugins/wp-ajaxify-comments/](https://wordpress.org/plugins/wp-ajaxify-comments/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/cant-use-with-https/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cant-use-with-https/page/2/?output_format=md)

 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5360876)
 * Could you please send me a link where I can reproduce the issue?
 *  Thread Starter [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5360980)
 * Sorry for late reply . This is my example link to this problem ? [http://goo.gl/Gs9Hou](http://goo.gl/Gs9Hou)?
   Thank you !
 *  Thread Starter [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5360997)
 * Wow . I think this problem is related to Jquery , when use https the jquery don’t
   work perfectly . I have change the Jquery code of another script and plugin to
   the site work perfect , but I can’t fix this problem with WP-Ajaxify-Comments
   plugin . Your plugin is awesome and i like it so much , i don’t want to use another
   plugin . I hope this problem can fix !
    I change a lot of code in my site , example
   is : window.load function , $(document).ready(function() , jQuery(document).ready(
   function() ,
 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361014)
 * My plugin already use jQuery instead of $, so this should not be a problem.
 * Unfortunately, I do not see what exactly is not working on your page. Could you
   please provide me a detailed step-by-step instruction how to reproduce your problem.
 *  Thread Starter [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361024)
 * Dear !
    Your plugin and Jquery seems work fine , seen I installed WordPress HTTPS
   plugin and setup HTTPS on my page , the plugin does not work properly – it have
   only one error is when complete all the fields and click post comment , it show
   error “Something went wrong, your comment has not been posted. ” , but comments
   are still being sent to the dashboard as usual , i don’t know what error , it’s
   doesn’t show new comment posted AJAX too , it’s only show Unknown error occured.
   I don’t know what to do now 🙁 When I logged in and click post comment , my browser(
   Chrome) notice that the HTTPS is not secure , this mean when sending comment 
   to server and the server respond is not secure , I press Ctrl+Shift+J in Google
   Chrome to find what is it , it show : Failed to load resource: the server responded
   with a status of 500 (Internal Server Error) [https://www.mywebsite.com/wp-comments-post.php](https://www.mywebsite.com/wp-comments-post.php)
   The page at ‘[https://www.mywebsite/v/examplepost&#8217](https://www.mywebsite/v/examplepost&#8217);
   was loaded over HTTPS, but displayed insecure content from ‘[http://www.mywebsite/v/examplepost/comment-page-11#comment-4424&#8217](http://www.mywebsite/v/examplepost/comment-page-11#comment-4424&#8217);:
   this content should also be loaded over HTTPS. ——————– XMLHttpRequest cannot 
   load [http://www.mywebsite.com/v/example/comment-page-11#comment-4424](http://www.mywebsite.com/v/example/comment-page-11#comment-4424).
   No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
   Origin ‘[https://www.mywebsite.com&#8217](https://www.mywebsite.com&#8217); is
   therefore not allowed access. — Now i think this problem related to HTTPS , when
   click post comment , the plugin send data and respond HTTP (instead of HTTPS),
   and the plugin show error . I think the problem is instead of respond HTTP , 
   the plugin should respond as HTTPS . Sorry for my bad English , and hope you 
   will help me to fix this ! Thank you so much !
 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361081)
 * Is the plugin still activated and enabled on your page? Does the “Unknown error
   occured” message also occurs when you post comments after you disabled my plugin?
 *  Thread Starter [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361086)
 * When i disabled your plugin and use the default comment wordpress method , it’s
   nothing happen , the comment posted normaly and everything still work fine . 
   But when activated your plugin and try to post comment , the error “Unknown error
   occured” is still display .
    I have a thought on this issue is realted to $siteurl
   and $home define(‘WP_HOME’,’[http://example.com&#8217](http://example.com&#8217););
   define(‘WP_SITEURL’,’[http://example.com&#8217](http://example.com&#8217);); 
   My site front end is running with HTTPS but in my WordPress core option , my 
   WordPress site URL and home URL is still using HTTP , I think this has to affect
   operations of the plugin , when activated the plugin and post comment , I think
   the plugin is still use get_permalink() of the post is HTTP or get home_url()
   is HTTP as WordPress core option , so it break when using with HTTPS . – Do you
   have any idea to solve this problem ? I try to change the home_url() and site_url()
   to HTTPS and find the error but i can’t , because I’m using HTTPS on browser (
   not on my web server ) . – Or we can change the function on plugin to get the
   permalink or home_url() of the post is HTTPS instead of HTTP ?
 *  Thread Starter [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361091)
 *     ```
       function wpac_get_page_url()
       {
       	$ssl = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true:false;
       	$sp = strtolower($_SERVER['SERVER_PROTOCOL']);
       	$protocol = substr($sp, 0, strpos($sp, '/')) . (($ssl) ? 's' : '');
       	$port = $_SERVER['SERVER_PORT'];
       	$port = ((!$ssl && $port=='80') || ($ssl && $port=='443')) ? '' : ':'.$port;
       	$host = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
       	return $protocol.'://'.$host.$port.$_SERVER['REQUEST_URI'];
       }
       ```
   
 * In this function , can we change it to only use HTTPS ?
 *  Thread Starter [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361096)
 * Hello !
    It seems I’ve found the cause of the error . When i use HTTP instead
   of HTTPS to post comment , your plugin work fine and didn’t have any errors .
   But when i using HTTPS to post comment , the plugin break . That’s is the problem!
   So , can you have a idea to fix this problem when i use HTTPS on my site ? Can
   we fix a litte code of your plugin to work with HTTPS ( although my WordPress
   core option URL is HTTP ) ? Thank you so much for reply and help me !
 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361102)
 * Hi,
    what do you mean by “because I’m using HTTPS on browser ( not on my web 
   server )”? Do you use any kind of HTTPS offloading, i.e. do you have a proxy 
   server or firewall that handles the HTTPS traffic and forward all request as 
   HTTP requests to the web server? In other words: If you do not configure WordPress
   to use HTTPS, how does the system renders the HTML code for you comment form,
   resp. how is the “https” added: <form id=”commentform” class=”comment-form” method
   =”post” action=”[https://www.nguyenanhmedia.com/wp-comments-post.php”&gt](https://www.nguyenanhmedia.com/wp-comments-post.php”&gt);
 * If you really use a HTTPS offloading configuration, that could cause the problem.
   Please take a look at my questions above and I will try to find a solution four
   you…
 * Thanks in advance,
    Jan
 *  Thread Starter [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361105)
 * Hello !
    Yes , i have a proxy server or firewall that handles the HTTPS traffic
   and forward all request as HTTP requests to the web server is CloudFlare . And
   now i’m disabled my SSL on the post page , your plugin work fine and perfect !
   But when i actived my SSL on the post page , the plugin break . Do you have to
   try change the URL HTTP & HTTPS ? , when use HTTPS : <form action=”[https://www.nguyenanhmedia.com/wp-comments-post.php&#8221](https://www.nguyenanhmedia.com/wp-comments-post.php&#8221);
   method=”post” id=”commentform” class=”comment-form”> and when use HTTP <form 
   action=”[http://www.nguyenanhmedia.com/wp-comments-post.php&#8221](http://www.nguyenanhmedia.com/wp-comments-post.php&#8221);
   method=”post” id=”commentform” class=”comment-form”> You say right , the proxy
   server that handles the HTTPS traffic and forward all request as HTTP requests
   to the web server , that’s cause error ! I can’t find the solution to fix this!
   Hope you help me ! Best regards !
 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361130)
 * Please try out the new developer version 0.26.0 (from here [https://downloads.wordpress.org/plugin/wp-ajaxify-comments.zip](https://downloads.wordpress.org/plugin/wp-ajaxify-comments.zip))
   and set the option “Base URL” (in the experts option section in the plugin settings)
   to the FQDN, your page is accessed on.
 * Hope this help…
 *  Thread Starter [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361131)
 * Hello Jan !
    I want to tell you the good news is i have installed the newest 
   version of your plugin and everything work perfect like a charm ! Thank you so
   much for your development of this plugin . All the request in HTTP or HTTPS is
   work fine . So , i have a little more question about this plugin is , when post
   comment , the title of the web page render something like : Title : SWEET EMOTIONS–
   NGỌT NGÀO TÌNH QUÊ is render to Title : SWEET EMOTIONS – NGỌT NGÀO TÌNH QUÊ It’s
   change the “-” symbol to &#8211 Can you have a little time fo fix this bug ? 
   Thank you for everything ! Best regard .
 *  [janjonas](https://wordpress.org/support/users/janjonas/)
 * (@janjonas)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361145)
 * Thanks for the feedback.
 * I’ve updated the developer version 0.26.0. The title bug should be fixed.
    Please
   download the updated version from here [https://downloads.wordpress.org/plugin/wp-ajaxify-comments.zip](https://downloads.wordpress.org/plugin/wp-ajaxify-comments.zip).
 * Hope this helps…
 *  Thread Starter [Na Nguyen](https://wordpress.org/support/users/naenter/)
 * (@naenter)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/#post-5361150)
 * Hello .
    Thank you again, all the bugs have been resolved ! Thank you so much
   for your work and developer for this plugin . Hope you create more awesome plugin!
   Best regards !

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/cant-use-with-https/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/cant-use-with-https/page/2/?output_format=md)

The topic ‘Can't use with HTTPS ?’ is closed to new replies.

 * ![](https://ps.w.org/wp-ajaxify-comments/assets/icon-256x256.png?rev=2962290)
 * [Ajaxify Comments - Ajax and Lazy Loading Comments](https://wordpress.org/plugins/wp-ajaxify-comments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-ajaxify-comments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-ajaxify-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-ajaxify-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-ajaxify-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-ajaxify-comments/reviews/)

 * 16 replies
 * 2 participants
 * Last reply from: [janjonas](https://wordpress.org/support/users/janjonas/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/cant-use-with-https/page/2/#post-5361151)
 * Status: resolved