'Rate this Item' Object ref. not set to an instance...

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
dave_reach
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 32
Joined: Mon Jan 28, 2008 10:05 am

'Rate this Item' Object ref. not set to an instance...

Post by dave_reach » Fri Jun 27, 2008 3:23 am

Hi,

I have been working on a site using the Ablecommerce system. I have noticed now that when you click the "rate this item" button on the Product Page you get an error saying 'Object Reference not set to an instance of an object'. It was working at one time, i've no idea when it stopped working, and no idea how to go about debugging it as its an Ajax request.

The response from the server is:

'53|error|500|Object reference not set to an instance of an object.|'

The site itself lives at http://www.officenut.co.uk. I'd appreciate any help anyone can offer!

Thanks,
Dave.

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: 'Rate this Item' Object ref. not set to an instance...

Post by m_plugables » Fri Jun 27, 2008 7:09 am

Check the ConLib/ProductReviewForm control. It seems that it is trying to use something which is NULL. If you post some exception details means the stack trace then it would be help full in finding where exactly the problem is.
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

dave_reach
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 32
Joined: Mon Jan 28, 2008 10:05 am

Re: 'Rate this Item' Object ref. not set to an instance...

Post by dave_reach » Fri Jun 27, 2008 7:54 am

Hi,

I'll look in to that control and try and get the stack trace. I had a bit of a play around with the ProductReviewPanel control, and called ShowReviewForm() on Page_Load - this made the rating form visible without the need to click the "Rate this Item" button.

The form worked fine and I was able to submit a review. Hmm!

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: 'Rate this Item' Object ref. not set to an instance...

Post by m_plugables » Fri Jun 27, 2008 8:00 am

Also check ConLib/ProductReviewsPanel control as well. In fact this control is showing the rate this item hyper link and then when some one click the hyper link button it calls the
InitializeForm(); function of the ConLib/ProductReviewForm. I think there is some problem in this InitializeForm(); function of ConLib/ProductReviewForm function.
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

dave_reach
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 32
Joined: Mon Jan 28, 2008 10:05 am

Re: 'Rate this Item' Object ref. not set to an instance...

Post by dave_reach » Fri Jun 27, 2008 8:54 am

I'm unable to get a stack trace (I cant run the site in Debug mode - it just refreshes constantly). I've now commented out all the functions contained within the OnClick event for the button and I am still receiving the error message. Maybe I was editing the wrong button... 1 search for "Rate this item" in all files later and there is only this 1 instance. HMM!

I then tried removing OnClick="ReviewLink_Click" but the error popup was still being displayed OnClick.

I'm not so hot on this Ajax related .NET stuff, but surely by removing the OnClick event from the .aspx page I should be removing its OnClick event!

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: 'Rate this Item' Object ref. not set to an instance...

Post by m_plugables » Fri Jun 27, 2008 10:31 am

If it is possible then attach all the modified files for both controls. I will try to have a look at them when i have some spare time. I think this problem is because of some of your custom work.
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: 'Rate this Item' Object ref. not set to an instance...

Post by Logan Rhodehamel » Fri Jun 27, 2008 12:53 pm

One tip for working with Ajax - it can be frustrating with the callback when you can't see the actual error message. If the bug isn't ajax related, you can disable the partial postback feature. That way you will be able to see the actual error messages that occur.

If you are working on the store side, edit the file Layouts/Scriptlet.master. If you are working on the admin side, it's Admin/Admin.master.

Code: Select all

EnablePartialRendering="true"
Change true to false to turn off ajax.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

dave_reach
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 32
Joined: Mon Jan 28, 2008 10:05 am

Re: 'Rate this Item' Object ref. not set to an instance...

Post by dave_reach » Mon Jun 30, 2008 2:06 am

Hi,

@mazhar
The review controls arn't customised themselves. Most of the other controls on this page have been modified though. I can attach these, but there are a lot of controls that I have changed.

@Logan Rhodehamel
I did as you advised and set EnablePartialRendering to false, and lo and behold the entire process works like a charm. However, setting it back to True causes the error to occur again. This leads me to think it's something related to the request itself as opposed to some scripting error.

Post Reply