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 Issue (only one redirects to homepage)

June 16, 2008 2:27am

Subscribe [3]
  • #1 / Jun 16, 2008 2:27am

    Joey Trimmer

    128 posts

    I have two template group issues that I believe are separate issues but just to be safe:

    The bigger issue: I have 12 or so template groups and only one of them redirects to the homepage. Weird right? Here is the Homepage and here is the bio page. As you can see, the bio is redirecting. When I turn on template debugging I see this in the first 5 lines:

    (0.000043) - Begin Template Processing -
    (0.000446) URI: /bio/
    (0.000472) Path.php Template: home/index
    (0.000501) Retrieving Template
    (0.000543) Retrieving Template from Database: home/index

    Then everything after that is it loading the home page. Oddly, the news weblog isn’t parsing and even more oddly it sort of works if I add the trailing index.

    The smaller issue: Before that happened, when I was creating the News template group, I decided to have the weblog create new templates. When I clicked submit, the template group didn’t show up under the Templates page. It’s only there when I click “edit group order” so it’s obviously in the database, but it’s hidden from view so I can’t edit it or create templates beneath it. I found a solved forum topic with a similar problem but I think we arrived at the problem in different ways. That aside, I don’t currently have access to the DB to be able to see if I could remove that template group.

    For now, I’ve created a temporary news group (news1). I mention this here in case it’s related in anyway but my major concern is with the first problem with the bio page.

    Thanks!

  • #2 / Jun 16, 2008 10:48am

    Robin Sowell

    13255 posts

    That’s a fair bit of oddness- and agreed, can’t tell if they’re totally independent issues yet.

    What build/version are you running- and is this a local install or is it hosted?

    Also- any extensions installed? 

    And I’m tempted to get the template group issue squared away first.  Do you have access to phpmyadmin?  If not, we can likely look at things via EE’s db interface.

  • #3 / Jun 16, 2008 11:37am

    Joey Trimmer

    128 posts

    Hey there Robin,

    This is a hosted install using MediaTemple. It’s currently running in php safe mode but I’ve asked for that to be turned off. Consequently, I currently don’t have access to the DB through ssh or phpmyadmin or anything. I could request that access but not sure when I’d get it.

    Running 1.6.3 and the usual round of extensions I include with most installs:
    * publish page improvements
    * File
    * LG Add Sitename
    * Hidden Weblogs
    * Edit Tab AJAX
    * Akismet Check
    * REEOrder

    I have the Share This plugin installed as well.

  • #4 / Jun 16, 2008 11:48am

    Robin Sowell

    13255 posts

    OK- it’s slightly clunkier, but we can do what we need w/the db via ‘Admin- Utilities- SQL Manager’.  Well- we can do everything but backup, and I’m hesitant to have you muck with the db directly w/out a solid current backup.

    Dang.

    OK- work on getting phpmyadmin access and/or ask them to make a backup of your db and send it to you.  We really want that before dinking directly.

    Until we get that- let’s hit the first issue.  Which I didn’t completely understand.  Are you talking about embeds- or actual redirects if there’s no entry returned or something?

  • #5 / Jun 16, 2008 11:59am

    Joey Trimmer

    128 posts

    You’re right, better to be safe. I’ve asked for the info, hopefully I’ll get it soon.

    Regarding the first issue:
    I have the template group “bio” setup and the bio page’s full URL should be bio/index. However, when going to site.com/ee/bio it is loading the wrong template. The weird thing is that the URL is still the same but the home/index template is being rendered instead. I can confirm this with template debugging. It loads home/index instead of bio/index.

    The htaccess is the same I use for most sites to remove the index.php. Also, only template group bio is having this issue so far. The 10 or so other template groups load properly.

    Also, if I go to the full URL site.com/ee/bio/index it loads the bio page (with a little oddness)

  • #6 / Jun 16, 2008 12:14pm

    Joey Trimmer

    128 posts

    BTW, I don’t have a backup of the DB yet but I did browse the exp_template_groups table through SQL Manager and confirmed that the template_group “news” is in the database, even though it’s not showing up in my template group listing on the template page.

  • #7 / Jun 16, 2008 12:28pm

    Robin Sowell

    13255 posts

    OK- are you logged in as a superadmin when you can’t see the template groups?

    And- is ‘ee’ the renamed index.php file?  And any htaccess going on?  And just so I’m dead clear- what’s the default template group name again?

  • #8 / Jun 16, 2008 12:47pm

    Joey Trimmer

    128 posts

    Thanks, Robin. Yes logged in as superadmin. I removed index.php through htaccess but it’s the only htaccess that I’ve used, nothing funky going on there. EE is just the testing directory where i’ve installed EE before we launch.

    Default template is home/index
    Template group/template problem is bio/index

    When I point my browser to bio it loads the home/index template. If I point my browser to bio/index it loads bio/index but it’s not loading correctly. Hitting up the nternet cafe in T-minus 5 minutes!

  • #9 / Jun 16, 2008 12:58pm

    Robin Sowell

    13255 posts

    Yea- something is wrong. 

    1.  You may/may not be running into problems with relative paths- like
    http://maroon5.com/ee/home/
    Breaks- because it’s looking for images in http://maroon5.com/ee/home/images/design_images/feature.jpg
    Ditch the trailing slash- no breakage.

    Which may/may not be relavant, but it took me a minute to figure out what was up, so I mention it.

    Lot of stuff could be going on with bio.  What I’d do for now- rip out whatever is in bio/index- and put just ‘bio test’ in there.  Let’s see if that resolves ok- as both bio and bio/index and bio/index/ or what have you.

    And I’d go ahead and drop the .htaccess during testing as it can cause weirdness- good to eliminate the possibility until we figure out what’s up.

    Also- that is going to be a wicked site!

  • #10 / Jun 16, 2008 1:04pm

    Joey Trimmer

    128 posts

    Ahh that’s a good point about the relative paths. I’m going to look into that. Good news is I have plesk control panel info now.

    I actually forgot to mention that I had removed everything from bio/index and it still loaded home/index in it’s place. One thing I’m going to do now for sure is make sure I’m linking everything through {path} and images with {site_url}images/design_images. This way the path things should be cleaned up. For quick testing I didn’t do this yet. Stupid deadlines making me lazy 😊

    I’ll remove htaccess for now as well. Good point.

  • #11 / Jun 16, 2008 1:16pm

    Robin Sowell

    13255 posts

    Yell once the htaccess is gone- and add back the index.php bit in admin- system prefs- general config.  And then…  Is it just the bio one doing it- or all of the template groups?  And let me see the start of that debug again- does it stay the same?  It’s definitely pulling up home/index in the first one.  May turn out this is related to the template groups not showing up after all.

    Oh- and are you saving templates as text files?

  • #12 / Jun 16, 2008 1:21pm

    Joey Trimmer

    128 posts

    Okaaaay, so I’ve removed all contents from bio again and same results. If you go directly to bio/index you can see “bio test”. Also, I’ve gone ahead and made the nav items relative with {path} and the test images in the html are loading with {site_url} so there shouldn’t be any breakage there.

    Also, dropped the htaccess for now. So it is a relative paths issue but only with this template group…very bizarre!

    Oh, and glad you dig the site! I’m pretty happy with it 😊

  • #13 / Jun 16, 2008 1:23pm

    Joey Trimmer

    128 posts

    Yes, I’m now saving as template files. php safe mode was on so I wasn’t able to before, but I just got that turned off when I got plesk cp info.

    TEMPLATE DEBUGGING
    (0.000036) - Begin Template Processing -
    (0.014078) URI: /bio/
    (0.014120) Path.php Template: home/index
    (0.014153) Retrieving Template
    (0.014200) Retrieving Template from Database: home/index
    (0.017200) Template Found
    (0.035775) Retrieving Template from File
  • #14 / Jun 16, 2008 1:43pm

    Robin Sowell

    13255 posts

    Argh- thick code.  It’s buggering here:
          $this->log_item(“URI: “.$IN->URI);
          $this->log_item(“Path.php Template: {$template_group}/{$template}”);
    URI ius right- template group and template are wrong.  But need to find where it comes up with those to pass to the function run_template_engine($template_group = ‘’, $template = ‘’)

    Can you flip show queries on as well- think that may give us a hint.

  • #15 / Jun 16, 2008 1:51pm

    Joey Trimmer

    128 posts

    Sure thing. Splitting it into 2 comments since it’s too large for one.

    SQL QUERIES
    1
    SELECT es.* FROM exp_sites AS es WHERE es.site_id = '1'
    2
    SHOW TABLES FROM `m5_db` LIKE 'exp_%'
    3
    SELECT DISTINCT ee.* FROM exp_extensions ee WHERE enabled = 'y' ORDER BY hook, priority ASC, class
    4
    SELECT member_id, admin_sess, last_activity FROM exp_sessions WHERE session_id = '6ab958b36deb94549b8785b48d0708fb8f5202c7' AND ip_address = '71.216.176.62' AND user_agent = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_3; ' AND site_id = '1'
    5
    SELECT m.weblog_id, m.tmpl_group_id, m.username, m.screen_name, m.member_id, m.email, m.url, m.location, m.join_date, m.last_visit, m.last_activity, m.total_entries, m.total_comments, m.total_forum_posts, m.total_forum_topics, m.last_forum_post_date, m.language, m.timezone, m.daylight_savings, m.time_format, m.profile_theme, m.forum_theme, m.private_messages, m.accept_messages, m.last_view_bulletins, m.last_bulletin_date, m.display_signatures, m.display_avatars, m.last_email_date, m.notify_by_default, m.ignore_list, g.* FROM exp_members AS m, exp_member_groups AS g WHERE g.site_id = '1' AND unique_id = '12c1f258cbfb51d154ec67beb7b3108f52120f80' AND password = '7609303e39a8afcbfc36db3a1de3a94cc0fd90a7' AND m.group_id = g.group_id
    6
    UPDATE `exp_sessions` SET `session_id` = '6ab958b36deb94549b8785b48d0708fb8f5202c7', `member_id` = '1', `admin_sess` = '1', `ip_address` = '71.216.176.62', `user_agent` = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_3; ', `last_activity` = '1213660128' WHERE session_id ='6ab958b36deb94549b8785b48d0708fb8f5202c7'
    7
    SELECT * FROM exp_online_users WHERE site_id = '1' AND date > 1213659228 AND weblog_id = '0' ORDER BY name
    8
    UPDATE `exp_online_users` SET `weblog_id` = '0', `member_id` = '1', `name` = 'admin', `ip_address` = '71.216.176.62', `date` = '1213660128', `anon` = 'y', `site_id` = '1' WHERE site_id = '1' AND ip_address = '71.216.176.62' AND member_id = '1'
    9
    SELECT * FROM exp_stats WHERE site_id = '1' AND weblog_id = '0'
    10
    UPDATE exp_stats SET last_visitor_date = '1213660128' WHERE site_id = '1' AND weblog_id = '0'
    11
    SELECT t.template_name, tg.group_name FROM exp_templates t, exp_template_groups tg WHERE t.group_id = tg.group_id AND t.template_id = '16'
    12
    SELECT exp_templates.template_name, exp_templates.template_id, exp_templates.template_data, exp_templates.template_type, exp_templates.edit_date, exp_templates.save_template_file, exp_templates.cache, exp_templates.refresh, exp_templates.no_auth_bounce, exp_templates.enable_http_auth, exp_templates.allow_php, exp_templates.php_parse_location, exp_templates.hits, exp_template_groups.group_name FROM exp_template_groups, exp_templates WHERE exp_template_groups.group_id = exp_templates.group_id AND exp_template_groups.site_id = '1' AND exp_templates.template_name = 'index' AND exp_template_groups.group_name = 'home'
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases