Site is closed (related sites)

This is a place to discuss how to adapt mojoPortal to the needs of different cultures. Before asking questions here please first review the localization documentation.

This thread is closed to new posts. You must sign in to post in the forums.
1/10/2012 9:25:53 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Site is closed (related sites)

Hi Joe,

a new useful flag was recently introduced in Site Settings > Security to close a site for maintenance operation.

This flag is placed in the Main tab of Security Settings.

Ideally, when you close a multilanguage folder-based site for maintenance you are supposed to close all the sites of the whole mojoPortal installation, but currently when you close the main site all the other sites remain open, which could be right if you have a multisite installation where other site's security is not related to the main one.

Now if you have a second language sub-folder based site related to the main one, it is not possible to close it for maintenance because the Site Settings > Security > Main tab is not visible from the additional Site Settings.

Perhaps, if it is not possible to close all sites of an installationat once, the flag should be better placed at site level (General Tab ?), in order to let the administrator operate the closing at each site level.

Thanks.

Diego 

1/11/2012 9:09:20 AM
Gravatar
Total Posts 18439

Re: Site is closed (related sites)

Hi Diego,

This is now fixed in the source code repository so it will be fixed in the next release.

Thanks,

Joe

1/11/2012 1:23:50 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Site is closed (related sites)

Hi Joe, in looking at the description of the code changes, it says your change takes effect if running in related sites mode. Would you be open to adding a key so we can use this enhancement even though we don't use related sites mode? When we upgrade we'd also like to close all of our sites in one swoop, since they are in a single installation. Or maybe it could even be a checkbox at the master site level that says "close all sites for this installation"?

Thanks,
Jamie

1/11/2012 1:39:25 PM
Gravatar
Total Posts 18439

Re: Site is closed (related sites)

Hi Jamie,

I understand that would be convenient but the place where its implemented is only executed when using related sites mode and I don't want to add something more complicated to meet that goal. In general when not using related sites mode the sites are independent and I don't want to start coding in little exceptions.

The main purpose of the close sites feature is so one could be creating the site content before it goes live to the public. It is not really reliable for upgrades though it might work for some upgrades it will not work when they involve updates to SiteSettings or SiteUsers tables because in those cases the sitesettings or site user cannot be loaded until after setup runs because errors will occur due to the schema changes, stored proc changes etc. So in those cases we can't check if the site is closed and we can't check if the user is allowed to view the closed site until after the setup page runs and gets the db back in synch.

For upgrades the safest way is to use an app_offline.htm file while uploading the new files then remove it and immediately visit setup page.

You could also execute a query to close the sites all at once and then touch Web.config to clear the site settings cache, or really as soon as you start uploading files it will clear the cache. Or you could implement a simple custom module to close all the sites and clear the sitesettings cache for each site if you really need that capability, I just don't see it as something I should bake in at this point.

Best,

Joe

1/11/2012 2:39:47 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Site is closed (related sites)

Thanks for the explanation, Joe, that makes sense. I think the app_offline.htm file would make the most sense for us, so I'll play around with that a bit.

Jamie

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