Source code build missing "Data\Sites\1\systemfiles" folder causing error

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
11/20/2010 10:19:07 PM
Gravatar
Total Posts 1

Source code build missing "Data\Sites\1\systemfiles" folder causing error

•operating system: Win 7
•database platform: SQL Server 2008
•version of mojoPortal: Changeset 583

Downloaded "default" changeset with TortoioseHg, however, the systemfiles directory was not included in the "Web\Data\Sites\1\" folder.  This in turn caused an error to be thrown by TouchCacheFile function in the CacheHelder class when calling File.CreateText(pathToCacheFile).Close();

I added the following code just before the File.CreateText line to create the directory if its missing:

string directoryName = Path.GetDirectoryName(pathToCacheFile);
if (!Directory.Exists(directoryName))
{
Directory.CreateDirectory(directoryName);
}

11/22/2010 7:32:08 AM
Gravatar
Total Posts 18439

Re: Source code build missing "Data\Sites\1\systemfiles" folder causing error

There is already code in the mojoPortal setup routine to create the expected folders including the systemfiles folder when the site is created.

If you are working in VS debug mode it will of course break on errors and errors will occur until the site has been created, but if you just click continue (instead of stopping execution) on each error it should eventually redirect to the setup page where it would create the needed folders (assuming file system permissions are correct).

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