WordPress.org

Ready to get started?Download WordPress

Forums

WordPress HTTPS (SSL)
[resolved] Edit the Host (31 posts)

  1. renderinnovations
    Member
    Posted 2 years ago #

    Hi! I accidently typed and saved the wrong host for ssl. This was a text input setting on the plugin. What file in the backend would I need to go to change this? When I login to wordpress it tries to take me to the domain name host that I input. I uninstalled the plugin to keep the site live.

    Thanks!

    Adam B

    http://wordpress.org/extend/plugins/wordpress-https/

  2. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    FAQ

    Edit: To clarify, I can't get into my admin panel after updating. How do I fix it?

  3. renderinnovations
    Member
    Posted 2 years ago #

    Okay thank yoU! I wasn't sure if that was the necessary step. Thank you for clarifying!

    Just out of random chance, have you ever heard of issues of wp-admin ajax not reading https? I use jigoshop ecommerce, and checkout won't work, it keeps loading. I did consol debug and theres a red line regarding wp-admin ajax. Ever by a chance heard of an issues of this sort?

    Thanks!

  4. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Give the development version a try and let me know if the issue persists.

  5. renderinnovations
    Member
    Posted 2 years ago #

    This looks interesting. You've added a lot more! I'll take a look now and figure it out!
    I'll let you know asap.

    Thanks for your support

  6. renderinnovations
    Member
    Posted 2 years ago #

    Also, not sure if there's any association, but I'm using cloudflare with their ssl. Not sure if you are familiar with it. (just an fyi)

  7. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Cool. I added a check for CloudFlare SSL in the development version.

  8. renderinnovations
    Member
    Posted 2 years ago #

    In the dev link you sent me? or are you still developing more?
    I don't see it in the dev you sent me which just installed... or I'm dumb which is very probable.

  9. renderinnovations
    Member
    Posted 2 years ago #

    Also, for the HTTPS wordpress plugin you built, is it to ensure that all links are to use https? Here's a screenshot of an issue i'm finding.

    I notice wpadmin-ajax is referring to http instead of https... I'm just shooting blindly, but any ideas?

    (not sure if this error may help with your development at all)

  10. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Well you're not going to see anything unless you dig in the code.

    If you have a problem, the plugin should fix it. Period. There are some things that can't be fixed. This may or may not be one of them. Errors like this can only be taken on a site-by-site basis. There are too many factors that can cause issues to say exactly what's going on without looking at it myself. I can look at if you'd like, I just need an admin account. My email is mike[at]mvied[dot]com.

  11. renderinnovations
    Member
    Posted 2 years ago #

    I think I see the error... it's just the need on having to find where the file is. My assumption is, a function is calling a http://domain.com/wp-admin/admin-ajax.php It's calling http not https.. thats a guess. Thanks for your help! I'll keep trying to search.

    The plugin you've got is awesome though! Thanks for developing it!

  12. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    I've already looked at the plugin and it is SSL aware, so I don't know if digging in their code is going to lead you anywhere.

    Edit: Nevermind, I see the issue. They're using str_replace on the result of admin_url, overriding anything my plugin would have done to secure the url.

    Jigoshop v1.2.3, jigoshop.php, Line 330

    (!is_ssl()) ? str_replace('https', 'http', admin_url('admin-ajax.php')) : admin_url('admin-ajax.php')

    Since you're using CloudFlare, WordPress' built-in is_ssl() method returns false. If you change that call to $wordpress_https->isSsl() it should fix it. Also, removing that str_replace call would fix it.

    A more permanent solution would be to add this to your wp-config.php to trick WordPress.

    if ( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') ) {
    	$_SERVER['HTTPS'] = 'on';
    }

    This is just a theory. Let me know.

  13. renderinnovations
    Member
    Posted 2 years ago #

    I've clicked :

    Force SSL Login

    Always use HTTPS when logging in.
    Force SSL Administration

    Always use HTTPS while in the admin panel.

    On the dashboard of your plugin, then the wp-admin/admin-ajax.php says 301 moved permanently. There has to be an association with ajax not reffering to https rather it's referring to http. Still on the search...

  14. renderinnovations
    Member
    Posted 2 years ago #

    Sorry, just saw your post

    Edit: Nevermind, I see the issue. They're using str_replace on the result of admin_url, overriding anything my plugin would have done to secure the url.

    Jigoshop v1.2.3, jigoshop.php, Line 330
    (!is_ssl()) ? str_replace('https', 'http', admin_url('admin-ajax.php')) : admin_url('admin-ajax.php')
    Since you're using CloudFlare, WordPress' built-in is_ssl() method returns false. If you change that call to $wordpress_https->isSsl() it should fix it. Also, removing that str_replace call would fix it.

    A more permanent solution would be to add this to your wp-config.php to trick WordPress.
    if ( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') ) {
    $_SERVER['HTTPS'] = 'on';
    }
    This is just a theory. Let me know.

    I'll take a look! Thanks so much for your help. Seriously helping the troubled feeling

  15. renderinnovations
    Member
    Posted 2 years ago #

    Getting close!

    Here is result on the checkout page. ( https://www.predatorproducts.com/shop) ... The error is on the checkout page when you're updating your shop items.
    How did you figure that problem out by the way?

    Warning: require_once(/home/predator/public_html/https://predatorproducts.com/wp-admin/includes/ajax-actions.php) [function.require-once]: failed to open stream: No such file or directory in /home/predator/public_html/wp-admin/admin-ajax.php on line 30

    Fatal error: require_once() [function.require]: Failed opening required '/home/predator/public_html/https://predatorproducts.com/wp-admin/includes/ajax-actions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/predator/public_html/wp-admin/admin-ajax.php on line 30

  16. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    You didn't tell me what you've changed and what has been fixed or not.

    Oh, to answer your question: experience. I've dealt with this before.

  17. renderinnovations
    Member
    Posted 2 years ago #

    Sorry, I changed the wp-config.php file. which resulted in the fatal error above.

    I'm now trying to changed
    $wordpress_https->isSsl()

  18. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Where did you put it?

  19. renderinnovations
    Member
    Posted 2 years ago #

    I the code you gave me in wp-config.php right above "that's all happy blogging"

  20. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Well... something else is causing that error.

  21. renderinnovations
    Member
    Posted 2 years ago #

    it's because currently I'm editing the line 330 in jigoshop

  22. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Just undo it and see if it works. If it doesn't, I can tell you what to do.

  23. renderinnovations
    Member
    Posted 2 years ago #

    I just undid everything, for some reason, saying there's something extra. Hmm

  24. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    From:

    'ajax_url' => (!is_ssl()) ? str_replace('https', 'http', admin_url('admin-ajax.php')) : admin_url('admin-ajax.php'),

    To:

    'ajax_url' => admin_url('admin-ajax.php'),
  25. renderinnovations
    Member
    Posted 2 years ago #

    okay that part is fixed haha wow, I'm not with it. I'm sorry

  26. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Any time you update that plugin, you'll have to re-do that fix. I would advise talking to the plugin author about changing it. The admin_url function has a second argument $scheme that they should be using. Ask them to update their code.

  27. renderinnovations
    Member
    Posted 2 years ago #

    Okay will do. However, the actual checkout creates

    Warning: require_once(/home/predator/public_html/https://predatorproducts.com/wp-admin/includes/ajax-actions.php) [function.require-once]: failed to open stream: No such file or directory in /home/predator/public_html/wp-admin/admin-ajax.php on line 30

    Fatal error: require_once() [function.require]: Failed opening required '/home/predator/public_html/https://predatorproducts.com/wp-admin/includes/ajax-actions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/predator/public_html/wp-admin/admin-ajax.php on line 30

    error. after simply adding the ajax_url. I"ll keep looking at it

  28. renderinnovations
    Member
    Posted 2 years ago #

    It's officially fixed!

    Thank you sooo much!

  29. renderinnovations
    Member
    Posted 2 years ago #

    Okay so here is a recap on the issue.

    You are right, they have a second argument and the code 'ajax_url' => (!is_ssl()) ? str_replace('https', 'http', admin_url('admin-ajax.php')) : admin_url('admin-ajax.php'),
    Is wrong.

    Then, for some reason in the actual admin-ajax folder it was trying to call a full domain name, instead it needed to have just have wp-admin/includes/ajax-actions.php'

    I"ll contact the developer and let them know of error.

    You have helped me soo much. Expect good words around!

  30. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    You can let them know that they can use my plugin for SSL detection. Very popular plugins such as Gravity Forms do this, so I'm going to support it for the foreseeable future.

    For example, from:

    'ajax_url' => (!is_ssl()) ? str_replace('https', 'http', admin_url('admin-ajax.php')) : admin_url('admin-ajax.php'),

    To:

    'ajax_url' => ( !( isset($wordpress_https) ? $wordpress_https->isSsl() : is_ssl() ) ? str_replace('https', 'http', admin_url('admin-ajax.php')) : admin_url('admin-ajax.php') ),

    Or even better:

    'ajax_url' => admin_url('admin-ajax.php', ( isset($wordpress_https) ? $wordpress_https->isSsl() : is_ssl() ) ? 'https' : 'http'),

    Or simply calling admin_url('admin-ajax.php'), but they may have a reason for doing it their way.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic