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.

Same URL going to different pages (!)

March 24, 2010 3:42pm

Subscribe [4]
  • #1 / Mar 24, 2010 3:42pm

    Narzula

    69 posts

    Greetings,

    I’m using 1.6.8 and have a site organized by weblogs for the main sections and categories for pages. Thus far all has been well but now I’m having a frustrating issue:

    On a newly created page that has an link to another page, it goes to the wrong page, despite the URL being correct. It goes to the last category in the section instead of the category within the URL:

    http://sitename.com/template-group-1/category-1 goes to category-5 in template-group-1

    Source code link is server-relative: /template-group-1/category-1

    However, from the navigation, the same link goes to the right page:

    http://sitename.com/template-group-1/category-1 goes to the correct page.

    Source code link is absolute: http://sitename.com/template-group-1/category-1

    Whatever the source code, the links look the same in the browser but behave differently.

    I have tried to make the problematic links absolute both in the HTML source viewer and using the TinyMCE WYSITYG tool but upon viewing source they are formatted as server-relative (and I’m not sure if this is even the problem).

    Assistance is much appreciated!

  • #2 / Mar 24, 2010 4:29pm

    Ingmar

    29245 posts

    Are you using mod_rewrite to remove index.php from your URLs?

  • #3 / Mar 24, 2010 4:59pm

    Narzula

    69 posts

    Yes—I’m using the LG .htaccess Generator. My clients prefer clean urls 😉

  • #4 / Mar 24, 2010 5:04pm

    Ingmar

    29245 posts

    Can you please try without, putting index.php back into your URLs? I’d like to take this out of the equation for now.

  • #5 / Mar 24, 2010 5:15pm

    Narzula

    69 posts

    I can’t do this sitewide because it’s live but I disabled the url rewriting for this weblog by removing it from the .htaccess file so the concerned URLs work with index.php. I’m still getting the same results.

  • #6 / Mar 24, 2010 5:34pm

    Ingmar

    29245 posts

    I can’t do this sitewide because it’s live but I disabled the url rewriting for this weblog by removing it from the .htaccess file so the concerned URLs work with index.php.

    They always would, even if creating your links without index.php using it would still work. That said, is there some other way you can test this? A staging server, perhaps a quick off-peak test? I’d really like to test wihtouh any .htaccess at all.

  • #7 / Mar 24, 2010 5:37pm

    Narzula

    69 posts

    Greetings—I tried removing the .htaccess and it broke the site so I quickly restored it. Let me get back to you in 30 minutes. I appreciate your help.

  • #8 / Mar 24, 2010 5:40pm

    Ingmar

    29245 posts

    No problem at all. Ready when you are.

  • #9 / Mar 24, 2010 6:19pm

    Narzula

    69 posts

    I have removed the .htaccesss file and updated the navigation so the site is functional. I also updated the problematic links (within the body text), again trying to use an absolute link but the source code resulting in /index.php/template_group/category_name and going to the wrong page. The same URL link in the navigation goes to the correct page.

  • #10 / Mar 24, 2010 8:26pm

    Brandon Jones

    5500 posts

    Azular, a few questions:

    1. After removing the rewrite rules, did you go in and update any path settings in the CP?  2. Are any other extensions being used?
    3. What are the differences between the working (navigation) and non-working URLs?

  • #11 / Mar 25, 2010 9:57am

    Narzula

    69 posts

    1. I added “index.php” to “Name of your site’s index page” under General Configuration

    2. All extensions: Required Category Extension (v.1.0.4), Category Checkboxes (v.1.1.5), jQuery for the Control Panel (v.1.1.1), Edit Tab AJAX (v.1.2.2), LG Addon Updater (v.1.0.2), Edit Menu (v.1.0.2), FieldFrame (v.1.3.5), Gypsy (v.1.0.6), LG TinyMCE Custom Field (v.1.1.5), File, by Mark Huot (v.3.1.1) ,Multi Text (v.110), Playa (v.1.3.3), Tab Forward (v.1.1)

    3. As previously described, the only difference I can detect between the working (navigation) and non-working URLS is in the source code. The working URLs are absolute (http://sitename.com/index.php/template_group/category_name) and the non-working URLs are relative to the server (/index.php/template_group/category_name).

    Not sure why this should matter though, especially as both produce identical URLs in the browser. But again, the absolute URL goes to the category name indicated in the URL and the other goes to the same URL but to the last category page within the weblog.

  • #12 / Mar 25, 2010 10:03am

    Sue Crocker

    26054 posts

    Have you tried this:

    {path="template_group/category_name"}
  • #13 / Mar 25, 2010 10:29am

    Narzula

    69 posts

    When I insert

    <a href="http://{path=template_group/category_name}">Link</a>
    using the TinyMCE HTML editor, save, and then return to the editor code it adds a slash:
    <a href="/{path=template_group/category_name}">Link</a>

    so the resulting url ends up like this:

    http://sitename.com/http://sitename.com/index.php/template_group/category_name/

    I would much prefer to use standard URL formatting within main body content. This site is to be handed off to clients next week and will be maintained by someone who can handle WYSIWIG editing and adding basic links but not adding in unfamiliar ExpressionEngine paths. It needs to be easy to add basic content and links.

    Thanks for your continued assistance!

  • #14 / Mar 25, 2010 10:50am

    ender

    1644 posts

    are you using your category trigger word in the URL?

    if it’s the default ‘category’ still, EE expects something like this:

    /template_group/template/category/C15/ or
    /template_group/template/category/category_url_title/

    (of course the template is optional if you’re using index.php, and the template_group is optional if you want to use your site’s default template group)

    it seems to me that you’re missing the trigger word.

  • #15 / Mar 25, 2010 11:20am

    Narzula

    69 posts

    I’m not sure that I’m clear on this as I simply want for the client to be able to enter the URL for whatever place they need to link to (simply by copying and pasting from the browser) and the link will work. They don’t need to be dealing with anything EE code related within the main body area they’ll be working with. EE needs to allow them to enter the URL for the desired page and simply go to that page.

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

ExpressionEngine News!

#eecms, #events, #releases