Developer forum

Forum » CMS - Standard features » Cookiemanager Dynamicweb.CookieOptInLevel removed after logout

Cookiemanager Dynamicweb.CookieOptInLevel removed after logout

Maik Van Sark
Reply

Hello,

In our solution we use the DW cookiemanager. When a user logs out, the Dynamicweb.CookieOptInLevel cookie is removed and the cookie bar pops up again. Why is the Dynamicweb.CookieOptInLevel cookie removed?

Second problem; when someone logs out there are around 50 cookies with cart / context information created. Why is that? These cookies are also shown in the DW backend for some reason. See screenshots.

DW-cookies-backend.png DW-cookies-context.png

Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi,

1) Why is the Dynamicweb.CookieOptInLevel cookie removed?
It might be caused by the configuration of the cookie manager. Can you provide a screendump of all the settings in System > Web and HTTP > Cookie Manager?
Also, which version of Dynamicweb is this?

2) When someone logs out there are around 50 cookies with cart / context information created. Why is that?
Ecommerce tries to ensure that all cart context cookies are removed when a user logs off. If you navigate to another page after logging off then you should see that the cookies are actually gone.

Best regards,
Morten

 
Maik Van Sark
Reply

Hi Morten,

1) Thnx for the fast reply. We are currently running on 9.6.3. See the screenshot for the cookiemanager settings.

2) When a user logs off the cookies are added instead of removed. Even after browsing to other pages, the cookies still remain there.

Seems that the cookies which should stay are removed(like Dynamicweb.CookieOptInLevel) and the cookies which should be cleared like cart contexts are actually added.

Cookiemanager-settings.png
 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

1)
I can see that you have enabled the setting "Secure all cookies". This means that cookies will only be available when you access the website using the HTTPS protocol.
If you are using SSL/TLS then I would recommend that you force SSL in website settings.
If you are not using SSL/TLS then you should disable the "Secure all cookies" setting.

2) I'm not sure whats going on there. I'll have to take a closer look.

 
Maik Van Sark
Reply

Ok thanks. Im now forcing SSL in website settings. The problems still remain though. If you need more information from me let me know!

 
Peter Leleulya
Reply

I'm experiencing the same issue on a different project, also 9.6.3.

This project generates OrderContexts and I see a huge list of cart cookies being added and the OptInLevel cookie disappearing when logging off in the frontend via Admin/Public/extranetlogoff.aspx

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Can I ask you to submit a case to service desk with details about how we can access those sites or how to get a copy for further debugging?

Best regards,
Morten

 
Maik Van Sark
Reply

Hi Morten,

We have been doing some more research since we couldnt reproduce this problem on our acceptance website. And the only difference we noticed were the amount of OrderContexts.
So I have been generating some empty OrderContexts in de database(see screenshot sql). Which created more and more cookies when logging out. And at some point the browser throws this error:

Set-Cookie header is ignored in response from url: https://DOMAIN/Admin/Public/extranetlogoff.aspx?redirect=/login. Cookie length should be less than or equal to 4096 characters.

At this point the cookie Dynamicweb.CookieOptInLevel is not created anymore. And thus the cookie bar pops up.
Can you stop DW creating cookies from all ordercontext in the database? Even contexts which do not apply to the customer are stored as a cookie(see screenshot).
If you need more information from us please let me know.

cookie-overflow.png dw-contexts.png
 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

I have registered a bug related to clearing cart context cookies which obviosly doesn't work as intended.
Bug number 62672

Best regards,
Morten

 
Peter Leleulya
Reply

Morten,

I've mailed Nicolai steps to reproduce including login credentials.
I don't have your emial address.

With kind regards,
Peter

 
Peter Leleulya
Reply

With the ecommerce 1.6.18 package the problem is fixed.
Thanks!

 

You must be logged in to post in the forum