-
Bug
-
Resolution: Fixed
-
Critical
-
2.2.7, 2.3.4, 2.4, 2.5
-
None
-
MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
-
MDL-36741_master -
Noticed the following error while testing MDL-30377.
ERROR: Incorrect number of query parameters. Expected 4, got 0.
|
line 800 of /lib/dml/moodle_database.php: dml_exception thrown
|
line 1018 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params()
|
line 116 of /mod/forum/rsslib.php: call to mysqli_native_moodle_database->get_records_sql()
|
line 78 of /mod/forum/rsslib.php: call to forum_rss_newstuff()
|
line 168 of /rss/file.php: call to forum_rss_get_feed()
|
Steps to replicate:
- Visit <yoursite>/admin/settings.php?section=optionalsubsystems and check 'enable RSS feeds'.
- Visit <yoursite>/admin/settings.php?section=modsettingforum and set 'Enable RSS feeds' to 'yes' and check 'Timed posts'.
- On course page select Users -> Groups.
- Create multiple groups and assign a student to one of these groups.
- Create a new forum and set 'RSS feed for this activity' to 'Discussions', set 'Number of RSS recent articles' to 10 and set 'Group mode' to 'Separate groups'.
- Click on the forum activity and create a forum discussion called 'Past' and set it to expire some time in the past.
- Create another forum discussion called 'Future' and set it to start some time in the future.
- Create a bunch of other forum discussions that do not expire.
- As student, visit the forum discussion
- Under forum admin, click on 'RSS feed of discussions'
It will show the error.