mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #24146
[Bug 1412950] Re: Problem displaying page when two or more pages have the same clean url
I did a test on my local instance where I set up two pages:
A) page1 with urlid=page1
B) page2 with urlid=page2
I go to the db and check that the unique index is present
"view_urlowngroins_uix" UNIQUE, btree (urlid, owner, "group", institution)
I then update, via db, the urlid of [B] to 'page1' and the database lets
me.
This also works on mysql db
I note here: http://www.postgresql.org/docs/9.3/static/indexes-
unique.html
"Null values are not considered equal."
So I suspect that unique index is not working how we expect it to due
to 2 out of the four columns needing to be null.
I'm wondering if it would be better in mahara instead of having 'owner',
'group', 'institution' as three fields and requiring two of them to be
null at any one time we change it to 'owner', 'ownertype' where
ownertype can be mapped to an ownertype table containing
1=user,2=group,3=institution that way we wouldn't need to fuss with
nulls and that we can follow the ownership of group/institution items
better - eg what user made/edited a group or institution page.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1412950
Title:
Problem displaying page when two or more pages have the same clean url
Status in Mahara ePortfolio:
Incomplete
Bug description:
This occurred for a site using clean urls
A user had two pages containing the same cleanurl so that neither
could be displayed.
Got this error:
[WAR] c9 (lib/errors.php:747) get_record_sql found more than one row. If you meant to retrieve more than one record, use get_records_*, otherwise check your code or database for inconsistencies
I've been unable to replicate this problem via the system (only editing the db directly).
I've tried:
- copying a page
- copying a page from a collection
- exporting and then importing pages
- editing page 'title & description'
But none of these allow me to end up with a duplicate.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1412950/+subscriptions
References