• Resolved officeninjas

    (@officeninjas)


    Hello,

    Thanks for a great plugin. It has been working flawlessly for many months until I saw this weird problem.

    https://officeninjas.com

    The problem: When submitting a comment on the live site, it would error out stating that it couldn’t find server ‘localhost’. I thought it was my work machine/network somehow, but confirmed the problem using a browser on iPhone over the cell network.

    The workaround solution: localhost server was nowhere in my live database, so didn’t know how else to debug. Luckily, I simply logged out of JetPack connection and logged back in and it was all back to normal.

    I don’t know when the live site got into this weird state and am concerned that perhaps something in my local dev environment is causing this problem. Is there a way to check that localhost server was not injected on the live site somewhere? The comment’s form action points to jetpack.wordpress.com/jetpack-comment/ and I don’t see any other hidden field mentioning localhost. Perhaps it happened when I copied the live db to my local machine resulting in my local env having the same blog id and blog token? If so, then what is the “proper” way to use Jetpack in my local env? My local url does not contain a period so I assume JETPACK_DEV_DEBUG is set by default.

    Any thoughts or insights are greatly appreciated.

    Thanks!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Is there a way to check that localhost server was not injected on the live site somewhere?

    I checked your Jetpack settings and they are now correct. It’s possible that until you disconnected and reconnected Jetpack to WordPress.com, your Jetpack site url settings were set to localhost. It sometimes happens when you start developing your site, connect Jetpack, and then change the site URL to the final production URL.

    Such problems can also happen if you use an anti-spam, security, or comment plugin that’s not compatible with Jetpack Comments. Do you use such plugins on your site?

    Thread Starter officeninjas

    (@officeninjas)

    your Jetpack site url settings were set to localhost

    I checked the database before dis/re-connecting Jetpack to WordPress.com on live site and couldn’t find anything set to localhost. Or are the url settings you refer to in a database at jetpack.wordpress.com? It would be nice to be able to have something to monitor to be proactive and fix it the moment this issue happens.

    It sometimes happens when you start developing your site, connect Jetpack, and then change the site URL to the final production URL.

    This may be true for initial development, but I’ve been up and running with no problems for a while. I haven’t changes site URL on the production site since inception. I may have dis/re-connected Jetpack to WordPress.com from my localhost, not 100% sure. Assuming url settings are in jetpack.wordpress.com and not on my server, I can see how that may have changed the url settings to localhost and inadvertently messed up the live site. If you think this is the case, other than telling my team to NEVER dis/re-connecting Jetpack to WordPress.com from their localhost, is there any other way to avoid this?

    use an anti-spam, security, or comment plugin that’s not compatible with Jetpack Comments

    Is there a list of plugins known not to be compatible with Jetpack Comments? I’m only using Akismet.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    checked the database before dis/re-connecting Jetpack to WordPress.com on live site and couldn’t find anything set to localhost. Or are the url settings you refer to in a database at jetpack.wordpress.com?

    Yes, these settings are stored on WordPress.com. Jetpack is built to update these settings as soon as you change them on your site, under Settings > General, but in some cases, depending on how one changes their site settings, Jetpack doesn’t catch the changes and keeps using the old site URL. We’re working on improving this system to avoid such issues.

    other than telling my team to NEVER dis/re-connecting Jetpack to WordPress.com from their localhost, is there any other way to avoid this?

    I’d suggest using Jetpack’s Development mode when working locally, to avoid all possible conflicts with the production site. As you mentioned earlier, if your local development URL doesn’t include a period, it’s automatically set for you.

    Is there a list of plugins known not to be compatible with Jetpack Comments? I’m only using Akismet.

    You can find a list here, but Akismet is compatible so that’s not what’s causing the problem here.

    Hopefully that won’t happen again now that your Jetpack site settings are correct. If you experience issues, again, let me know!

    Thread Starter officeninjas

    (@officeninjas)

    Thanks for explaining, Jeremy. You’ve been a tremendous help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Comments on live site try to get sent to localhost server’ is closed to new replies.