get_record() not dying when it finds 2 pages with same urlid

Bug #1521409 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Robert Lyon
15.04
Won't Fix
Medium
Unassigned
15.10
Fix Released
Medium
Robert Lyon

Bug Description

When we were dealing with Bug 1515929 we decided not to make the site die when get_record returned more than one row. In that case it was fine as the multiple rows were effectively the same data.

In the case of fetching a view by it's urlid we still need to make the site die as the views will be different and it will confuse a user as to why they do not get the page they expect some of the times

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/5810

Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :

Hi,

I am having issues trying to test this.

I got this error on a MySQL database.

It worked fine on postgres.

Cheers,
Jinelle

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

Tentatively setting this one to "Won't fix" for the older stable branches (15.04, 1.10), because it's only a medium issue.

If people think it would be a good idea to backport, or it's more urgent than I thought, feel free to change the bug status.

tags: added: cleanurls views
Revision history for this message
Robert Lyon (robertl-9) wrote :

Replying to #2

The screenshot in the bug report shows you going from version 1.9.7 to 16.04dev and it's complaining about trying to install 'socialprofile' plugin because it's already installed. But the thing is 'socialprofile' plugin doesn't exist in in 1.9.7, so I'm thinking the mysql database you used may not have been clean.

Can you please test again with a fresh mysql database.

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

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

commit 38a9d9a8064f8cb9e983a5995379a364b50af0e8
Author: Robert Lyon <email address hidden>
Date: Tue Dec 1 13:02:51 2015 +1300

Bug 1521409: get_record() needs to die

When we are trying to fetch a page by urlid and there are duplicates
as the pages will not be the same

behatnotneeded

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

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

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

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

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

commit 4042c018574a184481408d7eb59b136d15a4d7ee
Author: Robert Lyon <email address hidden>
Date: Tue Dec 1 13:02:51 2015 +1300

Bug 1521409: get_record() needs to die

When we are trying to fetch a page by urlid and there are duplicates
as the pages will not be the same

behatnotneeded

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

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