Resolution: Won't Fix
Affects Version/s: 7.0.X, 7.1.X, Master
Fix Version/s: None
Component/s: Comments, Content Display Widgets > Web Content Display widget
- Use SQL Server as database.
- In a given site, add a Web Content Display to a page.
- Create a new web content
- Go to the portlet's Configuration > Content Metadata and choose Comments
- Add a comment
- Delete the comment
Expected: The comment is deleted.
Observed: The comment is not always deleted and and error message can appear informing that the action couldn't be carried out.
Note: It may take more than one try to reproduce the issue.
The problem lies in the precision used by SQL Server for fields of type DATETIME (a query is used when deleting the comment which makes a date comparison). Milliseconds are rounded to one of the possible values: .xx0 s, .xx3 s, .xx7 s. SQL Server 2008 introduced a new type, DATETIME2, increasing the accuracy to 100 ns.