• Resolved annaam

    (@annaam)


    Hi,

    Thanks for making such a great plugin. We love TNP!

    A minimal PHP warning, but a warning nonetheless; it seemingly appears that when bots crawl our website, they generate the following PHP warning in our debug log:

    PHP Warning: Undefined array key “email_id” in WEBSITE/files/wp-content/plugins/newsletter-archive/plugin.php on line 42

    From this access:

    GET /?na=archive&=37 HTTP/2.0″ 200 18 “WEBSITE/newsletter?email_id=37” “Mozilla/5.0 (Linux; Android 7.0;) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; PetalBot;+https://webmaster.petalsearch.com/site/petalbot)”

    When I go to the page myself, WEBSITE/?na=archive&=37, it displays white screen with the text: “Wronf email ID” (as expected by that line of code).

    Environment: PHP 8.3, WordPress 6.9, Newsletter 9.1.0, Newsletter – Archive 4.1.8

    I’m not sure why bots are indexing this link, or what the best course of action is. We get this error in our logs a few times a week. Any ideas?

    Best,

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Michael Travan

    (@michael-travan)

    Hello @annaam,

    many thanks for your feedback, we’re checking this with our developers, I’ll get back to you as soon as possible.

    Michael

    Plugin Support Michael Travan

    (@michael-travan)

    Hello @annaam,

    it looks like you’ve put the Newsletter Archive shortcode inside the main newsletter page. If so, try to move it from there to a dedicated page and see if the error goes away.

    Michael

    Plugin Support Michael Travan

    (@michael-travan)

    Also, please let us know your website url so we can check first-hand.

    Thread Starter annaam

    (@annaam)

    We do have the newsletter archive on the same page as the subscription form, but when I use it to sign up, that doesn’t produce any error. Regardless, we will change this as you’ve recommended.

    For security purposes I cannot share the url here.

    SETUP: we currently have a page, page A, that is public facing (within a main dropdown menu) that contains an html newsletter subscription form (seems like old code, but it works), and the newsletter archive shortcode. We also have another page, page B, that is not user facing, but is public, that only contains the [newsletter] shortcode. The user, after signup on page A, is redirected to page B and shown the “check your inbox” message. When they click the link in their inbox, they are directed to page B that confirms the subscription.

    So our goal now is to break up page A: newsletter subscription on one page, newsletter archive on another. Ideally, I’d just make page B the public facing subscription form, and have page A just be the archive shortcode, including both pages in our dropdown.

    In the settings of Newsletter it has us select the newsletter subscription page (we have it assigned to page B), which states: The page content must be only the shortcode [newsletter]. Do not choose the “front page” or “post list page”. This is why our page B only contains that shortcode.

    QUESTION: We do like to customize our subscription form a tiny bit, I believe that’s why the original developer did this the way they did, instead of “full name or first name” we just like first name, etc. Is that type of customization on this page OK, or do I need to make a page C for a customized subscription form?

    Thank you for the help!

    Plugin Support Michael Travan

    (@michael-travan)

    Hello,

    let us know first if by moving the newsletter archive shortcode, the php warning goes away.

    Michael

    Thread Starter annaam

    (@annaam)

    The website is mission critical and all user facing changes have to be approved, I unfortunately cannot just split up the pages quickly without thought about customization and approval from my director.

    This will take a few weeks to resolve, I will do my own testing regarding my question, and I will update as I know more.

    Best,

    Plugin Support Michael Travan

    (@michael-travan)

    Hello,

    if it’s a mission critical website, you should have a staging website where you can test these things out. Anyway, without a direct link to your website, I fear we won’t be able to provide further support.

    Michael

    Thread Starter annaam

    (@annaam)

    I do have many testing sites, I stated originally I cant reproduce the error / figure out how it’s being indexed, as it’s happening by bots crawling the website. Bots don’t crawl testing websites.

    Plugin Support Michael Travan

    (@michael-travan)

    Hello,

    okay, understood. Let us know your future findings. You can also contact me at michael at thenewsletterplugin.com, if you can share the url privately.

    Michael

    Thread Starter annaam

    (@annaam)

    We stopped receiving the error (without needing to split) after the code on line 42 was fixed to properly die when email_id is empty.

    We no longer receive the error in our log.

    Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.