[9.11.8] Problem with Turn On Notification when notifications.emails.enabled = false


Version 9.11.8. When in xwiki.properties I set notifications.emails.enabled = false then I can’not Turn On/Off notifications in my profile. I get error:

HTTP Status 500 - org.apache.velocity.exception.MethodInvocationException: Invocation of method ‘saveNotificationPreferences’ in class org.xwiki.notifications.preferences.script.NotificationPreferenceScriptService threw exception org.xwiki.notifications.NotificationException: Failed to save preferences for notifications given as JSON. at 46:xwiki:XWiki.Notifications.Code.NotificationPreferenceService[line 25, column 36]

I check JSON and see that instead boolean true or false in email section strange value:


{“jQuery222012375129411509441”:{“olddisplay”:“table-row”}},“selector”:".notificationTypeCell[data-format=“email”] .notificationTypeCheckbox"}},


Could you paste the whole error message returned with the 500 status?

Hi, full log here (39.1 KB)

Thanks. Indeed the JSON you pasted is very odd. I’ll try to reproduce.

Bug is confirmed. I have created the following issue and I am currently fixing it:

Fixed. To fix your wiki, you need to import the following xar in your wiki:

See documentation if you don’t know how to do it:

1 Like

With tests? :slight_smile:

I haven’t checked but we’ve had lots of bugs and regressions in the notifications feature in the past and I was wondering if we have a strong test suite for it? It seems it might be needed, seen it’s a complex topic.