Error message:

warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /Users/jamm/Sites/drupal-6.1/sites/all/modules/cck/optionwidgets.module on line 319.

I just posted #235224: Error: Key Exists / OptionWidgets.module / Nodereference - editing referenced c-types about an hour ago, if you haven't read that one maybe you should before continuing. I posted this under a new issue because the error was caused by a different course of action. If the solution is the same please excuse my poor etiquette.

(Continuing with the same names and context from #235224: Error: Key Exists / OptionWidgets.module / Nodereference - editing referenced c-types)
After the previous issue, I attempted to create a new node of content-type X. I entered a title, choose a referenced node for the nodereference select-list (not required), and started manually typing a good amount of html in what could be considered the body field. Part way through, I pressed the preview button to see how I was making out. Then I started entering more html and hit preview again.

This is where I got the above error. It turns out, after hitting preview the first time, the value of my nodereference select-list did not persist which I didn't notice at first, so when I hit preview the second time (after the postback) no select-list values were selected, and again this is when I got the error.

Since I was going to need to hit preview a few more times before finishing this node I decided to play/test with the select-list.

At this point, I've already hit preview twice, the above error is showing, and the select-list value was cleared (didn't persist). So I selected the same referenced node from the nodereference select-list and hit preview, the page posts to the server and returns without the error message, but again the select-list value is cleared. So again, I hit the preview button (this time without re-selecting the nodereference), and again the error message returned. I could repeat this as much as I wanted with the same results.

Comments

karens’s picture

Status: Active » Fixed

Just committed a fix for this.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.