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.

Template Group url issues

February 18, 2011 12:19pm

Subscribe [4]
  • #1 / Feb 18, 2011 12:19pm

    mattgreen110

    46 posts

    I am having issues after migrating EE site to a different server.

    I have a couple template groups. The domain pulls up the site fine, but when trying to access the index page of a new template group for example http://www.domain.com/template_group ... It gives me a 404.

    If I assign the site homepage/index page to that group, it works fine there is nothing wrong with the templates and their groups themselves… I just cannot access the groups via URL… ‘

    Any ideas?

  • #2 / Feb 18, 2011 12:45pm

    Kurt Deutscher

    827 posts

    Hi Matt,

    First some questions that will help the tech team rule out some of the possibilities:

    What version of EE have you moved, 1.6.x or 1.7.0 or 2.1.x?

    If your version starts with a “1”, did you double check the file permissions on the path.php file and double-check its contents?

    In “Global Template Preferences”, do you have strict URL’s turned on, or off?

    Now for my “hunch”. It looks like you are using some method for removing the /index.php/ from your URIs. Any chance the method you used on the old server is not working as well for you on the new server?

    Your answers will help the team get you up and running again.

  • #3 / Feb 18, 2011 2:52pm

    mattgreen110

    46 posts

    v2.1.3

    strict URL’s turned off

    No removing of index.php, so not an .htaccess deal.

    Trying to access a template group’s index page, so it shouldn’t require adding index.php for the index page of the template group. If I add it however it works, I guess that’s fine but this issue has plagued me at other times, It seems like the server is looking for a directory and it doesn’t find it so I get 404… Do I address this in .htaccess?

    -Matt

  • #4 / Feb 18, 2011 3:01pm

    Kurt Deutscher

    827 posts

    Let’s see if I’m following you:

    http://asitedomain.com/index.php/template_group/index (this works)
    http://asitedomain.com/template_group/index (this doesn’t work)

    Am I close?

  • #5 / Feb 18, 2011 3:28pm

    mattgreen110

    46 posts

    you are correct.

  • #6 / Feb 18, 2011 3:56pm

    Kurt Deutscher

    827 posts

    Excellent!

    You’re going to want to revisit the ExpressionEngine URLs section of the User Guide.

    Here’s what I “think” is going on.

    In EE, there’s a big difference between the /index.php/ file and the /index/ template.

    The /index.php/ file must be included (although doesn’t need to be displayed) in your URIs.

    The /index/ template however doesn’t have to be included or displayed.

    They have nearly the same name, but the first is the master file that can serve up your whole website, the second is just the default template within a group of other templates.

    In short, /index.php/ must be in your URI all the time. You can use some (non supported) method to hide it from humans, but EE still needs it to render your site.

    After you get a second to review the docs linked above, please let me know if we’re getting close to discovering what the issue might be.

  • #7 / Feb 18, 2011 4:36pm

    mattgreen110

    46 posts

    Those articles do not help because they all include index.php/template_group.

    So i stopped even trying to worry about that and figure I would go into the site and change all url’s… for example

    path=“admin/manage_companies” now becomes path=“index.php/admin/companies” or just absolute {site_url}index.php/admin/manage_companies…

    This works fine, but for SOME reason when I change within a form it still removes the index.php when trying to process the action on the form ...

    I changed it to this——> {exp:channel:entry_form channel="company" return="{site_url}index.php/admin/manage_companies”}

    When I refresh and open up my source I get this… <form id=“publishForm” method=“post” action=“http://www.atexac.com/atex_new/admin/manage_companies/”  enctype=“multipart/form-data” >

    blows my freakin mind.

  • #8 / Feb 18, 2011 5:22pm

    Kurt Deutscher

    827 posts

    Those articles do not help because they all include index.php/template_group.

    So i stopped even trying to worry about that…

    Matt, that’s the way EE is designed to work, and its the basis for EE’s whole template system, so its worth making the time to understand. Skipping around it will create all manor of path issues for you.

    For example, that form path issue you describe, EE requires the return=”” parameter in the SAEF. It also requires that you set it using “template_group/template” (segments 1 and 2 of the URI) and not the /index.php/ file name.

    Most of the time, EE’s user_guide is spot-on, and is worth your time to consult when setting things up. As great as EE is, not all paths are set the same way in all function systems. EE is getting much better at this, but there are still slight differences and you’ll want to have the docs open when setting up a new form or tag for something. Once we’ve got a handle on EE’s default way of doing things and are getting accurate predictable results with it, then we can go off and create our own way of handling paths and URI’s.

    I would highly recommend you get your site working first with the expectation of the /index.php/ file being in your URIs, then, once everything is working how you want, use one of the (unsupported) common methods of removal. Everyone I’ve ever met that has tried to remove /index.php/ right off the bat ends up struggling with things more than they need to.

    I’m going to step back now and let the “paid” support crew follow up. I have a deadline to meet today, but I will try and follow up here over the weekend.

    Good luck with your site Matt.

  • #9 / Feb 18, 2011 5:44pm

    mattgreen110

    46 posts

    Thanks a lot… I made a mistake in my response… for some reason the other site on the dev server ... when using {path="admin/manage_members} would take me to http://www.domain.com/index.php/admin/manage_members... and not http://www.domain.com/admin/manage_members... I was being confused…

    I have identified that the entire issue is that for some reason when using path=“segment/segment” or return=”” ... it takes me to the http://www.domain.com/segment/ rather then where it should “http://www.domain.com/index.php/segment”... with including the index.php

    Some kind of path issue.

    Thank you so much for your help, I still need the issue resolved, if the paid support is around that would be great too. 😊

  • #10 / Feb 18, 2011 6:18pm

    mattgreen110

    46 posts

    Def my issue

    http://ellislab.com/expressionengine/user-guide/templates/globals/path.html

    In the docs here it says

    For example, a variable like this:
    {path='channel/comments'}

    Will be rendered like this:
    http://example.com/index.php/channel/comments/

    ————-

    But it renders like this
    http://example.com/channel/comments/

    Thanks…

  • #11 / Feb 20, 2011 1:43pm

    Greg Salt

    3988 posts

    Hi mattgreen110,

    Please do check that the setting for “Name of your site’s index page” at Admin > General Configuration is populated with index.php.

    Cheers

    Greg

    @Kurt, thanks very much indeed for the help.

  • #12 / Feb 20, 2011 8:36pm

    mattgreen110

    46 posts

    ::facepalm:: that worked, I use a custom config file, and I overlooked that. ARG. Thank you guys SO MUCH for your help.

  • #13 / Feb 21, 2011 10:34am

    Sue Crocker

    26054 posts

    Thanks for the assist, Kurt!

    Matt, sounds like things are working again.. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases