5

Using Sitecore 8.0. The template has a field "Author" of field type "Sitecore User". I have created an Item of this template. On clicking Select for "Author", it shows a dialog - "Associate Sitecore User".

Entering text in the search field and clicking on enter, it shows an error in the browser console.

enter image description here

UPDATE:
Following this UPDATE, I have modified the Sitecore.AntiCsrf.config to:

<rule name="shell">
 <urlPrefix>/sitecore/shell</urlPrefix>
  ......
  ......
 <ignore wildcard="/sitecore/shell/*Applications/Security/User*Manager*?*Cart_Users_Callback=yes"/>
 <ignore wildcard="/sitecore/shell/*Applications/Security/Role*Manager*?*Cart_Roles_Callback=yes"/>
 <ignore wildcard="/sitecore/shell/*Applications/Security/Domain*Manager*?*Cart_Domains_Callback=yes"/>
 <ignore wildcard="/sitecore/shell/~/xaml/Sitecore.Shell.Applications.Security.SelectAccount*Cart_*_Roles_Callback=yes"/>
 <ignore wildcard="/sitecore/shell/~/xaml/Sitecore.Shell.Applications.Security.SelectAccount*Cart_*_Users_Callback=yes"/>

 <!-- Ingore AntiCSRF completely -->
 <ignore wildcard="/sitecore/*"/>
 </rule>

Now, there is no error when searching. But on clicking on OK or Cancel, this error pops up.

enter image description here

2
  • Look in the Sitecore log for more details about what is failing behind that callback url 500 error. Feb 2 '17 at 9:31
  • The log entry seems to be : Exception: Sitecore.Security.AntiCsrf.Exceptions.PotentialCsrfException Message: CSRF form field is missing. Feb 2 '17 at 9:55
1

You can fix it by:

  1. Clear Cookies/Browser cache & try to open in new browser
  2. Please add these lines to the Sitecore.AntiCsrf.config file as mentioned under 'xml-controls' (website/app_config/include/Sitecore.AntiCsrf.config):

    enter code here

  3. Also add below config into Sitecore.AntiCsrf.config

    <rule name="shell">
      <!-- Ingore AntiCSRF completely -->
      <ignore wildcard="/sitecore/*"/>
    </rule>
    

For more info: https://briancaos.wordpress.com/2013/05/07/sitecore-6-6-csrf-form-field-is-missing/

6
  • I included the rules. But clicking on enter or cancel throws an error. I have updated my question. Please have a look.
    – Qwerty
    Feb 3 '17 at 5:01
  • i have udpdated the answer for you, it should be under 'xaml-controls'. i have tried to replicate in my local & was able to resolve. Hope you too :) Feb 3 '17 at 5:35
  • That did not work me. The "Failed to load viewstate" error still appears. :(
    – Qwerty
    Feb 3 '17 at 8:17
  • Please follow "Clear Cookies/Browser cache & try to open in new browser" Feb 3 '17 at 8:25
  • @Qwerty, were you able to resolve this issue ? Feb 6 '17 at 5:30
0

I fixed it by adding this config patch:

  <?xml version="1.0" encoding="utf-8" ?>
  <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
      <sitecore>
          <AntiCsrf>
              <rules>
                  <rule name="shell">
                      <ignore contains="/sitecore/shell/~/xaml/ExperienceExplorer.SelectUser.aspx"/>
                  </rule>
              </rules>
          </AntiCsrf>
      </sitecore>
  </configuration>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.