Dec 6, 2016, 8:40 PM
68 Posts

Error calling method 'unshift(string)'

  • Category: Debugging
  • Platform: Windows
  • Release: 9.0
  • Role: Developer
  • Tags:
  • Replies: 1

I have just copied one of my xPages applications to a Domino 9 server, and almost nothing works.  I can create a document using an xPage, but cannot save it, and no buttons work.  The first error in the log (sent by the admins) is:

[TypeError] Error calling method 'unshift(string)' on an object of type 'String[JavaScript Object]'

But the fields with the unshift line all seem to work (at least the ones I can see).  Is this error even a big deal?  Would it prevent anything from working on an xPage??

Update:  This doesn't work in Domino 8.5.3 either.  If the list that is being "unshifted" has only one value, or no values, then I get an error on the entire page.  So, how can I add a blank to a combobox field if the list returned only has one value?  The user may want to leave that field blank.  This has never been a problem until now.

Dec 11, 2016, 7:32 PM
589 Posts

Hard to advise without seeing any code or anything...

Sometimes in Xpages...  a single value gets returned as a string... and multiple values get returned as an Array or likely a Vector.  I'm just guessing that this COULD be your problem.  Not sure though.