Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30
  1. #11
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: email body text not included in email

    Got it! If the email address to which the 404 emails are to be sent was used as a test-customer account email and that customer account uses HTML email settings, the email described by torvista will be sent. I've submitted v1.2.1 to the plugins area to correct the problem and describe how the HTML/TEXT emails will be sent.

  2. #12
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: email body text not included in email

    Got it!
    Well done! Excellent service!
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  3. #13
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: email body text not included in email

    Thank you for your kind words! Here's the entire updated "update" function in the class module:
    Code:
      function update(&$class, $eventID, $paramsArray = array()) {
        // BOF Send email to admin for 404 errors
        $email_text = sprintf(EMAIL_PAGE_NOT_FOUND_CONTENT, $_SESSION['customers_host_address'], $_SESSION['customers_ip_address'], $_ENV['REQUEST_URI'])."\n\n";
        $email_subject = EMAIL_PAGE_NOT_FOUND_SUBJECT;
        $module = (SEND_404_ERRORS_EMAIL_ARCHIVE != '0') ? 'default' : 'no_archive';
        $html_msg['EMAIL_SUBJECT'] = EMAIL_PAGE_NOT_FOUND_SUBJECT;
        $html_msg['EMAIL_MESSAGE_HTML'] .= str_replace('\n','',$email_text);
        zen_mail('', SEND_404_ERRORS_EMAILS_TO, $email_subject, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, $module);
        // EOF Send email to admin for 404 errors
      }

  4. #14
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default empty query string

    Thanks for that.

    There is now content in the message body:
    the host ip and user ip always show up but the query never.

    I have tried different emails, text/html, local-remote hosting, switched off the CEON URI mapping..but the email never shows the page requested.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  5. #15
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: empty query string

    torvista, do you happen to have the SuperGlobals plugin installed? I'm wondering what the information in your store's $_ENV and $_SERVER are for the request-related information.

    I'm successfully using the previous version of this plugin on a 1.3.9h store with Ceon URI mapping, so that's not it.

    Does it make a difference if you change
    Code:
        $email_text = sprintf(EMAIL_PAGE_NOT_FOUND_CONTENT, $_SESSION['customers_host_address'], $_SESSION['customers_ip_address'], $_ENV['REQUEST_URI'])."\n\n";
    to
    Code:
        $email_text = sprintf(EMAIL_PAGE_NOT_FOUND_CONTENT, $_SESSION['customers_host_address'], $_SESSION['customers_ip_address'], $_SERVER['REQUEST_URI'])."\n\n";

  6. #16
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: empty query string

    Yes I have Superglobals installed and I have yet to see _ENV even appear in the globals listing.
    Using _SERVER as you suggested fixed the problem.

    So for curiosity, what is and when should I see _ENV set?

    Thanks
    Steve
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  7. #17
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: empty query string

    My _ENV (both XAMMP localhost and 1and1 hosting) show _ENV as pretty much a copy of _SERVER. I'll get that update into the queue.

  8. #18
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: empty query string

    v1.2.2 is now available in the Plugins area; this corrects the issues that torvista identified.

  9. #19
    Join Date
    Jun 2012
    Posts
    33
    Plugin Contributions
    1

    Default Re: empty query string

    A user at host address [xxx.xxx.76.40] with IP address [xxx.xxx.76.40]
    generated a 404 using the query string
    [/index.php?main_page=page_not_found].


    Getting this message. Cant we get the actual url that led to this page_not_found page.

    like if this user type www.mydomain.com/secure and there is no such address on my website , we should get message:

    A user at host address [xxx.xxx.76.40] with IP address [xxx.xxx.76.40]
    generated a 404 using the query string
    [/secure].

    Thanks

  10. #20
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: empty query string

    relish, there are two possibilities:

    1. Did you update your store's root .htaccess file to contain
    Code:
    ErrorDocument 404 /index.php?main_page=page_not_found
    2. If you did, then it's possible that the /secure access is generating a 403 (permission error) rather than a 404 (not found) error. You can force the plugin to send emails in this case, too, by updating your .htaccess file to contain the following as well
    Code:
    ErrorDocument 403 /index.php?main_page=page_not_found

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v151 Site Map/Page Not Found: Combined [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 4 Jan 2016, 02:19 PM
  2. Replies: 2
    Last Post: 24 Jun 2010, 11:20 PM
  3. 404 Not Found Page Not Found not working!
    By NamSingh in forum Basic Configuration
    Replies: 0
    Last Post: 15 Oct 2006, 10:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR