Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author jaromy

    (@jaromy)

    Hi gingerling – what is the URL or domain of your wordpress installation? I’m guessing this might be an issue with AJAX prohibiting cross domain calls. So for example, if your phplist resides on gingerling.co.uk, your wordpress site would also need to reside on gingerling.co.uk.

    hmmm… ok, I actually just looked at the links you sent. Prob should have done this first, haha. It looks like the phplist subscribe page for gingerling.co.uk has a few extra fields – make sure you strip it down to just the email address field. So, remove the email confirmation and also checkbox for text format.
    See if that works. if so, I’ll need to fix the error reporting to make it less cryptic/generalized.

    Thread Starter gingerling

    (@gingerling)

    I removed the stuff and that didn’t work so I tried messing with the URL and it worked when I added the www.

    Not sure why that is, there is no www in the subscribe page url…

    Plugin Author jaromy

    (@jaromy)

    thanks for this info gingerling. I’ll see if I can reproduce the issue here on my end. It does sound like a bug though.

    Thread Starter gingerling

    (@gingerling)

    Actually, I think even though it was flagging the error it was sending the confirm emails as I got five of them ??

    Plugin Author jaromy

    (@jaromy)

    I see what is happening…. and I was able to reproduce the problem here on my end.

    When I visit https://gingerling.co.uk/, the URL gets redirected to https://www.gingerling.co.uk/. So, there’s no access to just gingerling.co.uk (w/o the www). But, the phpList subscribe page (https://gingerling.co.uk/lists/?p=subscribe&id=5) does not get redirected, and it’s URL works with or without the ‘www’.

    AJAX needs the domains to be the same, so that’s why the plugin works when you add the www to the subscribe page URL in the widget settings.

    As a suggestion, you might want to consider altering the .htaccess file on your website to make the URLs more consistent. You’ll still be able to access it either via https://www.gingerling.co.uk or gingerling.co.uk, but the .htaccess will force a redirect and change the URL. You can choose whether you want to always redirect to the www prefix, or just the domain, sans www prefix.

    I actually had the same issue here on my server (www.jrussomusic.com), if I used the URL without the www. I changed the .htaccess file and now there’s no confusion. As a side-benefit, apparently this helps with SEO rankings because your site is not considered a duplicate.

    These are the lines I added to my .htaccess file:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
    RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [L,R=301]

    So, just replace ‘yourdomain.com’ with gingerling.co.uk.

    Cheers,
    J

    Plugin Author jaromy

    (@jaromy)

    Plugin Author jaromy

    (@jaromy)

    I tried the RewriteEngine code in my https://lists.csbug.org/ and it didn’t work. The error happens on the front page of https://www.csbug.org/ do you have any hints you can offer?

    Plugin Author jaromy

    (@jaromy)

    Hi terryleep777,

    The code you tried won’t work in this situation – it’s really only good for resolving www / non-www issues. In your case, you actually have a different subdomain specified (“lists”). So we need to do something a little different.

    Basically, the problem lies with AJAX not allowing cross-domain calls by default (something I alluded to earlier and thought was the original problem with gingerling’s website). So we need to enable these cross domain calls for you.

    Add this code to your .htaccess file on the lists.csbug.org subdomain (.htaccess should be in the root directory of this subdomain). There are the lines to add:

    # Allow Cross-Domain AJAX with AJAX withCredentials=false (cookies NOT sent)
    Header always set Access-Control-Allow-Origin "https://www.csbug.org"
    Header always set Access-Control-Allow-Methods "POST, GET"

    Cheers,
    J

    I have a similar issue where I am getting the “Unfortunately a network error occurred” message but everything is function properly. Any ideas on how I can correct this? It still sends the verification emails to the user and works just as it should.

    Plugin Author jaromy

    (@jaromy)

    hi boogz,

    Are the domains different for your website and phplist? if so, have you tried the .htaccess file as described above?

    I need a bit more information in order to help you. Please let me know as much as you can and be specific.

    I am having the same issue I think….

    The website is NOT public yet, but I have checked and both sections (wordpress & phplist suscription) are not using www.

    wp: https://apcweb.com.ar/
    phplist subscription: https://apcweb.com.ar/boletin/?p=subscribe

    It keeps showing “Unfortunately a network error occurred. Please try again. If this problem persists, please contact the webmaster.”

    Any idea?

    BTW, it is needed certain phplist version?
    That website is using an old 2.10.17

    Best regards!
    Luciano

    Plugin Author jaromy

    (@jaromy)

    Hi Luciano – yes, you need to have phpList version 3.0 or later installed. I’ve only tested it with 3.0.10 and 3.0.11, but I believe any 3.0 version will work.

    Cheers,
    J

    Hi. I am having an issue with cross-domains (PHPList and my WordPress site live in two different domains.)

    I tried the .htaccess modification provided above, however it did not resolve the issue of the network error when submitting the newsletter subscription on the WP home page (using the widget). (Note: I followed the instructions for making a “single-field” subscription sign-up page in PHPList.)

    I think that i am not modifying the correct .htaccess file on my domain…and I found several .htaccess files, in many sub-directories on my web server.

    Which .htaccess should I modify?

    Thanks!

    Here’s an update from my previous post.
    Even though I still get the network error (after modifying any/all .htaccess files on my target PHPList server), it works!
    I receive a confirmation email in my inbox from PHPList…go figure.

    So, the error message is misleading to the visitor. Not sure how to fix it, unless someone has a suggestion.

    In the mean time, is there a way to modify the error message? I could put in an extra sentence telling visitors to check their inbox anyway before trying again (or sending an email to the Webmaster, as currently indicated).
    Your thoughts?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘"Unfortunately a network error occurred" on self hosted phpList’ is closed to new replies.