Placing feedback crashes with Call to undefined function group_get_default_artefact_permissions

Bug #800025 reported by Nigel McNie
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Melissa Draper

Bug Description

Mahara 1.3.6.

When logged in as the site administrator, and trying to place some feedback on a group view that they owned. No file was uploaded, and just the word 'Test' was entered into the feedback box.

Upon submission, I got this in the logs:
PHP Fatal error: Call to undefined function group_get_default_artefact_permissions() in /var/www/ewiesion.com/mahara/artefact/lib.php on line 834

Adding a require_once('group.php') at the top of artefact/lib.php fixed the issue.

Tags: bite-sized
Changed in mahara:
importance: Undecided → Medium
status: New → Triaged
tags: added: bite-sized
Changed in mahara:
importance: Medium → High
milestone: none → 1.4.1
Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

Hi Nigel,

I can't replicate this issue.

I was doing the following

Create new group
Create new page/view in group
View new page/view
Place feedback
Tried with both no attachment and with attachment

Works fine for me on 1.3_STABLE 1.4_STABLE and master (master it doesn't actually let me upload an attachment...)

Can you walk us through what you did to get the error?

Cheers,

Hugh

Changed in mahara:
assignee: nobody → Hugh Davenport (hugh-catalyst)
Changed in mahara:
status: Triaged → Incomplete
Revision history for this message
Nigel McNie (nigel-mcnie) wrote :

Was it a group view? And done with the site administrator?

Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

Yep,

all the above was done via site admin. Was a blank group view.

Revision history for this message
Nigel McNie (nigel-mcnie) wrote :

The only other thing is that the site was operating in German, the German langpack was installed. I can't see how that would have been a problem however.

I submit that you should just apply the fix anyway. That file mentions that function, therefore that file should have access to that function. require_once will prevent any problems, and there'll be plenty of other lower hanging performance fruit before you have to worry about an extra require_once.

Revision history for this message
Paul Tebbatt (paul-tebbatt) wrote :

We have been having a similar problem in.

The text box comes up fine when you are placing feedback but when you click "place Feedback" the page just hangs and nothing happens. We don't get any error messages at all.

Revision history for this message
Paul Tebbatt (paul-tebbatt) wrote :

My issue with the feedback was resolved by adding the SMTP details within the email section of site settings.

Revision history for this message
François Marier (fmarier) wrote :

I guess we may as well apply Nigel's fix.

Changed in mahara:
status: Incomplete → Triaged
milestone: 1.4.1 → 1.5.0
Melissa Draper (melissa)
Changed in mahara:
assignee: Hugh Davenport (hugh-catalyst) → Melissa Draper (melissa)
status: Triaged → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/615
Committed: http://gitorious.org/mahara/mahara/commit/64a62c24ddf5665d94d6a843c59cecfd3eae0586
Submitter: Hugh Davenport (<email address hidden>)
Branch: master

commit 64a62c24ddf5665d94d6a843c59cecfd3eae0586
Author: Melissa Draper <email address hidden>
Date: Fri Aug 26 17:09:46 2011 +1200

    Move group.php require_once call to top of lib.php (bug #800025)

    group.php functions are called in (at least) two places in the file
    but previously only required immediately before the first instance.
    This will cover all instances it's needed.

    Change-Id: I708bf88125859288640da33f1c805aa5e76ad8ca
    Signed-off-by: Melissa Draper <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Melissa Draper (melissa)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.