Upgrade from 18.10 produces warning from statistics.php

Bug #1827000 reported by Lisa Seeto on 2019-04-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Low
Cecilia Vela Gurovic
18.10
Low
Unassigned
19.04
Low
Unassigned
19.10
Low
Cecilia Vela Gurovic

Bug Description

When upgrading from 18.10.0_RELEASE, a warning was produced:

[WAR] 50 (lib/statistics.php:2408) count(): Parameter must be an array or an object that implements Countable

It is possibly an error with group_type_graph function.

version: 18.10.0 > upgrading
database: MySQL
browser: Firefox

Changed in mahara:
status: New → Confirmed
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
importance: Undecided → Low
Steven (stevens-q) wrote :

TITLE: Upgrade from 18.10 produces warning from statistics.php

BUG SUMMARY: When upgrading from 18.10.0_RELEASE, a warning was produced:

[WAR] 50 (lib/statistics.php:2408) count(): Parameter must be an array or an object that implements Countable

It is possibly an error with group_type_graph function.

version: 18.10.0 > upgrading
database: MySQL
browser: Firefox

==============================================

Commit hash: 486fad78c9e774e0bbb0d66882cc4cf60716d214
Environment tested: Master
Browser tested: Chrome | Firefox
Theme used: Raw

PRECONDITIONS:
------------------------
1) User is on version: 18.10.0 and upgrades site to 19.04.0_RELEASE
2) User database is: MySQL
3) User browser: Firefox | Chrome
4) User is using php version: 7.2.18
5) fresh database (only admin user)

TEST STEPS:
------------------------
1) Log in as admin user
2) Browse to Reports (Administration menu > Reports)
3) Configure the report as follows and submit
     a) Institutions = All institutions
     b) Report type = Content

EXPECTED RESULT: Expected to see a time period and Wording of "No statistics available"

ACTUAL RESULT: I am seeing an error messagebas follows and Mahara: Site unavailable "A nonrecoverable error occurred. This probably means you have encountered a bug in the system" see attached screenshot of error message git

NOTE: I could not trigger the original error message - most configurations returned a time period and Wording of "No statistics available" or minimal data. Report type = Content was the only thing that triggered error.

Reviewed: https://reviews.mahara.org/9944
Committed: https://git.mahara.org/mahara/mahara/commit/66f8ac10b85013371629ccbb07352c7c003dff7b
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 66f8ac10b85013371629ccbb07352c7c003dff7b
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu May 2 15:39:02 2019 +1200

Bug 1827000: count(): Parameter must be an array in statistics.php:2408

Also fixed problem on Content stats page when they have not been
generated by cron job

behatnotneeded

Change-Id: I6d1a1d5557ab99c9a1513196e2f83d7b2fb89e50

Mahara Bot (dev-mahara) wrote :

Patch for "18.10_STABLE" branch: https://reviews.mahara.org/10192

Reviewed: https://reviews.mahara.org/10192
Committed: https://git.mahara.org/mahara/mahara/commit/d2762fdcd83ff1633111a949768b2644f5531229
Submitter: Robert Lyon (<email address hidden>)
Branch: 18.10_STABLE

commit d2762fdcd83ff1633111a949768b2644f5531229
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu May 2 15:39:02 2019 +1200

Bug 1827000: count(): Parameter must be an array in statistics.php:2408

Also fixed problem on Content stats page when they have not been
generated by cron job

behatnotneeded

Change-Id: I6d1a1d5557ab99c9a1513196e2f83d7b2fb89e50
(cherry picked from commit 66f8ac10b85013371629ccbb07352c7c003dff7b)

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/10191
Committed: https://git.mahara.org/mahara/mahara/commit/d23c331bdc293b853a98c09f0a8601f478acbb5a
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.04_STABLE

commit d23c331bdc293b853a98c09f0a8601f478acbb5a
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu May 2 15:39:02 2019 +1200

Bug 1827000: count(): Parameter must be an array in statistics.php:2408

Also fixed problem on Content stats page when they have not been
generated by cron job

behatnotneeded

Change-Id: I6d1a1d5557ab99c9a1513196e2f83d7b2fb89e50
(cherry picked from commit 66f8ac10b85013371629ccbb07352c7c003dff7b)

Robert Lyon (robertl-9) wrote :

Will not backport to 18.04 as it doesn't backport cleanly

no longer affects: mahara/18.04
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers