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.

EE2 URL Variable Oddities

September 13, 2011 6:19am

Subscribe [3]
  • #1 / Sep 13, 2011 6:19am

    afrihost

    5 posts

    Since EE2 url variables have been problematic

    For example:
    http://www.afrihost.com/site/product/adsl_wifi_roaming/?src=homeslide&x=y WORKS

    Whereas:
    http://www.afrihost.com/site/product/adsl_wifi_roaming/?src=homeslide DOES NOT

    I’ve tried this in multiple scenarios and found that if you have one variable it gives you a page not found, but if you pass 2 or more variables it does work. I sorted this out a few months ago after a lot of searching through code and then modifying a code igniter file if I remember correctly - which then resolved the problem.

    Now with recently upgrading to 2.2.2 that file was obviously overwritten and the problem is back and quite honestly I don’t have time to go hunting for that line of code again and this problem shouldn’t exist in the first place either.

    Please advise on how to fix and include fix in future builds.

  • #2 / Sep 13, 2011 6:36pm

    Dan Decker

    7338 posts

    afrihost,

    Can you share any of the template code that these variables are used in?  Which leads me to ask, is there any reason you are not using more standard {segment_x} variables? Your URL would then look like:
    http://www.afrihost.com/site/product/adsl_wifi_roaming/homeslide/
    And in your template you would use {segment_4} to get “homeslide”.

    Cheers,

  • #3 / Sep 14, 2011 9:31am

    afrihost

    5 posts

    There are multiple reasons why this functionality is required and should work

    a) it’s standard - used by php, asp etc. - should work without reservation
    b) google analytics
    c) needed for use in php where the parsing stage is input not output
    d) it worked in EE1
    e) it works for 2 variables but not 1

  • #4 / Sep 14, 2011 1:28pm

    Mark Bowen

    12637 posts

    Hi afrihost,

    Let me ask about this internally to get an answer for you.

    It could well be that this kind of thing used to work in ExpressionEngine 1.x but maybe wasn’t ever actually coded to do that and just did happen to work and so that’s why now in 2.x it doesn’t.

    Thanks,

    Mark

  • #5 / Sep 15, 2011 11:16am

    Mark Bowen

    12637 posts

    Hi afrihost,

    Could you try changing :

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

    to

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

    in your system > expressionengine > config > config.php file and see if that fixes this up please.

    Thanks,

    Mark

  • #6 / Sep 28, 2011 9:15am

    afrihost

    5 posts

    Works

  • #7 / Sep 29, 2011 11:32am

    Mark Bowen

    12637 posts

    Hi afrihost,

    Excellent! Glad that got you sorted here.

    If anything else crops up then please don’t hesitate to post again as needed.

    Cheers,

    Mark

  • #8 / Sep 29, 2011 11:33am

    Mark Bowen

    12637 posts

    Oops sorry, closing for real this time 😉

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

ExpressionEngine News!

#eecms, #events, #releases