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.

404 strange behaviour

September 15, 2010 11:39am

Subscribe [5]
  • #1 / Sep 15, 2010 11:39am

    optima

    121 posts

    I’m seeing some unusual 404 behaviour that I have not seen before…

    I have Strict URLs enabled and yet when I input gibberish into segment 1 of mu URL Firefox 3.6.9 for Mac does not show my 404 template and instead Firefox’s native error message is displayed unless I am logged in as Super Admin with template debugging active and only then is my 404 template displayed. However, in Safari I see my 404 template whether logged in as Super Admin or not.

    I have built many many sites with EE and not experienced this before.

    EE Version: 1.6.9
    Build: 20100415

  • #2 / Sep 15, 2010 12:18pm

    actually..  i’m seeing similar behavior and i can’t figure it out..  with gibberish or a misspelled template group name in segment_1, i’m getting a broken page (actually, it’s displaying a template that it shouldn’t be displaying, with no content, etc.  so, the template displays broken).

    something similar with segment_2..

    now, i have a template group called “services” and a template in services called “service”.

    if i use /services/service (segment 1 and 2), it renders correctly..  as expected.

    but if use /service/service (segment 1 and 2), i get a broken page, not the 404 page i’ve specified.  there is no template group named “service”.  could the system be “getting confused” because there is a template named “service”?

    if i use something like /servicdfsdfses/service (segment 1 and 2), i also get a broken page.

    ee version: 1.6.9
    build: 20100430

  • #3 / Sep 15, 2010 6:04pm

    optima

    121 posts

    It doesn’t sound exactly the same, I’m seeing browser native 404 messages in some browsers (Firefox, Chrome, etc) but in others (Safari for example) I’m seeing my 404 template.

    However, if I log in as Super Admin in the browsers where I am seeing the browser native 404 messages and then enable Template Debugging I then see my desired 404 template instead of the browser native message.

  • #4 / Sep 16, 2010 2:41am

    John Henry Donovan

    12339 posts

    optima,

    Can you share example links of where this is happening please?
    Are you using any extensions or other add-ons?
    Are you using a htaccess?

  • #5 / Sep 16, 2010 8:06am

    optima

    121 posts

    John,

    I’ll PM you links

  • #6 / Sep 16, 2010 10:26am

    John Henry Donovan

    12339 posts

    optima,

    Can you share what’s in your htaccess or in fact disable it to test the 404’s?
    Can you also tell us what you have done so far regarding your multi-language set-up?

  • #7 / Sep 16, 2010 10:44am

    optima

    121 posts

    I have disabled the htaccess file and still I am seeing the same behaviour.

    Re. multi-language I am using this method in the wiki http://expressionengine.com/wiki/Multi_language_site_alternative/

    So the default language is French, therefore in path.php in my site root I have this:

    $system_path = "./ee_system/";
    $template_group = "";
    $template = "";
    $site_url = "";
    $site_index = "";
    $site_404 = "";
    $global_vars = array(
        "country_code" => "fr",
        "language" => "french",
        "site_root" => "http://www.mydomainname.ch/",
        "lang_home" => "Accueil",
        "lang_donate" => "Participez",
        "lang_take_a_tour" => "Visite guidée",
        "lang_the_arts" => "Les Arts",
        "lang_thanking_you" => "Merci",
        "lang_news_events" => "Actualités",
        "lang_scrapbook" => "Album",
        "lang_contact" => "Contact"
    ); // This array must be associative

    URLs for the defaults langauge are similar to:

    http://www.mydomainname.ch/the_arts/

    I then have a folder called ‘en’ in the site root for my English language version. In this folder is a duplicate of the root index.php file, a path.php file containing:

    $system_path = "../ee_system/";
    $template_group = "";
    $template = "";
    $site_url = "http://www.mydomainname.ch/en/";
    $site_index = "";
    $site_404 = "";
    $global_vars = array(
        "country_code" => "en",
        "language" => "english",
        "site_root" => "http://www.mydomainname.ch/",
        "lang_home" => "Home",
        "lang_donate" => "Donate",
        "lang_take_a_tour" => "Take a Tour",
        "lang_the_arts" => "The Arts",
        "lang_thanking_you" => "Thanking You",
        "lang_news_events" => "News & Events",
        "lang_scrapbook" => "Scrapbook",
        "lang_contact" => "Contact"
    );

    and a htaccess file with the following in

    # rewrite rules
    RewriteEngine On
    
    # ditch index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /en/index.php/$1 [L]

    URLs for the english langauge version are similar to:

    http://www.mydomainname.ch/en/the_arts/

    I seeing this behaviour whether I have a language code segment in my URL or not so is this really the problem.

  • #8 / Sep 16, 2010 11:04am

    hi john,

    my site is very straight-forward..  no custom languages, htaccess file just removes index.php, very few (basic) extensions..

    so, i tried removing my .htaccess file with no luck.

    and as far as extensions..  super simple:
    md character count
    publish page improvements
    fieldframe

    this site has no customizations in the control panel..

    please help!

  • #9 / Sep 16, 2010 4:00pm

    optima

    121 posts

    Any more thoughts John? Think we might have two different threads here.

  • #10 / Sep 17, 2010 2:33am

    John Henry Donovan

    12339 posts

    optima,

    What happens if you add values for your $site_404 = “”; in your path.php file?

    Robb,

    Can you confirm you have enabled strict URLs and have chosen a 404 page. If you visit this page in your browser does it display?

    When you say ‘broken page’ what exactly do you mean? Have you got a link to your site?

    For the time being leave htaccess disabled and put back index.php into your Name of your site’s index page in General Configuration

  • #11 / Sep 17, 2010 4:47am

    optima

    121 posts

    John,

    No change if I add values for $site_404 unfortunately. The weird thing for me is that it works with Template Debugging enabled when logged in as Super Admin!?

  • #12 / Sep 17, 2010 5:46am

    optima

    121 posts

    Fixed it!

    The way 404s work in EE baffle me sometimes…

    Previously my 404 template was empty apart from the words “Page not found” for testing purposes only, but as soon as I made my 404 template into a fully fledged page with header/footer includes etc it all started working. If I clear the template out again to something extremely basic it stops working.

  • #13 / Sep 17, 2010 10:34am

    Ingmar

    29245 posts

    Very glad to see you’re up and running. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases