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.

{auto_path} problem on search results page

August 16, 2007 12:55pm

Subscribe [1]
  • #1 / Aug 16, 2007 12:55pm

    Jake Lyman

    20 posts

    I’ve created a template group called “articles” that allows for pdfs to be uploaded with author, description, title, and a few other custom weblog fields for the publish page. Works fine so far.

    However, when I use the default advanced search page in the “search” template group, it doesn’t work. When I search for an article it brings up a link to that article, but the URL is wrong which makes me think that the {auto_path} tag on the search results page isn’t working properly. On click it sends me to site.com/entry but should send me to site.com/articles/entry.

    Any thoughts on what I might be doing wrong?

    Thanks!

  • #2 / Aug 16, 2007 1:09pm

    Robin Sowell

    13255 posts

    The auto_path variable uses the path specified in ‘Admin- Weblog Admin- Weblog Management’- edit each weblog- and in the ‘Paths’ section, make sure the search path points to the template you want to use for each individual weblog when displaying search results.

    See if that’s the issue.  The path should be the full url with a trailing slash- and EE will add the url_title for the single entry.  So if you want the search going to articles/entry?  You’d use http://mysite.com/index.php/articles/entry/ and it should send you to the articles template group, entry template- with the appropriate single entry indicator on the end.

  • #3 / Aug 16, 2007 1:34pm

    Jake Lyman

    20 posts

    Thank you so much, Robin! That did it!

  • #4 / Aug 16, 2007 3:08pm

    Jake Lyman

    20 posts

    Unfortunately, I’m having the same problem with the permalink at the bottom of the post! I looked in the path preferences for that weblog but there is nothing about the permalink there. I’ll keep looking. If someone knows the answer to this as well, I’m grateful!

  • #5 / Aug 16, 2007 3:11pm

    Lisa Wess

    20502 posts

    Can you paste the code, or give us a link, to where you mean, so we can see it? I suspect there’s something like title_permalink pointing to an incorrect template.

  • #6 / Aug 16, 2007 3:28pm

    Jake Lyman

    20 posts

    Alright, I’m officially a dunderhead. What a rookie mistake! Oh wait, I am a rookie. 😊 At the top of that template was the following: {assign_variable:my_template_group="site"}. It should have been: {assign_variable:my_template_group="articles"}.

    Thanks, Lisa, your post made me look at the code! Sorry for wasting time!

  • #7 / Aug 16, 2007 3:41pm

    Lisa Wess

    20502 posts

    No worries at all! I’m happy you spotted it because I wouldn’t have known you changed the main template group. We would have found it but after a bit more back and forth.

    Most, though not all, items are handled in the template, so that’s often a good place to start looking. =)

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

ExpressionEngine News!

#eecms, #events, #releases