Site throws exception when accessed without default.aspx ?

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.
6/24/2010 11:52:49 PM
Gravatar
Total Posts 101

Site throws exception when accessed without default.aspx ?

 

Hi Joe,

Just upgraded to a new 2008 server and the latest mojo.  (running .NET 4.0/Integrated pool/32bit enabled)

All is OK.. Except when I try to access the site without default.aspx in the path I now get:

http://www.castlesoft.com.au/Error.htm?aspxerrorpath=/Blog/ViewPost.aspx

We're sorry but a server error has occurred while trying to process your request.

The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page.

The logs in the admin screen show:

2010-06-24 23:47:15,614 ERROR mojoPortal.Web.Global - 203.45.62.231-en-US - /
System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.BlogUI.BlogViewControl.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

Any ideas.. The site works fine with  http://www.castlesoft.com.au/default.aspx but not http://www.castlesoft.com.au

Regards

Andrew

6/25/2010 5:54:31 AM
Gravatar
Total Posts 18439

Re: Site throws exception when accessed without default.aspx ?

Hi Andrew,

I'm not seeing an error on your home page right now without the /default.aspx

The error posted could not be happening on the home page because mojoPortal.Web.BlogUI.BlogViewControl.Page_Load is coming from BlogViewControl which is only used on the blog post detail page not in the part of the blog that can go on a CMS page.

If you moved a blog feature from one page to another this error could happen when viewing a blog post detail page.

Best,

Joe

6/25/2010 7:55:16 AM
Gravatar
Total Posts 101

Re: Site throws exception when accessed without default.aspx ?

Hi Joe,

Yes its now fixed.. (Thanks). Tried everything today and couldn't get it to work.

I created a new test database/website and the exception didn't happen. Pointed that website to the database and bingo.. Crash.

My fix in the end was..

1) New database

2) New mojo install (latest version fresh from your site).

3) Copied my new skin into clean new install (old site was hacked/overwritten for 2yrs).\

4) Manually re-entered all pages/content into a fresh database.

All good.

I had been moving things around a lot in the old database.

Anyway.. All now good.

Regards

Andrew

 

PS.. My new theme/site is 80% complete. Still got some content to go below the rotating graphic on the frontpage and the content on the pages needs some filling. But overall the skin is now finished.  The section below the graphic will be tricky.. I'm planning on having content in content as per feature request and will probably write a new content module type. Been playing with joomla/rocketthemes/joomlaworks to see how they do content in content.

When my site is 100% done I'll send you a link.. I think it will look pretty cool when its finished. (but hey.. I'm biased.)

 

6/25/2010 7:59:00 AM
Gravatar
Total Posts 101

Re: Site throws exception when accessed without default.aspx ?

Hi Joe..

Forgot to ask 1 question.

In my fresh install.. If I want to copy all my blogs from the old site do I only need to grab the following tables:

mp_BlogCategories

mp_BlogComments

mp_BlogItemCategories

mp_Blogs

mp_BlogStats

Are there any other files/tables I need to worry about.

Thanks again.

Andrew

7/17/2010 2:02:32 PM
ulu
Gravatar
Total Posts 22

Re: Site throws exception when accessed without default.aspx ?

Well I've got the same situation here. I'm setting up a new upgraded site (from a very old version). My new address is http://new.sm-art.biz/ -- it doesn't work, but http://new.sm-art.biz/Default.aspx works just fine.

I'll be happy to provide any details and stuff.

ulu

7/18/2010 6:32:13 AM
ulu
Gravatar
Total Posts 22

Re: Site throws exception when accessed without default.aspx ?

oops it seems that the forum posts my messages as empty pieces (in FF), lets try IE.


Anyway, the problem is inside the UrlRewriterModule. The part where it says if (requestPath == appRoot) { return; } -- since requestPath = "/" and appRoot = "", it doesn't return here.

Instead, it looks for an empty string in the FriendlyUrls table, and when it finds one, it redirects. As it happens, I've got an empty FriendlyUrl for one of my blog posts, so it ended there.

I changed it to

if (requestPath == app.Request.ApplicationPath) { return; }

and now it works fine.

7/18/2010 9:40:22 AM
Gravatar
Total Posts 18439

Re: Site throws exception when accessed without default.aspx ?

Hi Ulu,

I think the real bug is that it should prevent any friendly url from being created with an empty string. Deleting that from url manager should also solve the problem. It is acceptable to have 1 and only 1 friendly url with / but it should not allow creating one with empty string. I will look into this and make it not allow that.

Thanks,

Joe

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