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.

Wrong {segment_2} value

February 01, 2011 12:37pm

Subscribe [3]
  • #1 / Feb 01, 2011 12:37pm

    Yuri

    315 posts

    Hi,

    I have and URL on my site that looks like http://domain.com/page/itunes-10.1.2

    So the 2nd segment of URL is itunes-10.1.2. However when I try to use {segment_3} variable - it replaces dots with underscores, so I get itunes-10_1_2

    Because of this the appropriate channel entry does not show.

    I’m using EE 2.1.3, build 20101220

  • #2 / Feb 02, 2011 6:00am

    John Henry Donovan

    12339 posts

    Yuriy,

    Note that a typical EE URL for a single paged entry looks like this

    http://www.mydomain.com/index.php/template_group/template/url_title

    In your URL can you identify what each segment is please?

    Are you using any third-party add-ons?

    If itunes-10.1.2 is an actual entry title open up the entry and let us know what the URL title is

  • #3 / Feb 02, 2011 6:14am

    Yuri

    315 posts

    In my url ‘page’ is template name (in default template group)
    ‘itunes-10.1.2’ is entry URL title.
    The only extensions I use are NSM better meta and Solspace Tag

  • #4 / Feb 02, 2011 4:31pm

    Ingmar

    29245 posts

    So how are you using {segment_3}, where? Can you show us a little more of your code?

  • #5 / Feb 03, 2011 3:38am

    Yuri

    315 posts

    I mean {segment_2}, sorry for the confusion.

    If I call {exp:channel:entries} on this page without specifying url_title parameter (but specifying channel), it returns no results

  • #6 / Feb 03, 2011 4:11pm

    Ingmar

    29245 posts

    Can you try to a typical EE URL as mentioned by John Henry, i.e. including a template group? What happens when you try {segment_2} and {segment_3} in your template, do they show the expected results?

  • #7 / Feb 04, 2011 2:56am

    Yuri

    315 posts

    It appeared that the problem was because of URL rewriting in my .htaccess. Sorry for the confusion.
    Thank you for your assist!

  • #8 / Feb 04, 2011 4:33am

    Ingmar

    29245 posts

    Very glad to see you all set. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases