Static pages gives js error

Bug #1638733 reported by Robert Lyon on 2016-11-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Unassigned
15.10
Medium
Unassigned
16.04
Medium
Unassigned
16.10
Medium
Unassigned
17.04
Medium
Unassigned

Bug Description

I get this error:

TypeError: $(...) is null
 if ($('editsitepage_pageusedefault').checked == true) {

This is because the 'use default' option is not present on the site static pages but is on the institution static pages.

Need to detect if the element exists before trying to find it's 'checked' status

Robert Lyon (robertl-9) on 2016-11-03
Changed in mahara:
status: New → In Progress

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

commit de61fbccc484382a88a1a7a2500e3f74ed6d6095
Author: Robert Lyon <email address hidden>
Date: Thu Nov 3 11:25:19 2016 +1300

Bug 1638733: Static pages save - need to check if element is present

On institution static pages we have the 'use default' option but that
is not present on the site static pages

So we need to check for it correctly in javascript

behatnotneeded

Change-Id: Ifb063083dc5e77f890441f269478d3e9e851be4e
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

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

Mahara Bot (dev-mahara) wrote :

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/7280

Robert Lyon (robertl-9) on 2016-11-28
no longer affects: mahara/15.04

Reviewed: https://reviews.mahara.org/7280
Committed: https://git.mahara.org/mahara/mahara/commit/802d3f64ddddc2bda865d49d99ac604dbf4f7451
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE

commit 802d3f64ddddc2bda865d49d99ac604dbf4f7451
Author: Robert Lyon <email address hidden>
Date: Thu Nov 3 11:25:19 2016 +1300

Bug 1638733: Static pages save - need to check if element is present

On institution static pages we have the 'use default' option but that
is not present on the site static pages

So we need to check for it correctly in javascript

behatnotneeded

Change-Id: Ifb063083dc5e77f890441f269478d3e9e851be4e
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit de61fbccc484382a88a1a7a2500e3f74ed6d6095)

Mahara Bot (dev-mahara) wrote :

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

commit 912b9279cd129a81dc02a61597a2bc90390f126b
Author: Robert Lyon <email address hidden>
Date: Thu Nov 3 11:25:19 2016 +1300

Bug 1638733: Static pages save - need to check if element is present

On institution static pages we have the 'use default' option but that
is not present on the site static pages

So we need to check for it correctly in javascript

behatnotneeded

Change-Id: Ifb063083dc5e77f890441f269478d3e9e851be4e
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit de61fbccc484382a88a1a7a2500e3f74ed6d6095)

Mahara Bot (dev-mahara) wrote :

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

commit 6d410bf980a84b13263d46109e1c69bac885e9d8
Author: Robert Lyon <email address hidden>
Date: Thu Nov 3 11:25:19 2016 +1300

Bug 1638733: Static pages save - need to check if element is present

On institution static pages we have the 'use default' option but that
is not present on the site static pages

So we need to check for it correctly in javascript

behatnotneeded

Change-Id: Ifb063083dc5e77f890441f269478d3e9e851be4e
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit de61fbccc484382a88a1a7a2500e3f74ed6d6095)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers