Web Contribution Customization

Hello All,

I am trying to update a customization for a simple donation upsell for TNEW Version 7.  Someone buys a package, they get a precart page asking them to donate using a form.  They put in a number, click "Donate", I use a VERY slightly modified version of WP_MAINTAIN_CART_CONTRIBUTION to accomplish the task, takes them to their cart with the package and donation (via another precart upsell page), easy peasy.  Works perfectly in TNEW Version 6.

Except that in TNEW Version 7 it breaks.  It just takes me to an error page that says "We're Sorry.  An unexpected error has occurred and, in order to continue, your cart may have been cleared. Please try again by clicking the events listing page or contact us for assistance."  I have no idea why.  I have narrowed it down to that exact procedure, too, because if I comment out the line where that execute happens, everything works perfectly.

We are on 15.1.1 in case that matters.

Any ideas?

John

Parents
  • Well, it sounds like it is the contribution. That error usually is the cart conflict error. But here are the steps I do use when this popped moving from 7 to v7

    Can you execute the procedure in ssms with no error?

    What do the v7 logs say?

    Is this a new contribution type?

    Have you confirmed the setup?

    Can you process the contirbution through the application logging in as the webuser? 

    Can you hit the precart page by typing in the url (bad html, not redirecting to the new formatted in v7 url ie /components/precart?p=)?

  • Answers:

    • Yes, no problem running the procedure in SSMS.
    • LOGS - FYI, I am a novice log reader.  There appear to be 5 log entries related to each instance of this issue, and they are as follows, in order.
      • "Organization is using execute local procedure via precart controller - procedure name: lwp_cp_add_cont_to_order, procedure ID: 68+|+a094c0f2-4772-4fd5-a963-5259424b60c9"
      • "System.NullReferenceException: Object reference not set to an instance of an object. at Tnew.Tessitura.Order.ContributionBuilder.GetContributionTypeIdFromNotesWithRefNo(String refNo) in C:\bamboo-agent-3-home\..." and then that one goes on for a long time with a lot of things like System.Runtime.Exceptionservices... and System.Web.Mvc.Async...
      • "System.NullReferenceException: Object reference not set to an instance of an object. at Tnew.Tessitura.Order.ContributionBuilder.GetContributionTypeIdFromNotesWithRefNo(String refNo) in C:\bamboo-agent-3-home\..." and then this one also goes on for a long time with a lot of things like System.Threading.Tasks.... and looks a lot like the previous one but is definitely different.
      • "The current session: 0cd2e308c83911e9811e005056ae5f1400000000000000000000000000000000 is no longer valid. | A new session will be created+|+5089ba3b-4e8d-4400-8ab0-4b9086b6513b"
      • "A new session has been created: 2028ef20c83911e9811e005056ae5f1400000000000000000000000000000000 | Redirecting user to session reset information page: ~/error/resetsession+|+5089ba3b-4e8d-4400-8ab0-4b9086b6513b"
    • Not even remotely a new contribution type.
    • Setup is confirmed.
    • I have literally never logged in through the web user in the past and have no idea what the password is, but have confirmed that the web user group is good to go on this.
    • No problem hitting the pages by typing in the URL.

    By my reading of the logs, it appears as though something is happening which is keeping TNEW from going to the cart with the current session and it closes it down.  When I look at the database, the contribution is there and the tickets are still in the cart just like the session was still active.

  • Yeah, this is looks like it is screaming about not having the note need to render the cart on the order notes. So lets say your contribution id is 45 (in ltr_tnew_conrib_type). It would need to have "c" prefix the ID like "45_"  and then the "ref_no" updated to the web notes (example: c45_2361886) Can you confirm that is happening? 

    Just do a one off update statement the the t_web_order (in test!) notes for that session and refresh the page. Little bit a of example code below. 

    /*Added for v7 cart rendering. */
    update T_WEB_ORDER
    set notes = ("c45_"+convert(varchar,b.ref_no) from t_web_order a
    join T_WEB_CONTRIBUTION b on a.order_no = b.order_no
    where a.sessionkey =@sessionkey)

    If this works, I would make a dedicated sp and call it from validate cart (sounds like you have). Pass the contribution type as a parameter and drop the update at the end the contribution maintenance code and redirect to the cart or somewhere else.

Reply
  • Yeah, this is looks like it is screaming about not having the note need to render the cart on the order notes. So lets say your contribution id is 45 (in ltr_tnew_conrib_type). It would need to have "c" prefix the ID like "45_"  and then the "ref_no" updated to the web notes (example: c45_2361886) Can you confirm that is happening? 

    Just do a one off update statement the the t_web_order (in test!) notes for that session and refresh the page. Little bit a of example code below. 

    /*Added for v7 cart rendering. */
    update T_WEB_ORDER
    set notes = ("c45_"+convert(varchar,b.ref_no) from t_web_order a
    join T_WEB_CONTRIBUTION b on a.order_no = b.order_no
    where a.sessionkey =@sessionkey)

    If this works, I would make a dedicated sp and call it from validate cart (sounds like you have). Pass the contribution type as a parameter and drop the update at the end the contribution maintenance code and redirect to the cart or somewhere else.

Children