-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.0.6 GA, 6.1.0 CE RC1
-
Fix Version/s: 6.0.X EE, --Sprint 12/11, 6.1.0 CE RC1
-
Component/s: Blogs, ~ [Archived] Collaboration
-
Branch Version/s:6.0.x
-
Backported to Branch:Committed
-
Git Pull Request:
When you view the details of a blogpost at the bottom there are next and previous links that allow you to navigate to the next and previous blog post
In some cases these links not work as expected
To reproduce :
1. Place the blog portlet on a page in an empty community
2. Create a blog with title blog 1 , set the display date to 1 sept 2011
3. Create a blog with title blog 2 , set the display date to 3 sept 2011
4. Create a blog with title blog 3 , set the display date to 2 sept 2011
Now you will have a blog with 3 posts, blog 2 will be on top, entry 3 will be below it and logically should be the previous blog post
5. Click on blog 2 to view the details
6. Press the previous link on the bottom
You will be redirected to blog 1, and not blog 3 as you would expect
The problem lies in the getByG_S_PrevAndNext method of BlogsEntryPersitenceImpl. It will generate the following query to retrieve the previous post
SELECT blogsEntry
FROM BlogsEntry blogsEntry
WHERE blogsEntry.groupId = ? AND blogsEntry.status = ? AND blogsEntry.displayDate <= ? AND blogsEntry.entryId <= ?
ORDER BY blogsEntry.displayDate DESC, blogsEntry.entryId DESC
The AND blogsEntry.entryId <= ? clause should not be there
- relates
-
LPE-7883 Next and previous links in Blogs portlet do not work as expected
-
- Closed
-