This project has moved and is read-only. For the latest updates, please go here.

All users (X) All Portals in URL Rules table

Dec 13, 2013 at 8:57 PM
I noticed in the OpenUrlRewriter_UrlRule table that all users - even with deleted (marked TRUE for isDeleted in the userportal table) show up for EVERY portal in our installation (751). All users X all portals = lots of data - even when deleted.

This might be why our table is large (127k rows) Userid 1097 only had a profile for portal 0 - never for any of the other portals.

You can look in the table data I emailed (previously)

0 10 userid=1097 0 chrismarcic userid/1097 0
0 202 userid=1097 0 chrismarcic userid/1097 0
0 500 userid=1097 0 chrismarcic userid/1097 0
0 748 userid=1097 0 chrismarcic userid/1097 0
Dec 15, 2013 at 12:16 PM

I see indeed that all users are present in all portals.
This not normal.

I have checked the source code and also one of my sites.
It not happen.

Can you check your users table in the db (or admin, users) to see if all portals have also all users in it ?

Dec 16, 2013 at 1:47 AM
Correct, for example Userid 1097 has a single profile record for portal 0. There are only 85 user records in the users table.

However there is a gap of 1000 rows (1104 - 2104) in userid in the userportals table, but there is only a single row for userid 1097

1104 0 1836 2013-12-10 01:05:25.060 True False False
2104 0 2836 2013-12-10 11:55:30.570 False False False
Dec 17, 2013 at 4:26 PM

I changed the way to retrieve the users of a portal in new beta version 1.1.3
Can you check if this resolve your problem.

You have to check in the cache.

Because the stored rules are never deleted (to redirect old urls to new urls).

Or you have to delete stored urls. But then you loose your history for redirection, if it apply for you.

Dec 18, 2013 at 4:12 AM
I upgraded and deleted all the stored urls. It's still creating a record for every user and every portalid, so 84 users times 751 portals or 63k records for just the userid parameters. Shall we try again?
Dec 19, 2013 at 7:41 AM
I've looked at the data a bit and I see something that may be a clue.

The query I ran for many usernames was select *
FROM OpenUrlRewriter_UrlRule
WHERE (PortalId = 0) AND (Url = 'username')

I get no search results with the query for any 'username' that exists in portal 0.

However running
FROM OpenUrlRewriter_UrlRule
WHERE (Url = 'username')

I get 749 results for each 'username' and all the portalids listed DO NOT have the username or userid registered for the portal. So the usernames for portal 0 are being multiplied across all the portals they are NOT registered in.

Hope this helps
Dec 19, 2013 at 10:59 AM

I have try to reproduce your issue. But i can't.

I have checked the code.

Do you maybe use PortalGroups ?
Can you check your PortalGroups table in the database?

Can you have a look in the OpenUrlRewriter cache (in the admin module) to see if there all duplicate users also exists ?

Dec 19, 2013 at 10:39 PM
Edited Dec 19, 2013 at 10:44 PM
Yes we do. We have 1 portalgroupid (1) which is masterportalid1. All the repeat records are in portals 1+. All portals (except 0) are marketing sites, and not actually logged into by any staff other than host - in other words there are no portalusers other than for portal 0.

The OpenURLRewriter cache does NOT have duplicate entries.

Sounds like a clue. Good job.
Dec 19, 2013 at 10:50 PM

Ok so find the reason why all records are duplicated.

For DNN all users are present on all portals (UserController.GetUsers(PortalId)).

I don't have experience with portal groups.

Are the user profile pages accessible from each portal ?
I mean is this the way DNN normally work.

If it have no sense for you to have all users profile accessible from each website then
you can deactivate the openurlrewriter user provider on each website.
(You can do it also by update the records in the portalsettings table.)

Is this a solution for you ?

Dec 20, 2013 at 4:22 AM
Edited Dec 20, 2013 at 4:48 AM
We have the user profile page in all the portals, but only the host can login on any of the sites, so no one can see their profile on any portal except 0. And the UserPortals table has the list of which userid has access to which portal - no one but an admin and host can authenticate on portals >0

Since none of the users have access (login) to the other portals, if the portal setting in the database can be changed, then yes, this is fine. However I only see Settings for portal 0, and none for any other portals:

0 OpenUrlRewriter_DisablePrivacyIndex False 1
0 OpenUrlRewriter_DisableSiteIndex False 1
0 OpenUrlRewriter_DisableTermsIndex False 1
0 OpenUrlRewriter_LogAuthentificatedUsers False 1
0 OpenUrlRewriter_LogEachUrlOneTime True 1
0 OpenUrlRewriter_LogEnabled False 1
0 OpenUrlRewriter_LogStatusCode200 False 1
0 OpenUrlRewriter_W3C False 1

Until I login and change a setting in that portal from the default and update. Then the 8 items are added. Since all but one is 'false' by default is there a faster way to approach this rather than logging into hundreds of portals?
Dec 20, 2013 at 10:26 AM

The name of the setting is :