Multiple mojoPortals with the same database

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
11/10/2004 3:45:00 AM
Gravatar
Total Posts 12

Multiple mojoPortals with the same database

Hi!

Congratulations for the excellent work!

I've got a Brinkster account and would like to setup two isolated MojoPortals. There is a limit of one web application only (the same bin and webconfig.xml for all?) and only one database.

I would suggest adding support for this if possible, or I'll try to add it. :-)

Thanks for the attention! Great product!As soon as I have my site working, I post the link.

Best regards,
Cesar
11/10/2004 3:45:49 AM
Gravatar
Total Posts 12

Re: Multiple mojoPortals with the same database

About the database support, it would be nice to allow setting up the prefix for the tables.

Cesar
11/10/2004 5:45:26 AM
Gravatar
Total Posts 18439

Re: Multiple mojoPortals with the same database

Hi Cesar,

Thanks for the suggestions. I appreciate all ideas and feedback.

I might consider implementing multiple sites using the same code and db at some point. If you implement it and want to share, send me the code and I'll take a look. Rainbow Portal has that feature and I've used it before and could see how that would have some value for some users.

As far allowing custom prefixes to table names, what would be the benefit of that? It would be very difficult to implement so it would have to have some big benefit to make it worth doing. The reason it would be difficult is that it would break all the MS SQL stored procedures and all the SQL statements in the MySQL data layer so they would all have to be corrected to use the new prefixes and the MySQL data layer would have to be re-compiled. And if I were to allow custom prefixes on the MS SQL Stored procedures it would break the MS SQL data layer code because they are coded with specific names. I think it would also increase possibilities for errors and make it more difficult to provide support.

One of my goals is to keep things simple and only add complexity where it is needed for important features. I have to weigh the cost/benefits of all requests and choose carefully what is worth the development effort.

11/10/2004 6:23:44 AM
Gravatar
Total Posts 12

Re: Multiple mojoPortals with the same database

Thanks for the reply Joe!

My needs are very specific actually, for now I can just change the table names for MySql which is the DB I'm using. I don't think much people will have this kind of limitation. Anyway if I do something useful I send you the patches.

Best regards!
Cesar
11/12/2004 7:45:02 PM
Gravatar
Total Posts 12

Re: Multiple mojoPortals with the same database

Hi Joe,

I have installed my site. Here is the URL: http://mello.sentinelas.org 

I've done some small changes to the code so that it works under a subdir instead of the root of the site. But, I'm having a small problem setting up the Forums: when I try to browse the forums, a database authentication error is shown. Do you have any idea on why this happens? I'm not understanding, because everything else works ok with the database, with the same configuration.

 

Thanks. Best regards!

 

11/13/2004 2:06:02 AM
Gravatar
Total Posts 18439

Re: Multiple mojoPortals with the same database

Hi Cesar,

I checked out your site and I think the error is a permissions error as indicated. The missing permission would most likely be create table permission because the forum query has to create a temporary table to do the paging correctly. Most of the site does not use any temporary tables but the forums do so your connection string user needs this permission.

Hope that helps.

Joe
11/16/2004 4:43:15 PM
Gravatar
Total Posts 12

Re: Multiple mojoPortals with the same database

Hi Joe!

You were right, the problem was with permissions to create the temporary table. Well, I changed the code a bit so that a normal table with a random name is created. Hugly, but for now it's ok. :-)

Please take a look and register in my website. I disabled anonymous posts because a colleague of mine posted and the sender appeared to be Admin! I'm not sure what happened, but then I decided to allow only authenticated posts.

Best regards, and keep the excellent work!
Cesar
11/17/2004 2:09:23 AM
Gravatar
Total Posts 18439

Re: Multiple mojoPortals with the same database

Hi Cesar,

Yes I found the same bug about anonymous posts in my site a few days ago and turned off the anonymous posting. I posted about it in the bugs forum and will fix it for the next release. I think I meant to use userid -1 for "Guest" but accidently used userid 1 which is usually admin.

I registered on your site but when I try to go to the profile page to change my password I get an error. Its probably another bug I'll look into it and see if I can reproduce on my site and fix it.

I'll try to have these issues fixed soon.

Thanks,

Joe

11/17/2004 1:47:07 PM
Gravatar
Total Posts 12

Re: Multiple mojoPortals with the same database

Hi Joe!

About the problem with anonymous posts: I disabled anonymous posts so it's ok for me.

About the problem when clicking "My Profile": it was caused due to the field TimeOffsetHours being NULL by default, failing in mojoPortal.Business.SiteUser.GetUser(string email) line 256 with an invalid conversion to Int32. In my version I changed it to:

                this.timeOffsetHours = reader["TimeOffsetHours"] == DBNull.Value ? 0 : Convert.ToInt32(reader["TimeOffsetHours"]);

Again, quick and dirty but it's working now for my needs. :-)

Thank you for the attention, best regards!
Cesar
11/17/2004 1:48:04 PM
Gravatar
Total Posts 12

Re: Multiple mojoPortals with the same database

Please try to register again in my website. I deleted your user so you can register again.

Thanks!
Cesar
11/17/2004 3:28:49 PM
Gravatar
Total Posts 18439

Re: Multiple mojoPortals with the same database

Hi Cesar,

I re-registered with your site and it is fixed there. On my db there is a default of 0 on the TimeOffset column. It must not have made it into the script for creating tables. I'll fix it for the next release.

Your site is looking good, glad to see someone using mojoPortal!

Best Regards,

Joe

You must sign in to post in the forums. This thread is closed to new posts.