While working on adding some extra fields to an article in the EI via publicus.ini, I was having some issues deciding on what the field names should be called. I am adding quite a few fields so they need to be distinctive and I was tryyyying to be user friendly. While making a few changes in publicus.ini, I added some test data to the new fields in the EI, and it wouldn’t save. What the heck?! Not only would that particular story not save, none of my other stories would save! If I was in the EI, editing a story, on the “Edit” tab and tried to click on another tab or save the story I would get a popup error that said:

Something went wrong when saving the story data, but a backup of your data was made. You can try saving your data again or click ‘Cancel’ and then select the backup from the story list. (Error message: Exception EDatabaseError in module pbscedit.dll at 003611AE. String or binary data would be truncated. The statement has been terminated.)

First of all, what?! Second of all, my brain goes into overdrive thinking what the heck did I do wrong?? I did change my field names a couple of times and added data to those fields, only to change them to something else. Maybe there is some known rule that I am completely unaware of and I just broke Saxotech with my indecisive, “user-friendly” names. Now I am getting a little panicky. I broke my client’s EI, I probably broke all of Saxotech EI’s everywhere. I just bought down the news. News is no longer available to anyone. Ok, that may be an exaggeration, but it was early and I hadn’t had enough coffee yet.

I submitted a ticket to Saxo and it was discovered that my user friendly field name was completely database unfriendly. I was told at 34 characters, “SC_YouTubeWidget_HeaderDescription” exceeds the Varname column’s data type of VARCHAR(30) in table web.dbo.Artikkler_fields. I then shortened my field name and sweet relief, I am back in business. No more error, no more panic, news is now available to the masses.

Lesson Learned: When adding an extra field to an article via publicus.ini, make sure that the name is 30 characters or less.