View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
19140Bug reportsUsability/user experiencepublic2023-10-30 10:54
Reporterbaltzis Assigned Tomfavetti  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version6.2.x 
Summary19140: Problem with viewing LimeSurvey notifications
Description

Strangely, LimeSurvey notifications, which can be accessed via the bell icon in the top right corner of the menu, work normally and appear in a form on the screen in one installation but not in another. On the other installation, I click on the notification to display it, but nothing happens (image 01), even though everything else seems to work fine. Also, in the problematic case, notifications are not deleted no matter how many times I press "Delete". They still show up as unread, but I cannot read them.
On the other installation, when I click on the notification (image 02), the full text shows up in a form (image 03)
Any advise will be most appreciated.

Some info about these installations:
A. The "normal" one
Operating system: Linux 4.15.0-213-generic #224-Ubuntu SMP
PHP version: 7.4.33
Web server software: Apache
Database: mysql
Database driver version: mysqlnd 7.4.33

B. The "problematic" one
Operating system: Linux 5.15.0-76-generic #83-Ubuntu SMP
PHP version: 8.1.2-1ubuntu2.14
Web server software: Apache/2.4.52 (Ubuntu)
Database driver: mysql
Database driver version: mysqlnd 8.1.2-1ubuntu2.14

Steps To Reproduce

Steps to reproduce

  1. Click on the bell icon in the right corner of the LimeSurvey menu bar
  2. In the notification list that appears, click on any notification (if any)

Expected result

A form appears with the full text of the notification.

Actual result

Nothing happens. The user cannot see the full text of the notification

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)Community Edition Version 6.2.9+230925
I will donate to the project if issue is resolvedNo
BrowserChrome, Firefox, Microsoft Edge
Database type & versionmysql, Database driver version: mysqlnd 8.1.2-1ubuntu2.14
Server OS (if known)Linux 5.15.0-76-generic #83-Ubuntu SMP
Webserver software & version (if known)Apache/2.4.52 (Ubuntu)
PHP Version8.1.2-1ubuntu2.14

Relationships

related to 18776 closedmfavetti Question ordering not correct 

Users monitoring this issue

duvemyster, mfavetti

Activities

mfavetti

mfavetti

2023-10-03 00:33

developer   ~77481

Reproduced.

This is also caused by the change in PHP 8.1 of returning int/float for numbers from database instead of string.

In the permissions check, the application casts the user id to string (presumably to compare with the string returned from db) but now its comparing int to string instead of string to string and it uses a strict equality check. So even if the user id is correct, it will always raise the 403 exception.

We don't want to break compat with 8.0 I imagine, so we can't just drop the cast to string. Could explicitly cast both to int. It seems like the codebase needs to be audited for effects of this change in PHP 8.1.

Affects 5.x and 6.x on PHP >= 8.1

mfavetti

mfavetti

2023-10-12 10:20

developer   ~77652

PR for 5: https://github.com/LimeSurvey/LimeSurvey/pull/3537
PR for 6: https://github.com/LimeSurvey/LimeSurvey/pull/3523

mfavetti

mfavetti

2023-10-23 18:40

developer   ~77888

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35656

mfavetti

mfavetti

2023-10-23 18:56

developer   ~77890

Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35657

LimeBot

LimeBot

2023-10-30 10:54

administrator   ~78125

Fixed in Release 5.6.43+231030

Related Changesets

LimeSurvey: master 58effe29

2023-10-23 20:40

mfavetti

Committer: GitHub


Details Diff
Fixed issue 19140: Problem with viewing LimeSurvey notifications (03523)

Co-authored-by: Matthew Favetti <mpfavetti@ucdavis.edu>
Affected Issues
19140
mod - application/controllers/admin/NotificationController.php Diff File

LimeSurvey: 5.x a93f9072

2023-10-23 20:54

mfavetti

Committer: GitHub


Details Diff
Fixed issue 19140: Problem with viewing LimeSurvey notifications (#3537) Affected Issues
19140
mod - application/controllers/admin/NotificationController.php Diff File

Issue History

Date Modified Username Field Change
2023-09-29 21:07 baltzis New Issue
2023-09-29 21:07 baltzis File Added: 03_Notification_shown_normally_2023-09-29.png
2023-09-29 21:07 baltzis File Added: 01_Notification_list_2023-09-29.png
2023-09-29 21:07 baltzis File Added: 02_Notification_list2_2023-09-29.png
2023-09-30 17:58 duvemyster Issue Monitored: duvemyster
2023-09-30 17:58 duvemyster Bug heat 0 => 2
2023-10-03 00:33 mfavetti Note Added: 77481
2023-10-03 00:33 mfavetti Bug heat 2 => 4
2023-10-03 01:03 mfavetti Issue Monitored: mfavetti
2023-10-03 01:03 mfavetti Bug heat 4 => 6
2023-10-03 20:58 mfavetti Relationship added related to 18776
2023-10-12 10:20 mfavetti Note Added: 77652
2023-10-20 11:31 tibor.pacalat Assigned To => p_teichmann
2023-10-20 11:31 tibor.pacalat Status new => ready for code review
2023-10-23 18:40 mfavetti Changeset attached => LimeSurvey master 58effe29
2023-10-23 18:40 mfavetti Note Added: 77888
2023-10-23 18:40 mfavetti Assigned To p_teichmann => mfavetti
2023-10-23 18:40 mfavetti Resolution open => fixed
2023-10-23 18:56 mfavetti Changeset attached => LimeSurvey 5.x a93f9072
2023-10-23 18:56 mfavetti Note Added: 77890
2023-10-23 20:11 mfavetti Status ready for code review => resolved
2023-10-30 10:54 LimeBot Note Added: 78125
2023-10-30 10:54 LimeBot Status resolved => closed
2023-10-30 10:54 LimeBot Bug heat 6 => 8