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.

Default Template Group - only index.php works

June 14, 2012 11:52am

Subscribe [3]
  • #1 / Jun 14, 2012 11:52am

    secondbridge

    6 posts

    Hi all.

    In my site I’ve set “Site” as the default template group and created index.php. This works just fine as the site homepage. However any other files in that template group - test.php, blog.rss, etc. - don’t work as expected. They only work if visiting domain.com/site/blog.rss. To wit:

    Fails:
    http://lesliehalleck.secondbridge.com/test

    Works:
    http://lesliehalleck.secondbridge.com/site/test

    Both Work:
    http://lesliehalleck.secondbridge.com/site/index
    http://lesliehalleck.secondbridge.com/

    All other template groups behave normally.

    A couple of notes:
    - I recently moved the site to a different directory on my host. I believe I updated all the paths correctly, but I’m wondering if I missed something
    - I also recently switched the default group from “Home” to “Site”.

    Am I missing something?

    Thanks in advance.

  • #2 / Jun 14, 2012 2:06pm

    jonathanmelville

    132 posts

    Hello,

    However any other files in that template group - test.php

    Are you saving your templates as files on the server? If so they shouldn’t end with a .php extension. They should be .html files.

    I just took a look at your site and everything seems to work fine without having to include /site/ in the path. Did you resolve this issue?

     

     

  • #3 / Jun 14, 2012 2:59pm

    Patrick Hvid

    62 posts

    Do you have a catalogue called “test” in your root-html-folder?
    This will screw things up a bit 😊

    /patrick

  • #4 / Jun 14, 2012 3:40pm

    secondbridge

    6 posts

    I appreciate the replies.

    I’m not saving them as files on the server - using Mountee. All other files in other groups are saved with a .php extension and are working just fine. It’s purely the Default Group that won’t access it’s files directly.

    The pages linked above working for you? I just checked and got a 404. I changed the name of the “Test” file but still no avail:

    Fails (throws a 404):
    http://lesliehalleck.secondbridge.com/not_a_test

    Works (simple text page):
    http://lesliehalleck.secondbridge.com/site/not_a_test

    It’s my understanding that both should show the same thing. The index.php does just that:

    Site (Default Template Group)
        - index.php (works)
        - blog.rss (fails)
        - articles.rss (fails)
        - not_a_test.php (fails)

    Thoughts?

  • #5 / Jun 14, 2012 3:50pm

    Patrick Hvid

    62 posts

    Have you created the template via mountee?
    Did you check in the CP that they actually exists, and that the name there is without the .php

    /patrick

  • #6 / Jun 14, 2012 3:54pm

    secondbridge

    6 posts

    Yep. Everything is there and functioning normally.

  • #7 / Jun 14, 2012 3:57pm

    jonathanmelville

    132 posts

    Where are the templates for the /about and /classes pages stored?

  • #8 / Jun 14, 2012 4:00pm

    Patrick Hvid

    62 posts

    Just a question I actually can not help you with - there’s nothing in your .htaccess that screws this?

  • #9 / Jun 14, 2012 4:03pm

    secondbridge

    6 posts

    Not that I’m aware of. I haven’t modified it beyond what’s suggested in the user guide.

    The weird thing is, I’ve gotten other sites working just fine. This one is the only bugger.

  • #10 / Jun 14, 2012 4:04pm

    jonathanmelville

    132 posts

    Your templates for the /about and /classes pages work as expected. Where are they located?

  • #11 / Jun 14, 2012 4:07pm

    secondbridge

    6 posts

    In the About and Classes groups respectively. All the other template groups are working just fine.

  • #12 / Jun 14, 2012 4:36pm

    jonathanmelville

    132 posts

    Ok lets take a look at something else. Go here: Design > Templates > Template Preferences

    Where it says Enable Strict URLs, what is that set to?

  • #13 / Jun 14, 2012 5:19pm

    secondbridge

    6 posts

    “Enable Strict URLs” is set to “Yes”  (under Global Template Prefs)

  • #14 / Jun 14, 2012 5:30pm

    jonathanmelville

    132 posts

    You need to set it to “no” an I think that will fix your issue.

  • #15 / Jun 14, 2012 5:43pm

    secondbridge

    6 posts

    Bingo! That did it. Thanks so much.  Just read up on that in the documentation and now I understand what was going on.

    Thanks again!

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

ExpressionEngine News!

#eecms, #events, #releases