← Back to team overview

mahara-contributors team mailing list archive

[Bug 1712681] Re: New topic in forum: createtopicusers error

 

Bug description: Creating a new topic in forum is throwing an warning
message

Environment to be tested: Master branch
Browser testing: Not applicable

Precondition Note: This is happening for groups on a Mahara site that
has been upgraded for several years. So to replicate the issue, the
database is manipulated.

Preconditions:

1. The group ‘Group A’ exists and the user ‘admin’ is the group admin in that group.
2. A second user, UserA, is a regular group member in the group.
3. Change the config file to  ‘productionmode = false;’

Steps to reproduce:

1. Log in to the database using the following command (assuming Postgres as database):
sudo -u postgres psql 'name of the database' 
2. Validate the 'Field name' and 'Forum number' using below query in database.
select * from interaction_forum_instance_config;
3.Delete ‘Forum instance’ from the table using below query in database.
delete from interaction_forum_instance_config where field='createtopicusers' and forum=30;
4. Log in to Mahara as a group admin.
5. Navigate to Main menu > Groups.
6. Select ‘Forums’ tab.
7. Click on ‘General discussion’ forum.
8. Select ‘New topic’ button.
9. Similarly, log in as ‘User A’ and repeat steps 5 to 8.

Expected Result: New topic form should open without any error/warning messages.
Actual Result: New topic form opened without any error/warning message.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1712681

Title:
  New topic in forum: createtopicusers error

Status in Mahara:
  In Progress
Status in Mahara 17.04 series:
  Confirmed
Status in Mahara 17.10 series:
  In Progress

Bug description:
  When we have old groups, the Forums may not have the
  'createtopicusers' property defined in the config. So the following
  error happens:

  When I want to create a topic in "Open Discussion" (I am a group
  admin), I get the following warning:

  [WAR] bd (interaction/forum/edittopic.php:70) Undefined index: createtopicusers
  Call stack (most recent first):

  log_message("Undefined index: createtopicusers", 8, true, true, "/var/www/mahara-org-testing-mahara/releases/201708...", 70) at /var/www/mahara-org-testing-mahara/releases/20170816213625/lib/errors.php:521
  error(8, "Undefined index: createtopicusers", "/var/www/mahara-org-testing-mahara/releases/201708...", 70, array(size 65)) at /var/www/mahara-org-testing-mahara/releases/20170816213625/interaction/forum/edittopic.php:70

  [WAR] bd (interaction/forum/edittopic.php:70) Trying to get property of non-object
  Call stack (most recent first):

  log_message("Trying to get property of non-object", 8, true, true, "/var/www/mahara-org-testing-mahara/releases/201708...", 70) at /var/www/mahara-org-testing-mahara/releases/20170816213625/lib/errors.php:521
  error(8, "Trying to get property of non-object", "/var/www/mahara-org-testing-mahara/releases/201708...", 70, array(size 65)) at /var/www/mahara-org-testing-mahara/releases/20170816213625/interaction/forum/edittopic.php:70

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1712681/+subscriptions


References