FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



Dec 6, 2016, 8:40 PM
69 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
hmmm

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.

 

Dave


FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.