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.

Different behavior of templating system after upgrade from EE 2.2.2 to EE 2.5.2.

June 19, 2012 6:43am

Subscribe [3]
  • #1 / Jun 19, 2012 6:43am

    MedPro

    4 posts

    Hi,

    Well, here´s my setup:

    In each template group, I have two templates: one template called “index” and a second one called “product_page_template”. The first one allways showing a list of product, the second one showing details about one particular product.

    In the “product_page_template” i use the following code to display the appropriate product detected as a segment from URL:

    {exp:channel:entries channel="channel_name" limit="1" disable="categories|member_data|pagination" require_entry="yes"}

    So until now, with EE 2.2.2 the url http://www.mysite.com/template_group_name/product_name/
    was served with template “product_page_template” from “template_group_name” template group.

    However after upgrading to EE 2.5.2, for the same URL, I get the template “index” displayed, instead of “product_page_template”.

    Has anyone around here had to solve a similar situation recently? Should I modify the template somehow, or rather my .htaccess rule?

    PS: I dont use index.php in URL, the appropriate entry in my .htacess file looks like this:

    RewriteCond $0 !^(?:index\.php/)?template_group_name/(?:product_page_template) [NC]
    RewriteRule ^(?:index\.php/)?template_group_name/([^/]+)/?$ /index.php/template_group_name/product_page_template/$1/ [L,NC]

    Any help will be greatly appreciated, I did the update on a production site and have to fix it rapidly.

  • #2 / Jun 19, 2012 8:12pm

    boldyellow

    89 posts

    I don’t recall the EE version when EL began supporting the removal of index.php… but have you tried their .htaccess code in the docs?

  • #3 / Jun 20, 2012 4:22am

    MedPro

    4 posts

    Yes, I read that, it didn´t help.

    If I explicitly specify the name of the template to be used in the url, it works:

    /oranges/subpage/big-orange/

    The correct template (i.e. “subpage”) is parsed.


    But I need this form of URL, which worked fine before I did the upgrade:

    /oranges/big-orange/

    So I guess all I need to do is modifiy the appropriate .htaccess rule.
    Unfortunatelly, it goes behind my know-how. Anyone can help?

  • #4 / Jun 20, 2012 6:26am

    John St-Amand

    865 posts

    Have you tried it with dynamic=“yes” as a parameter in your entries loop?

  • #5 / Jun 20, 2012 7:27am

    MedPro

    4 posts

    I think dynamic=“yes” is the deafult setting. Anyway, it didn´t help.

    I´m reverting back to EE v2.2.2 and going to do some tests on a dev version of the site.

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

ExpressionEngine News!

#eecms, #events, #releases