ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Invalid GET Data on email newsletter link

August 15, 2012 3:17pm

Subscribe [2]
  • #1 / Aug 15, 2012 3:17pm

    DavidG

    46 posts

    We have a customer using MailChimp. They sent out a newsletter that had tracking query strings after the URL. EE is returning an error “Invalid GET Data” on this link: domain.com/blog/article/article_title?utm_source=Would+You+Like+to+Receive+Our+Blog+Posts+By+Email?&utm_campaign=c4d1f49b8f-RSS_EMAIL_CAMPAIGN&utm_medium=email

    I have tried a variety of fixes including .htaccess tweaks but so far no luck. I’ve recommended they turn this tracking off for future mailings. Here’s a copy of what the .htaccess file reads:

    <IfModule mod_rewrite.c>
    # Enable Rewrite Engine
    # ------------------------------
    RewriteEngine On
    RewriteBase /
    # Redirect index.php Requests
    # ------------------------------
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{THE_REQUEST} !/cms/.*
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L]
    
    # Standard ExpressionEngine Rewrite
    # ------------------------------
    RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    </IFModule>
    
    # Catch any Mail Chimp campaigns directed to the home page
    RewriteCond %{REQUEST_URI} ^/$
    RewriteCond %{QUERY_STRING} ^(utm_source=.*)
    RewriteRule ^(.*)$ /index.php?/ [L,PT]
    
    # Catch any Google campaigns directed to the home page
    RewriteCond %{REQUEST_URI} ^/$
    RewriteCond %{QUERY_STRING} ^(gclid=.*)
    RewriteRule ^(.*)$ /index.php?/ [L,PT] 
    
    
    Options +FollowSymLinks

    Using EE 2.5.2. Any help would be greatly appreciated!

  • #2 / Aug 16, 2012 6:45pm

    Dan Decker

    7338 posts

    Hi David,

    Indeed, the conflict is due to the way EE already uses a masked GET query string. For example:

    domain.com/blog/article/article_title?utm_source=...

    In that, behind the scenes, EE sees:

    domain.com/index.php?template-group=blog&template=article&url_title=article_title?utm_source=...

    So, the second “?” is throwing things off - since you can’t have to GET queries in one URL

    This bit in your .htaccess

    # Catch any Mail Chimp campaigns directed to the home page
    RewriteCond %{REQUEST_URI} ^/$
    RewriteCond %{QUERY_STRING} ^(utm_source=.*)
    RewriteRule ^(.*)$ /index.php?/ [L,PT]

    Have you tried including the leading “?” before utm_source ?

    ~

  • #3 / Aug 16, 2012 7:02pm

    DavidG

    46 posts

    Thanks for the help, Dan. I did try this but it resulted in internal server errors. I guess these types of URLs are too complex. I asked the client to disable the extra tracking for future mailings.

  • #4 / Aug 17, 2012 3:49pm

    Dan Decker

    7338 posts

    Hey David,

    I was working another ticket to day, and they had URLs very similar to this that were working OK.

    With that new info, I think it may be more to do with a server configuration than EE.

    I don’t know where to get the answer, but you might ask your hosting provider about it too.

    Is there anything else I can assist you with?

    ~

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases