Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16318

Read status is wrong the first time the user notifications are displayed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 10.11.6, 11.3-rc-1
    • 11.2, 10.11.4
    • Notifications
    • Windows 10 Pro 64 bit, Edge 18, using a local instance of XWiki 10.11.5 on PostgreSQL 10
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE

      1. Login as Admin
      2. Set all Notifications to ON
      3. Watch the wiki
      4. Login as another user (e.g. U1)
      5. Create/update/comment/delete a page
      6. Login as Admin
      7. Mark 2 events as read
      8. Refresh the page

      EXPECTED RESULTS

      The notification list displays 4 events out of which 2 are marked as read.

      ACTUAL RESULTS

      All events are displayed as unread, even if the counter shows 2. If the events marked as read previously are marked as read once again, the following stacktrace is displayed in console:

      2019-04-09 15:18:06,500 [http://localhost:1013/xwiki/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain] WARN o.h.u.JDBCExceptionReporter - SQL Error: 0, SQLState: 23505 2019-04-09 15:18:06,500 [http://localhost:1013/xwiki/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain] ERROR o.h.u.JDBCExceptionReporter - Batch entry 0 insert into activitystream_events_status (ases_read, ases_eventid, ases_entityid) values ('TRUE', '2011965706-1554799477000-zYAv5tRK', 'xwiki:XWiki.ILIE') was aborted: ERROR: duplicate key value violates unique constraint "activitystream_events_status_pkey"  Detail: Key (ases_eventid, ases_entityid)=(2011965706-1554799477000-zYAv5tRK, xwiki:XWiki.ILIE) already exists. Call getNextException to see other errors in the batch. 2019-04-09 15:18:06,505 [http://localhost:1013/xwiki/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain] WARN o.h.u.JDBCExceptionReporter - SQL Error: 0, SQLState: 23505 2019-04-09 15:18:06,506 [http://localhost:1013/xwiki/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain] ERROR o.h.u.JDBCExceptionReporter - ERROR: duplicate key value violates unique constraint "activitystream_events_status_pkey"  Detail: Key (ases_eventid, ases_entityid)=(2011965706-1554799477000-zYAv5tRK, xwiki:XWiki.ILIE) already exists. 

       

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: