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.

GET parameter not working in URL

December 12, 2011 6:25pm

Subscribe [4]
  • #1 / Dec 12, 2011 6:25pm

    dsloan

    48 posts

    I am interfacing with SagePay, an online payment gateway, and have to specify a success and a failure callback URL, e.g. mydomain.com/index.php/pay/failure.

    However, when this URL is called via the gateway it appends some data as a GET parameter in the URL and this is resulting in the index page always being displayed - all segments and query string elements are ignored…

    http://www.mydomain.com/index.php/pay/failure?crypt=@A5A20A6F6F1CDF9A163ECA6E661DE6#

    The same thing is happening with Google AdWords, e.g. http://www.mydomain.com/index.php/home/services?gclid=abc

    How can I get around this?

    Thanks,
    Diarmid

  • #2 / Dec 13, 2011 9:47pm

    John Henry Donovan

    12339 posts

    Hi dsloan,

    What version and build of EE are you using?

    Are you using any add-ons?

    Open up your config.php file and change this

    $config['uri_protocol'] = 'AUTO';

    to this and see if that makes a difference

    $config['uri_protocol'] = 'PATH_INFO';
  • #3 / Dec 14, 2011 4:31am

    dsloan

    48 posts

    Hi,
    I’m using an older 2.0 build, and the setting is already at PATH_INFO. I’ve been loath to upgrade as I encountered big problems with this when I performed the first few upgrades between 2.0.x versions, breaking the site and add-ons, and corrupting data. The script isn’t that important anyway so I’ll leave it for now.
    Thanks though,
    Diarmid

  • #4 / Dec 19, 2011 3:26pm

    Kevin Smith

    4784 posts

    Is there anything else we can do to help, Diarmid?

  • #5 / Feb 08, 2012 7:20pm

    Richard Whitmer

    96 posts

    I have a client having this same issue with another service that returns the following appended to the url for the error page:

    [site_url]/email-sign-up-error?errorcode=4&errorcontrol=Email Address

    Changing the $config[‘uri_protocol’] from “AUTO” to “PATH_INFO” doesn’t fix it - still get a 404 Page

    Any help is much appreciated.

    ExpressionEngine v2.1.0
    Build:  20100805

  • #6 / Feb 12, 2012 11:07pm

    Dan Decker

    7338 posts

    Hi Panchesco,

    I’m sorry you are having trouble with GET variables.

    First thing I must suggest is an update to ExpressionEngine 2.4 There have been numerous improvements since 2.1 was the current release.

    I’m guessing that where you have “Email Address” in your example is a place holder for what would be a real address in production?

    Can you give some context about how your client receives this information into ExpressionEngine? Is it passed to a template? If so, can you share that template code here?

    Cheers,

  • #7 / Feb 13, 2012 11:53am

    Richard Whitmer

    96 posts

    Thanks for the follow-up, Dan. Agreed on the upgrade, it’s something I’ll have to run past the client.

    The query string appended to the URL I posted is exactly what’s sent back.

    At this point we’re not using any PHP in the template to message users based on the response code—we’re just trying to get it to work as a Page first. the template code follows:

    {embed="embeds/global_header"}
    <div id="subnav">
            
                <div id="menuBox">
    {embed="site/subnav-menus"}        
                </div>
                <!-- end menuBox -->
    
            </div>
            <!-- end subnav -->
    
    <div id="content">
    
    {exp:channel:entries channel="pages" dynamic="on" show_future_entries="yes" orderby="page_uri" sort="asc"}
     
     <h1>{title}</h1>
            
     {page_copy}
            {phx_copy}
            {tsn_copy}
            
            {if no_results}
            {redirect="site/404"}
            {/if}
    
    
    
    {/exp:channel:entries}
    
    </div>
    {embed="site/right-sidebar"}
    <!-- end sidebar -->
    {embed="embeds/global_footer"}

    Fairly straightfoward stuff. Entries for each of the sign-up pages (sign-up, sign-up successful, sign-up error) are created in our Pages channel and assigned to this template just as we do our other pages.

  • #8 / Feb 13, 2012 12:08pm

    Richard Whitmer

    96 posts

    Also, any handle on the time the site would need to be offline while we upgrade? I’ll need to give the client a good idea of what to expect for them to agree to anything that’s going to take the site offline for any amount of time. We’re using some add-ons: Freeform, Playa, Matrix, ImageSizer. Do you know if these are compatible/will need to updated also?

    Thanks

  • #9 / Feb 14, 2012 5:22pm

    Dan Decker

    7338 posts

    Hi Panchesco,

    We’re using some add-ons: Freeform, Playa, Matrix, ImageSizer. Do you know if these are compatible/will need to updated also?

    You will want to double-check with those developers, but I think most are 2.4 ready.

    As far as how long? That really does depend. We recommend you do a practice run on a dev or local environment in order to work out any kinks before hand. Then you’ll know what to expect on the live server.

    [site_url]/email-sign-up-error?errorcode=4&errorcontrol=Email Address

    So that is the exact information being returned? That brings up a couple of questions.
    What template-group/template are you receiving this data at?
    Are you using Strict URLs? in the Control Panel, Design-> Templates->Global Preferences: Enable Strict URLs
    What are expecting do do with the error when received?
    Give me some context for that, and I should be able to point you towards a solution.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases