We added a search for blogs only, but the search does not return the correct urls for the individual blog posts. Is there a fix for this issue?
Can you please provide some more info on your issue?
Is this happening with other content items (for example news), as well?
What exactly do you mean by "the correct urls"? Where do the "incorrect urls" redirect to?
Did this happen after update? Is your current version 4.2.1650?
I'm having the exact same problem for blog posts, news items and events across two sites. Example: The search result for a blog post provides this URL:
However, the correct URL is:
The blog posts are set up to open in a new page called News Article.
Is there something I can add in the search index for this to return the correct result? Or is there a tweak I can do to the blog widget on the detail page?
I'm using Sitefinity 8.1.
I cannot reproduce the behavior you are describing.
Does your "News Article" page contains the Blog posts widget?
Do the links resolve correctlty from a page that has the Blog posts widget?
Here is a screenshot of my result:
Also, in the Sitefinity backend you can check which are the pages which display content items of a particular type and order them by priority.
The one with the highest priority is used in the search results, the sitemap and also when previewing the item. This is considered the default location of the item.
Please set this "News Article" page to be with priority 1 under Content -> Blogs -> your blog -> Pages where BlogPost items are published.
Hi Dimitri, thanks for your reply.
Yes, the "News Article" page has the blog posts widget on it. Also, on the main news page, "CRH News," the blog posts widget points to "News Article" in the "Single Item Settings > Selected existing page."
I examined the blog post list with Firebug as you did in your test, but on the main CRH News page, the link is fine. The search results, however, list the bad URL.
HOWEVER, something I noticed: When I had the CRH News page opened in the page edit module, I previewed the page by clicking the button on the top left. When I did this, the links in the blog list were all "bad." showing the same result as the links provided in the search. So I went back to the blog posts widget on that page, checked "Single Item Settings," and it had reverted to "Open single item in... Auto-generated page." That is NOT the setting I had it on. After changing the widget back to the correct setting, the search results were still incorrectly displaying the bad URL, even after re-indexing.
So, it looks like something is causing the widget to display the blog content as if it were supposed to open in an auto-generated page instead of . Any ideas?
Here is another oddity. I went into "Pages where BlogPost items are published" and moved the "News Article" page to #1 priority. I went back and checked 15 minutes later and the "News Article" page had completely vanished from that list, and now "CRH News" is listed as #1 priority.
*instead of an existing page.
If it helps to know, I have a few different blogs on the site, one of them being a library blog. So, I just went in to that blog and moved its page up to the top priority, not realizing that would change the priority for the news blog. I went back to check the news blog settings, and "News Article" had reappeared in "Pages where BlogPost items are published," and it was displayed at the bottom with the lowest priority.
This is likely part of the issue here (see attached). If I go to edit a blog post and click on More options > Allow multiple URLs for this item... the default URL listed is not correct. When creating a new blog, there doesn't seem to be a way to "tell" the blog that it's not going to display posts on an auto-generated page, correct? This seems like a bug.
The location where one specifies which page from the existing pages will display the blog post when clicked is done in the Blog posts widget, not the Blog itelf.
(cfr. Blog posts widget - http://docs.sitefinity.com/blog-posts-widget)
Also a bit more technically, by default Sitefinity uses the IContentLocatableView interface implemented on the out of the box content widgets in order to track their locations on different pages. This interface powers the Preview functionality from the content modules as well as the Search indexing and the correct resolving of the links in it.
When you click on the Preview button of a built-in content item, Sitefinity searches the page where you have placed the module's widget and then renders the item on its details page.
More on Locations of content items:
This said, I did notice that you mentioned you are only using version 8.1.
There was a bug which caused the urls not to render properly, which was fixed in Sitefinity Internal Build 8.2.5905.0.
Which could explain why I could not reproduce this behavior.
I therefor suggest to upgrade this version or higher to overcome this issue.
I hope the above information helps.
Thanks for clearing that up Dimitri. That sounds exactly like the problem I'm having. I'll see if our development partner can update our version.