Registration: Force Terms and Conditions - error text

Bug #1239539 reported by Ghada El-Zoghbi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon
1.6
Fix Released
High
Robert Lyon
1.7
Fix Released
High
Robert Lyon

Bug Description

This is quite minor but I wanted to make a note of it somewhere.

When the user registers and are forced to accept the terms and conditions, the required error message that appears when they submit the form (without accepting the terms) comes up with:

You may not register unless you agree to abide by the <a href="terms.php">Terms and Conditions</a>.

with the raw html code for the link to the terms.php. It doesn't actually render the link.

Revision history for this message
Ghada El-Zoghbi (ghada-z) wrote :
Revision history for this message
Robert Lyon (robertl-9) wrote :

I've added a patch for this:
https://reviews.mahara.org/#/c/2610/

What it does is allow one to choose pieform to displat raw error string rather than escaping it.

This should be ok as the error strings it shows are taken from hard coded lang files.

Changed in mahara:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Robert Lyon (robertl-9)
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Marking as high importance, because this may be part of a user's first impression of Mahara.

Can it be replicated in 1.7, or is it a 1.8 regression?

Changed in mahara:
importance: Low → High
milestone: none → 1.8.0
Revision history for this message
Ghada El-Zoghbi (ghada-z) wrote :

Yes, it's also in 1.7. Please refer to attached screen shot.

Revision history for this message
Robert Lyon (robertl-9) wrote :

The link is escaped in 1.7 also.

But the funny thing is the terms and conditions are displayed below the form anyway so no need to click off to another page.

however the terms are displayed after any welcome message so it would be good to change the link in message to focus on the terms info: <a href="#acceptterms">Terms and conditions</a>

and have an <a name="acceptterms"></a> added before terms info

so I'll go and do that now

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Follow-up question: Does it also happen in 1.6? ;)

I'd ask about 1.5 as well, but since we're shortly ending support for 1.5 it's not as important.

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

Reviewed: https://reviews.mahara.org/2610
Committed: http://gitorious.org/mahara/mahara/commit/bf3d14a3949a203a9d37e1152bc1a1129357bfcd
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit bf3d14a3949a203a9d37e1152bc1a1129357bfcd
Author: Robert Lyon <email address hidden>
Date: Tue Oct 15 07:51:18 2013 +1300

Allowing pieform error text to not be escaped if needed (Bug 1239539)

Currently if there is html in an error message used by pieforms it
escapes the html so the link becomes not usable.

I have made a change where you can tell pieforms not to escape the
error message.

So instead of using:
$form->set_error($field, $message);

you can use:
$form->set_error($field, $message, false);

Where false means do not escape the message.

As the terms and conditions are displayed on the page already I've
updated the link to jump to the terms section

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

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

Reviewed: https://reviews.mahara.org/2632
Committed: http://gitorious.org/mahara/mahara/commit/bd33b9c8344aaf56d2b497699ce0bb4e579a4fbe
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.6_STABLE

commit bd33b9c8344aaf56d2b497699ce0bb4e579a4fbe
Author: Robert Lyon <email address hidden>
Date: Tue Oct 15 07:51:18 2013 +1300

Allowing pieform error text to not be escaped if needed (Bug 1239539)

Currently if there is html in an error message used by pieforms it
escapes the html so the link becomes not usable.

I have made a change where you can tell pieforms not to escape the
error message.

So instead of using:
$form->set_error($field, $message);

you can use:
$form->set_error($field, $message, false);

Where false means do not escape the message.

As the terms and conditions are displayed on the page already I've
updated the link to jump to the terms section

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

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

Reviewed: https://reviews.mahara.org/2631
Committed: http://gitorious.org/mahara/mahara/commit/b2eff2568144696497eea9a0ff699f5f88e8921d
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.7_STABLE

commit b2eff2568144696497eea9a0ff699f5f88e8921d
Author: Robert Lyon <email address hidden>
Date: Tue Oct 15 07:51:18 2013 +1300

Allowing pieform error text to not be escaped if needed (Bug 1239539)

Currently if there is html in an error message used by pieforms it
escapes the html so the link becomes not usable.

I have made a change where you can tell pieforms not to escape the
error message.

So instead of using:
$form->set_error($field, $message);

you can use:
$form->set_error($field, $message, false);

Where false means do not escape the message.

As the terms and conditions are displayed on the page already I've
updated the link to jump to the terms section

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

Aaron Wells (u-aaronw)
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.