Error in site statistics

Bug #1702434 reported by Juan Menéndez
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Undecided
Cecilia Vela Gurovic
16.04
Fix Released
High
Unassigned
16.10
Fix Released
High
Unassigned

Bug Description

Mahara version = 16.10.4

When I click in site statistics, specifically in "pages"(views), :

https://example-url-mahara/admin/statistics.php?type=views

I get the following error:

"Mahara: Site unavailable.
A nonrecoverable error occurred. This probably means you have encountered a bug in the system."

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Can you please check your error log and post the full error here? I can't replicate the issue.

Changed in mahara:
status: New → Incomplete
Revision history for this message
Juan Menéndez (juan-menendez) wrote :

The error log has not logged any errors.
I attach a screenshot where you can see this error.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Juan. Thank you for the screenshot. That is a generic error message on the front-end that is typically accompanied by a more explicit one in the error log. Sometimes, you need to navigate away from the page in order for the error message to show up.

If you are on a testing instance, you could turn on the debug mode and print error messages to the screen. Without any error message and not being able to replicate the issue, it's hard to find the cause.

In your config.php you can add the following:

$cfg->productionmode = false;

Or if you want to be more discerning, check out /lib/config-defaults.php to see the other options.

Revision history for this message
Juan Menéndez (juan-menendez) wrote :

Hi Kristina.

I have already added "productionmode = false" in my config.php.
Now I attach a new screenshot where you can see the new page of errors that appears when I click on "Site statistics - Pages"

Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Mahara 16.10.4 with a clean DB

Go to Administration -> Site statistics -> Pages

we see the error:

[WAR] 44 (lib/user.php:1914) Undefined variable: id
Call stack (most recent first):

    log_message("Undefined variable: id", 8, true, true, "/home/ceciliavg/maharacode/mahara/htdocs/lib/user....", 1914) at /home/ceciliavg/maharacode/mahara/htdocs/lib/errors.php:513
    error(8, "Undefined variable: id", "/home/ceciliavg/maharacode/mahara/htdocs/lib/user....", 1914, array(size 4)) at /home/ceciliavg/maharacode/mahara/htdocs/lib/user.php:1914
    profile_url(false, false) at /home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:5907
    View->get_url(false) at /home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:5356
    View::get_extra_view_info(array(size 7), false, false) at /home/ceciliavg/maharacode/mahara/htdocs/lib/registration.php:1240
    view_stats_table(10, 0) at /home/ceciliavg/maharacode/mahara/htdocs/lib/registration.php:1175
    view_statistics(10, 0) at /home/ceciliavg/maharacode/mahara/htdocs/admin/statistics.php:60

[WAR] 44 (lib/user.php:1918) profile_url called with no user id
Call stack (most recent first):

    profile_url(false, false) at /home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:5907
    View->get_url(false) at /home/ceciliavg/maharacode/mahara/htdocs/lib/view.php:5356
    View::get_extra_view_info(array(size 7), false, false) at /home/ceciliavg/maharacode/mahara/htdocs/lib/registration.php:1240
    view_stats_table(10, 0) at /home/ceciliavg/maharacode/mahara/htdocs/lib/registration.php:1175
    view_statistics(10, 0) at /home/ceciliavg/maharacode/mahara/htdocs/admin/statistics.php:60

Changed in mahara:
milestone: none → 16.10.5
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.10_STABLE" branch: https://reviews.mahara.org/7875

Changed in mahara:
status: Incomplete → In Progress
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.5 → none
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/7901

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7875
Committed: https://git.mahara.org/mahara/mahara/commit/25f925851fcee3fe6b244313ae12bfb4d971c28d
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 25f925851fcee3fe6b244313ae12bfb4d971c28d
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Jul 17 09:01:07 2017 +1200

Bug 1702434: fix error on site statistics pages

behatnotneeded

Change-Id: Ib39b2c3f570d1a7ea5777d19200683682697d7e8

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7901
Committed: https://git.mahara.org/mahara/mahara/commit/d9ea78c1321e99064809a297f3f2f09476d3a6e6
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit d9ea78c1321e99064809a297f3f2f09476d3a6e6
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Jul 17 09:01:07 2017 +1200

Bug 1702434: fix error on site statistics pages

behatnotneeded

Change-Id: Ib39b2c3f570d1a7ea5777d19200683682697d7e8

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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