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.

Search result links don't open page in browser

July 24, 2012 3:53am

Subscribe [3]
  • #1 / Jul 24, 2012 3:53am

    Markus

    34 posts

    My website is hotelmarketing.com.

    When you search on the site, the search result page works fine, and the links to article are correctly formated.

    However, when you click on a search result link to open the articel, the URL of the article gets displayed correctly in the browser, but the page content does not get loaded in the browser.

    Funny enough, when you place the cursor at the end of the article URL and hit enter again, the page loads correctly in the browser.

    I’m running on the latest version of EE (2.5.2).

    Appreciate any hints in a direction that could resolve the problem.

    Txs. markus

  • #2 / Jul 24, 2012 9:25am

    julie p

    282 posts

    Have you tried killing the trailing slash? Also, if that doesn’t work, can you paste in the code that generates these links?

  • #3 / Jul 24, 2012 4:03pm

    Markus

    34 posts

    Yes, tried it without trailing slash - no change.

    Here is the search results code I use:

    {exp:search:search_results}
       <strong><a href="http://{url_title_path=content/article}/" title="{title}">{title}</a></strong>
    
       <span>{entry_date format="%d %M, %Y"} | {category}</span>
    {/exp:search:search_results}

    Thanks for your help. markus

  • #4 / Jul 24, 2012 4:06pm

    julie p

    282 posts

    Is that all of the code? How are you constructing the anchor tag?

  • #5 / Jul 24, 2012 5:50pm

    Dan Decker

    7338 posts

    Hi Markus,

    Thanks for posting on the forums!

    Can you try the {auto_path} variable for me?

    {exp:search:search_results}
       <strong><a href="http://{auto_path}" title="{title}">{title}</a></strong>
    
       <span>{entry_date format="%d %M, %Y"} | {category}</span>
    {/exp:search:search_results}

    Let me know the results!

    Cheers,

  • #6 / Jul 25, 2012 2:35am

    Markus

    34 posts

    Autopath formats my article URLs wrongly:

    http://www.hotelmarketing.com/index.php/search/results/how_triptrotting_wants_to_revolutionize_travel_and_its_antiquated_business/

    My articels are in “content/article” path not “search/results”.

    Any idea how I can fix that?

    Txs. markus

  • #7 / Jul 25, 2012 6:36pm

    Robin Sowell

    13255 posts

    Yep- it’s creating links using search/results instead of content/article.  Hrm- it looks like it should work.  Try tweaking it like so:

    href="{url_title_path="content/article"}/"

    If that doesn’t work- let me know and I’ll do some testing.  And in the meantime, using

    href="{auto_path}/"

    should work, as long as it’s set properly in ‘Admin- Channel Admin’ for the channel preferences.  It takes its value from the ‘Search URL’.

  • #8 / Aug 14, 2012 12:26pm

    Markus

    34 posts

    Not working. Same problem as initially. The search result lists the article, the click on the article title opens the right URL, but the page does not open in the browser. Only if you put the cursor behind the URL and hit enter again.

    Very strange. Any idea what that could be?

  • #9 / Aug 14, 2012 2:10pm

    Markus

    34 posts

    Solved it. Deleted the .haccess file, now everything works fine again.

  • #10 / Aug 15, 2012 12:28pm

    Dan Decker

    7338 posts

    Hi Markus,

    Odd, indeed!

    I’m glad you have it all sorted out.

    If you need anything else, please let us know.

    Cheers!

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

ExpressionEngine News!

#eecms, #events, #releases