Welcome Guest! To enable all features please try to register or login.
Options
Go to last post Go to first unread
Offline Scippy  
#1 Posted : Friday, March 16, 2018 2:59:30 AM(UTC)
Scippy

Rank: Advanced Member

Reputation:

Groups: Beta Users, Registered, Registered Users, Subscribers
Joined: 12/28/2016(UTC)
Posts: 43

Thanks: 3 times
Was thanked: 17 time(s) in 16 post(s)
I've noticed in HCC 3.0.1 and 3.1.0 also in default installations some exceptions in event log with this message: Server cannot append header after HTTP headers have been sent
Looking at them I've also noticed that a case in which they are fired is when I go from Cart page on Checkout page after clicking on 'Secure Checkout' button
Below you can see one of these exceptions:
Server cannot append header after HTTP headers have been sent
Nobody else has noticed this? What could it be? and how could it be solved?
Thanks!
Offline Kurt  
#2 Posted : Friday, March 16, 2018 3:18:48 AM(UTC)
Kurt

Rank: Member

Reputation:

Groups: Registered, Registered Users, Subscribers
Joined: 6/30/2017(UTC)
Posts: 28

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Yeah, I had a large number of these logs. I did report this issue months ago.
Offline Reto Cossalter  
#3 Posted : Friday, March 16, 2018 5:21:32 AM(UTC)
Reto Cossalter

Rank: Advanced Member

Reputation:

Groups: HCC-Partner, Registered, Registered Users, Subscribers
Joined: 6/9/2017(UTC)
Posts: 47

Thanks: 25 times
Was thanked: 24 time(s) in 21 post(s)
I see these events in a few portals. Most of them do not have HCC installed, therefore it seems more of an DNN related issue.
Offline Scippy  
#4 Posted : Friday, March 16, 2018 7:54:08 AM(UTC)
Scippy

Rank: Advanced Member

Reputation:

Groups: Beta Users, Registered, Registered Users, Subscribers
Joined: 12/28/2016(UTC)
Posts: 43

Thanks: 3 times
Was thanked: 17 time(s) in 16 post(s)
Reto, your answer is not useful, I manage more than one hundred websites built with DNN and I have hardly ever seen this exception before.
Instead in a clean installation of HCC, after a while I can find many.
Furthermore, as I have already written, I have ascertained that the exception is regularly generated in the passage from the Cart page to the Checkout page, so it's definitely something related to HCC.
Offline Reto Cossalter  
#5 Posted : Friday, March 16, 2018 8:06:51 AM(UTC)
Reto Cossalter

Rank: Advanced Member

Reputation:

Groups: HCC-Partner, Registered, Registered Users, Subscribers
Joined: 6/9/2017(UTC)
Posts: 47

Thanks: 25 times
Was thanked: 24 time(s) in 21 post(s)
Hi Scippy

I do apologise if my answer seemed unhelpful or like I would dismiss any influence of HCC.
Let me rephrase: From what I see in our logs, this problem does not seem to only affect HCC. There are more modules / scenarios where we see the same message.
Until now we were not able to pinpoint the exact reason behind. I see you have tracked it down (That is really helpful) and we will certainly try to investigate in this area too.

My comment was ment to provide additional information. We're all in the same boat, and english is not my first language, so it might sometimes not be perfectly on the point.

I really appreciate your effort you are putting into the HCC ecosystem!
Cheers, Reto
thanks 1 user thanked Reto Cossalter for this useful post.
Will Strohl on 3/19/2018(UTC)
Offline Will Strohl  
#6 Posted : Monday, March 19, 2018 1:34:55 PM(UTC)
Will Strohl

Rank: Administration

Reputation:

Groups: Administrators, HCC-Employee-Store-Manager, HCC-Employee-Support, HCC-Partner, Moderators, Partners, Registered, Registered Users, Subscribers
Joined: 12/22/2016(UTC)
Posts: 342

Thanks: 78 times
Was thanked: 59 time(s) in 57 post(s)
It's great to see everyone collaborating on this before I even read the thread. It's great stuff! :)

We've looked into this in the past, and I agree with Reto. While we definitely see this in some Hotcakes instances, it's not all of them, and we've yet to be able to consistently duplicate the issue. As you many know, until you know the actual cause through consistently duplicating an issue, the necessary code update(s) is unknown. If you all can help find the root cause, I'm certain someone can fix it.
Will Strohl, Upendo Ventures
Hotcakes Cloud | Get Support | Code Support
Official Cloud & Support provider for Hotcakes
Offline Scippy  
#7 Posted : Tuesday, March 20, 2018 4:40:52 AM(UTC)
Scippy

Rank: Advanced Member

Reputation:

Groups: Beta Users, Registered, Registered Users, Subscribers
Joined: 12/28/2016(UTC)
Posts: 43

Thanks: 3 times
Was thanked: 17 time(s) in 16 post(s)
To duplicate the issue only click on 'Secure Checkout' button on any HCC 3.1.0 or 3.0.1 installation
Secure Checkout Button
About help to find the root cause I'm sorry but I'm not a programmer, I hope someone else can help.
Offline Scippy  
#8 Posted : Wednesday, March 21, 2018 9:48:20 AM(UTC)
Scippy

Rank: Advanced Member

Reputation:

Groups: Beta Users, Registered, Registered Users, Subscribers
Joined: 12/28/2016(UTC)
Posts: 43

Thanks: 3 times
Was thanked: 17 time(s) in 16 post(s)
I've great news about this issue!
Searching on Google I've found a lot of post about this MVC exception (this one of them) and it seems to be caused by use of
Code:
Response.Redirect
instead
Code:
return Redirect

in fact, looking at HCC source code, in the CartController.cs when the 'Secure Checkout' button is pressed is called the ActionResult IndexPost() where is called the void ForwardToCheckout with in turn a call to Checkout controller using just Response.Redirect
I did a quick test modifing the ActionResult IndexPost() in CartController in this way:
Code:

// POST: /Cart/
        [ActionName("Index")]
        [HccHttpPost]
        public ActionResult IndexPost()
        {
            var model = IndexSetup();
            LoadCart(model);

            var intResult = CartIntegration.Create(HccApp).BeforeProceedToCheckout(HccApp, model);

            if (!intResult.IsAborted)
            {
                if (CheckForStockOnItems(model))
                {
                    return Redirect(Url.RouteHccUrl(HccRoute.Checkout, null, Uri.UriSchemeHttps));
                    //ForwardToCheckout(model);
                }
            }
            else
            {
                FlashWarning(intResult.AbortMessage);
            }

            return View(model);
        }

In this quick test I bypass the ForwardToCheckout call replacing directly with a 'return Redirect' to Checkout, and this remove all exceptions.
Then I am therefore reasonably sure that the part of the source code to be corrected is that part.
I do not know if the Response.Redirect was also used in other parts of the HCC project, in that case it is to be reviewed in all the points where it was used.
thanks 1 user thanked Scippy for this useful post.
Will Strohl on 3/21/2018(UTC)
Offline Will Strohl  
#9 Posted : Wednesday, March 21, 2018 12:06:00 PM(UTC)
Will Strohl

Rank: Administration

Reputation:

Groups: Administrators, HCC-Employee-Store-Manager, HCC-Employee-Support, HCC-Partner, Moderators, Partners, Registered, Registered Users, Subscribers
Joined: 12/22/2016(UTC)
Posts: 342

Thanks: 78 times
Was thanked: 59 time(s) in 57 post(s)
This is great stuff, Scippy. Would you mind please creating an issue for this so we can make the investigation, development, testing, and eventual release of this official? Thanks! :)

https://github.com/HotcakesCommerce/core/issues

Edited by user Wednesday, March 21, 2018 12:06:40 PM(UTC)  | Reason: Not specified

Will Strohl, Upendo Ventures
Hotcakes Cloud | Get Support | Code Support
Official Cloud & Support provider for Hotcakes
Offline Scippy  
#10 Posted : Thursday, March 22, 2018 2:55:49 AM(UTC)
Scippy

Rank: Advanced Member

Reputation:

Groups: Beta Users, Registered, Registered Users, Subscribers
Joined: 12/28/2016(UTC)
Posts: 43

Thanks: 3 times
Was thanked: 17 time(s) in 16 post(s)
Sure! I've reported it on Github Core Issues
thanks 1 user thanked Scippy for this useful post.
Will Strohl on 3/27/2018(UTC)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.359 seconds.

Notification

Icon
Error

Loading
  • Sign-up for the Hotcakes Community Newsletter: