NullPointerException
NullPointerException

Reputation: 491

Sitecore template items reset after IIS restart / application pool recycle

I have a uCommerce package installed for my sitecore. The problem exists when you start editing template items under sitecore/templates/User Defined/uCommerce definitions/. When you restart IIS or recycle application pool (apparently this happens after solution rebuild) the template items reset their values to the fixed one. What could be causing the problem? Is there any cache mechanism which could be causing this?

update: have checked the sitecore database, the field values are being saved and stored in database properly after iis reset/pool recycly, so there is pretty much confidence that it has to do something with caching

Upvotes: 0

Views: 720

Answers (3)

NullPointerException
NullPointerException

Reputation: 491

The problem was that the standard values template presentation layout I have been updating was the english version. However, there was another language version set and the layout for that version was different. When uCommerce is resetting the template on application pool recycle it doesn't take into the account the multilanguage support, so the last retrieved language version of that fieldvalue is used as reset template and that different language version with different layout was used. A partial workaround is to use the same layout for all the language versions.

Upvotes: 0

pbering
pbering

Reputation: 943

The UCommerce DataProvider (UCommerce.Sitecore.SitecoreDataProvider.DataProviderMasterDatabase) automatically adds the templates under sitecore/templates/User Defined/uCommerce definitions at start up so they will always be reset after each recycle.

Upvotes: 1

Zachary Kniebel
Zachary Kniebel

Reputation: 4774

First off, make sure that you are making your changes in the Master database and not the Web database. If that is not the issue, then try the following while logged into Sitecore as an administrator:

  1. Go to http://yourdomain.com/sitecore/admin/cache.aspx
  2. Clear the Sitecore cache
  3. Go to the Master database's content editor and look at your templates
  4. Make any changes necessary, save and publish
  5. Do your IIS restart / application pool recycle (the latter occurs on every build)
  6. Go back to http://yourdomain.com/sitecore/admin/cache.aspx
  7. Clear the cache again (just a base-case)
  8. Go back to the Master database's content editor and look at your templates again

If the issue occurs after trying those steps, then you should open a Sitecore support ticket and see what they say. You may also want to try making a clean install of Sitecore and trying to reproduce the issue there (Sitecore Support is likely to do this as well).

Upvotes: 0

Related Questions