SkinFolderScript is not working

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.
5/16/2012 10:13:04 AM
Gravatar
Total Posts 3

SkinFolderScript is not working

I tried to make portal:SkinFolderScript work, but it never happens. I also read the documentation. So, I checked the code and I think I found a bug.

  • Operating System: Windows 7 64-Bits
  • Server: IIS 6
  • Database: SQLite
  • Version: 2.3.8.5

My code was:
<portal:SkinFolderScript ID="script" runat="server" ScriptFileName="script.js" />

And it's located at:
C:\inetpub\wwwroot\mojoportal\Web\Data\Sites\1\skins\MyCustomSkin\layout.Master

The javascript file is located at
C:\inetpub\wwwroot\mojoportal\Web\Data\Sites\1\skins\MyCustomSkin\script.js

And its content was:
alert('loaded');

The source file is \Web\Controls\SkinFolderScript.cs

string scriptUrl... produce:
/mojoportal/Web/Data/Sites/1/skins/MyCustomSkin/script.js

But Page.Server.MapPath("~" + scriptUrl) produce:
C:\inetpub\wwwroot\mojoportal\Web\mojoportal\Web\Data\Sites\1\skins\MyCustomSkin\script.js

Possible Fix:

Replace line:
if(!File.Exists(Page.Server.MapPath("~" + scriptUrl))) { return; }

With:
if(!File.Exists(Page.Server.MapPath(scriptUrl))) { return; }

Well, I hope you can reproduce these steps, and find the bug.

Have a nice day and thanks in advance.

5/16/2012 2:05:29 PM
Gravatar
Total Posts 18439

Re: SkinFolderScript is not working

Hi,

Yes, I agree with your fix. This is now fixed in the source code repository.

Thanks,

Joe

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