Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Invalid viewstate. View modes: 
User avatar
Member
Member
Aashish khandelwal - 6/21/2012 5:30:49 AM
   
Invalid viewstate.
Hi I have applied Kentico Hotfix 6.0.32 so as to get two cookie related webpart and update Cookie helper.

Now after using Simple Cookie law consent webpart, i am getting error on Allowing Cookie.

http://takeachallenge.org/CookieConsent.aspx

Please help

regards
Aashish

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/22/2012 2:56:32 AM
   
RE:Invalid viewstate.
Hello,

Please apply the latest hot fix as there were some issues with the 32th hot fix. These issues are mentioned in the comments section under this blog post.

Best regards,
Boris Pocatko

User avatar
Member
Member
Aashish khandelwal - 6/22/2012 6:51:45 AM
   
RE:Invalid viewstate.
I have applied latest hotfix 6.0.36. Stilll the problem persists?

Please help


regards
Aashish Khandelwal

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/25/2012 3:18:41 AM
   
RE:Invalid viewstate.
Hello,

I tried to allow the cookies on the linked page and it seems to be working fine. Could you please let me know what problems do still persist?

Best regards,
Boris Pocatko

User avatar
Member
Member
Aashish khandelwal - 6/25/2012 3:42:16 AM
   
RE:Invalid viewstate.
Try clearing the browser cookies.

Regards
Aashish Khandelwal

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/26/2012 7:51:50 AM
   
RE:Invalid viewstate.
Hello,

This seems to be a postback issue. Could you please try to add a simple button on the given page so we can test this assumption? Additionally, could you please post a screenshot of all the settings of the given web part?
Please also check the EventLog and windows EventLog for more information on the given issue.

Best regards,
Boris Pocatko

User avatar
Member
Member
Aashish khandelwal - 6/27/2012 2:47:02 AM
   
RE:Invalid viewstate.
I have added button to the page.


Webpart settings are as follows:

Webpart properties (Simple cookie law consent)

Alias path: /CookieConsent
Zone ID: zoneMain


Default


Web part control ID: SimpleCookieLaw

Web part title:

Disable view state: False

Disable macros: False


Visibility


Visible: True

Hide on subpages: False

Show for document types:

Display to roles:


Levels


Default user cookie level: System

Compare current cookie level to: Essential

Preview cookie level: System


Below level behavior


If level is below, display: True

Text: In order to provide complete functionality, this web site needs your explicit consent to store browser cookies. If you don't allow cookies, you may not be able to use certain features of the web site including but not limited to: log in, buy products, see personalized content, switch between site cultures. It is recommended that you allow all cookies.

Show deny button: False

Show allow specific button: False

Show allow all button: True


Exact level behavior


If level matches, display: False

Text: The web site is now storing only essential cookies on your computer. If you don't allow cookies, you may not be able to use certain features of the web site including but not limited to: log in, buy products, see personalized content, switch between site cultures. It is recommended that you allow all cookies.

Show deny button: True

Show allow specific button: False

Show allow all button: True


Above level behavior


If level is above, display: False

Text: The web site now stores cookies on your computer. You may restrict this to using only some of them or none, however you may not be able to use certain features of the web site including but not limited to: log in, buy products, see personalized content, switch between site cultures.

Show deny button: True

Show allow specific button: True

Show allow all button: False


Consent buttons


Deny all button text: Deny all cookies

Allow specific button text: Allow only essential cookies

Allow specific button sets level: Essential

Allow all button text: Allow cookies


Web part container


Web part container:

Container title:

Container CSS class:

Container custom content:

Hide container on subpages: False


HTML Envelope


Content before:

Content after:


AJAX


Use update panel: False


Time zones


Time zone: inherit

Custom time zone:


Partial caching


Partial cache minutes:

Partial cache dependencies: ##DEFAULT##




Regards
Aashish

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/27/2012 7:08:25 AM
   
RE:Invalid viewstate.
Hello,

Thank you for the additional information. If I try to click this testing button then the same error occurs, as if I click the Allow cookies consent button. Thus I think, that this issue isn't caused by the web part itself, but by some other part of the site. Could you please try to place our cookie web part on a clean page, without any inherited content? Please also place the test button on such a page. You can disable the inheritance on the page in CMSDesk / Properties / Template / Do not inherit any content.

Best regards,
Boris Pocatko

User avatar
Member
Member
Aashish khandelwal - 6/27/2012 8:07:43 AM
   
RE:Invalid viewstate.
I have changed the page as per your instructions.. Again same problem is occurring

http://takeachallenge.org/CookieConsent.aspx

Regards
Aashish

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/27/2012 9:11:09 AM
   
RE:Invalid viewstate.
Hello,

Thank you for that. I've checked your html source code and you have the tags <body>, <html>, <title> defined multiple times, which can cause your issue, since the rendered html is invalid. Could you please try to correct that?

Best regards,
Boris Pocatko

User avatar
Member
Member
Aashish khandelwal - 6/29/2012 5:22:05 AM
   
RE:Invalid viewstate.
Hi Borisp

I have corrected the HTML code and still the problem with Cookie webpart persists.


Regards
Aashish

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 7/1/2012 7:50:49 PM
   
RE:Invalid viewstate.
Hi,

I tried to click on you custom button and I was redirected to the 404 error page. The same behavior I noticed with the custom web part. The second click works fine.

I checked requests and you are using several custom javascripts on the page. Could you please try to remove them from the page for testing purposes? For example there is some buttons.js file. Isn't the redirect caused by the script?

Best regards,
Ivana Tomanickova

User avatar
Member
Member
Aashish khandelwal - 7/2/2012 6:15:04 AM
   
RE:Invalid viewstate.
I tried removing all javascripts but still problem is there.

Regards
Aashish

User avatar
Member
Member
Aashish khandelwal - 7/3/2012 2:11:58 AM
   
RE:Invalid viewstate.
I am sure the problem is with Cookie webpart. I tried postbacking the page without cookie webpart and all went correct.

Regards
Aashish

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 7/5/2012 3:07:06 PM
   
RE:Invalid viewstate.
Are you 100% sure it has nothing to do with your machine key? I was having issues with viewstate MAC when I did a new installation on a fresh server. I set the machine key manually in IIS and the problems went away.

User avatar
Member
Member
Aashish khandelwal - 7/9/2012 4:09:35 AM
   
RE:Invalid viewstate.
Thanks. Issue has been resolved.

Cookie webpart is not visible in Safari. However, it is working fine with IE, FF and chrome. Please suggest.

Regards
Aashish

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 7/10/2012 6:49:07 AM
   
RE:Invalid viewstate.
Hello,

Could you please send me the link to the problematic page? I've checked the old link and I couldn't see any web part available. Additionally, please let me know, what the issue was, so other users are able to fix it too.

Best regards,
Boris Pocatko

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 7/10/2012 3:48:57 PM
   
RE:Invalid viewstate.
Was it the Machine Key causing the problem?