edit page has duplicated "addblock" in html tags

Bug #1806524 reported by Cecilia Vela Gurovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Lisa Seeto

Bug Description

when editing a page, if we inspect the html we can see there are two elements with the id="addblock". All id's in html tags should be unique.
We need to fix this either for the form that pop's up when adding a block to the page by clicking on the block menu, or fix it for the modal that contains it.

Tags: bite-sized
description: updated
Revision history for this message
Robert Lyon (robertl-9) wrote :

Low bugs don't need to be backported

no longer affects: mahara/18.10
no longer affects: mahara/18.04
no longer affects: mahara/17.10
tags: added: bite-sized
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/9663

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

Patch for "master" branch: https://reviews.mahara.org/9673

Revision history for this message
Steven (stevens-q) wrote :

Environment tested: Master
Browser tested: Chrome

PRECONDITIONS:
------------------------
1) Mahara user exists
2) developer tools are open to view the code

TEST STEPS:
------------------------
1) Log in as Mahara user
2) Create a portfolio page and add a block (any will do)
3) Using the dev tools confirm there are no duplicate ID's for "addblock" ✔

Catalyst QA Approved ✔

NOTE:
There is another duplicate ID on the page (id="view-wizard-controls")
Bug #1821995 reported - to be fix at a later date

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

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

commit 4337949e7d3e0b6f7c8a0d77a80d894cef493bad
Author: Lisa Seeto <email address hidden>
Date: Wed Mar 27 15:52:06 2019 +1300

Bug 1806524: edit page has duplicated "addblock" in html tags

updated form name to be newblock, modified js funcs to use new id

behatnotneeded

Change-Id: I1e898f6e4942442f0e3fbd6aa91d07e3dc238e04
Signed-off-by: Lisa Seeto <email address hidden>

Revision history for this message
Lisa Seeto (lisaseeto) wrote :

Bug had to be reopened to fix the following issue:

Kevin Dibble has posted comments on this change.

Change subject: Bug 1806524: edit page has duplicated "addblock" in html tags
......................................................................

Patch Set 1:

(1 comment)

https://reviews.mahara.org/#/c/9673/1/htdocs/js/views.js
File htdocs/js/views.js:

Line 999: $('#newblock .cancel, #newblock .deletebutton').on('mousedown keydown', function(e) {
Hi team.

The dialog box that appears cannot be closed by clicking the "x" at the top right anymore.

To get this issue - Just click the "text" box on the side (to add a new text box to the page) to get the dialog to appear. click the "X" at the top and nothing happens.

Putting this back to "#addblock .deletebutton" resolves as the delete button is outside the form.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/9677

Revision history for this message
Ghada El-Zoghbi (ghada-z) wrote :

Hi,

This change has introduced a bug in Mahara 19.04.0.

When the user adds a block (by clicking on the artefact - not drag/drop), the selection of the positions displays: 'After 1', 'After 2'

It doesn't actually display the artefact titles in the drop down as it used to in previous Mahara versions.

The fix is to update htdocs/js/view.js - line 496

* selectbox = $('#addblock_position'); -> selectbox = $('#newblock_position');

I don't actually have time to push this upstream. So, I leave it the Mahara team.

Thanks,
Ghada

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

Patch for "master" branch: https://reviews.mahara.org/10154

Revision history for this message
Steven (stevens-q) wrote :

BUG SUMMARY:

Bug had to be reopened to fix the following issue:
1) The dialog box that appears cannot be closed by clicking the "x" at the top right anymore.
2) Dialog doesn't actually display the artefact titles in the drop down as it used to in previous Mahara versions.

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

Commit hash: 3e87aac48617ddc6adfcaebdaa747f53579a4bbb
Environment tested: Master
Browser tested: Chrome
Theme used: Raw | Default raw | Ocean | Modern | Primary school

PRECONDITIONS:
------------------------
1) Portfolio page with 3 column layout exists as follows
   a) has a text block in top of first column
   b) has an image block under the text block in the first column
   c) has a comments block under the image block in the first column

TEST STEPS:
------------------------
1) Log in as Site admin
2) Edit the portfolio page as mentioned above
3) Click block type "Text" (do not use drag and drop functionality)
4) Verify that a dialog box is displayed ✔
5) Click the X icon in the top right of dialog box to close it
6) Verify that that clicking the X icon in the top right of dialog box to close it ✔
7) Click block type "Text" (do not use drag and drop functionality)
8) Verify the options in the dropdown field labeled Position are as follows ✔
   a) Top of cell ✔
   b) After "Text" ✔
   c) After "Image"
   d) After "Comments" ✔
9) Make the selection of After "Image" and click the add button in the dialog box
10) Flyout modal should display - fill in required fields and click Save
11) Verify that the text block is inserted after the image block ✔

Catalyst QA Approved ✔

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

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

commit 3e87aac48617ddc6adfcaebdaa747f53579a4bbb
Author: Liam <email address hidden>
Date: Thu Jul 11 13:45:24 2019 +1200

Bug #1806524: edit page has duplicated "addblock" in html tags

behatnotneeded

Change-Id: Ica5567f61330a85b94585b886568b796478c738d

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "19.04_STABLE" branch: https://reviews.mahara.org/10239

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

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

commit f3fab509a7ed9ed720cbd09dd367e4f061a3803f
Author: Liam <email address hidden>
Date: Thu Jul 11 13:45:24 2019 +1200

Bug #1806524: edit page has duplicated "addblock" in html tags

behatnotneeded

Change-Id: Ica5567f61330a85b94585b886568b796478c738d
(cherry picked from commit 3e87aac48617ddc6adfcaebdaa747f53579a4bbb)

no longer affects: mahara/19.04
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.