Note that there are some explanatory texts on larger screens.

plurals
  1. POSitecore.Context.Item NULL on postback
    primarykey
    data
    text
    <p>I am inheriting a sitecore implementation and I have been trying to debug a membership form. The membership page contains a membership sublayout that contains a simple form (first, last, address,...). When I am debugging on my local machine, I fill the form and click submit. The page posts back and as soon as the base layout is hit, the <code>Sitecore.Context.Item</code> is <code>NULL</code>. The interesting part is that if I PREVIEW the page within Sitecore, when I postback everything works fine, which makes me believe that it's just a matter of some internal settings in my web.config or some other configuration file.</p> <p>Here are the content of some variables on the first hit of the page and on the postback in both PREVIEW mode and regular mode:</p> <p>first hit (preview mode)</p> <pre><code>Sitecore.Context .Data.RawUrl = /?sc_itemid=%7b2A58FFA4-D16A-4EAB-8298-9398ACFDDEFB%7d&amp;sc_mode=preview&amp;sc_lang=en .Database = master .Item,Database = master .Item.Id = {2A58FFA4-D16A-4EAB-8298-9398ACFDDEFB} .Item.Name = Website_Membership .RawUrl = /?sc_itemid=%7b2A58FFA4-D16A-4EAB-8298-9398ACFDDEFB%7d&amp;sc_mode=preview&amp;sc_lang=en .Request.ItemPath = /sitecore/content/home/ </code></pre> <p>Postback (preview mode)</p> <pre><code>Sitecore.Context .Data.RawUrl = /Sites/CMS/Layouts/Membership Layout.aspx?sc_itemid=%7b2A58FFA4-D16A-4EAB-8298-9398ACFDDEFB%7d&amp;sc_mode=preview&amp;sc_lang=en .Database = master .Item,Database = master .Item.Id = {2A58FFA4-D16A-4EAB-8298-9398ACFDDEFB} .Item.Name = Website_Membership .RawUrl = /Sites/CMS/Layouts/Membership Layout.aspx?sc_itemid=%7b2A58FFA4-D16A-4EAB-8298-9398ACFDDEFB%7d&amp;sc_mode=preview&amp;sc_lang=en .Request.ItemPath = /sitecore/content/home/sites/cms/layouts/membership layout </code></pre> <p>first hit (regular mode)</p> <pre><code>Sitecore.Context .Data.RawUrl = /SomePath/Website_Membership.aspx .Database = web .Item,Database = web .Item.Id = {2A58FFA4-D16A-4EAB-8298-9398ACFDDEFB} .Item.Name = Website_Membership .RawUrl = /SomePath/Website_Membership.aspx .Request.ItemPath = /sitecore/content/home/somePath/website_membership </code></pre> <p>postback (regular mode)</p> <pre><code>Sitecore.Context .Data.RawUrl = /Sites/CMS/Layouts/Membership Layout.aspx .Database = web .Item = NULL .RawUrl = /Sites/CMS/Layouts/Membership Layout.aspx .Request.ItemPath = /sitecore/content/home/sites/cms/layouts/membership layout </code></pre> <p>Has anyone experienced something like this before and/or can you think of any reason for this to happen?</p> <p><strong>EDIT</strong>: On the sdn.sitecore forum Kevin Buckley:</p> <blockquote> <p>I'm thinking the control adapter 'form.browser' is missing. It should be in the app_browsers folder.</p> </blockquote> <p>I just want to add a note in regards. The files were missing from the app_browsers folder BUT I had added them manually few days ago by copying them from a clean sitecore installation. That didn't seem to help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload