1

I have added values in few fields across 400+ items in the Sitecore programmatically.

After creating all the items in the Sitecore master database, I am getting this message when I click on each one of them:

Do you want to save the changes to the item?

I published all the items and the items whatever updated programmatically is reflected in the Sitecore web database also.

I have used SecurityDisabler when modifying the items in Sitecore.

We are using Sitecore 9.

Questions:

  1. What could be the reason for this save popup?
  2. Has anyone come across this issue?
3
  • Have you call the method EndEdit() after adding the values? Mar 22, 2018 at 16:28
  • yes i used EndEdit method.
    – arjunan
    Mar 23, 2018 at 0:47
  • 1
    Strongly disagree with closing this question. I myself had similar issue it turned out adblockers where the culprits.
    – mrosiak
    Aug 8, 2019 at 14:34

1 Answer 1

0

Does your new field values perhaps contain new lines \n or carriage returns \r ?

This can cause your browser to pick these up as being different to what is in Sitecore.

if so you could try replacing them with spaces or empty strings:

public static string CleanNewLinesTabsAndOtherStuff(this string s)
{
  return s.Replace("\r\n", " ").Replace("\r", " ").Replace("\n", " ").Replace("\t", " ").Replace('\xA0', '\x20');
}

Take a look at Brian Pedersens blog post on this here for more info:

https://www.google.co.uk/amp/s/briancaos.wordpress.com/2012/11/30/sitecore-save-dialog-appears-for-unchanged-content/amp/

If this isn’t your issue could it potentially be related to versions of items, there is a known bug for this message with regard to version management in 8.1, I’m not sure if it exists in 9 still.

https://community.sitecore.net/general/f/16/t/2285

4
  • Thanks for the reply. i already had a look at Brian's post. I couldn't see any new lines or carriage returns in the values which i have updated.
    – arjunan
    Mar 23, 2018 at 0:49
  • Ok, no problem. Did you look into if the Sitecore Hotfix: 76398 is the issue as per the link at the end of my reply? Mar 23, 2018 at 16:50
  • Adam, After complete republish of website, i couldn't see that popup message anymore. Thanks for your response.
    – arjunan
    Apr 2, 2018 at 3:30
  • @arjunan glad you managed to sort it anyway. Apr 2, 2018 at 23:18

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