I always get this message when viewing this content type's main editing page:
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/content/t/r/i/user4112/html/www2/sites/all/modules/uc_upsell/uc_upsell.module on line 191.
Any help would be appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 360457-form-submit-not-set.patch | 981 bytes | xurizaemon |
| #10 | uc_upsell.module.360457.patch | 705 bytes | torgospizza |
| #4 | uc_upsell_arrayfix.patch | 912 bytes | torgospizza |
| #3 | upsell_error_warning.png | 35.1 KB | WebWonk |
Comments
Comment #1
torgospizzaSorry for the delay, I'm pretty swamped these days.
That error is interesting, I'm not sure I get this error. Does the list of Related products show up in your product edit form? If so, are there any products in it? It seems to me that what's happening is that the submit handler isn't correctly getting merged into your form for some reason. I'm pretty sure I don't get this on our site, but I will double-check.
If you can send me a screenshot of what your Related Products select list looks like, that might help.
Comment #2
asak commentedI just got this same error on: admin/content/types/product/fields
Comment #3
WebWonk commentedI just got a bunch of array warnings after removing some product associations and submitting. I started from the "Related Product Associations" screen, then clicked the "edit" link, and when the node edit was complete I was redirected back to the "Related Product Associations" page. That is where these warnings were displayed.
Attached is a screenshot.
I don't recall getting anything like this in version 1.6. Is it possible that some of code changes for version 1.7 might have caused this??
Comment #4
torgospizzaHi, try this patch and let me know if you still get errors. Also make sure that the functionality still works as you'd expect it to (when removing or adding products from the "Related products" select list).
Comment #5
WebWonk commentedI do appreciate the quick patch. Unfortunately, I have already reverted my site to version 1.6 of the module. This will make it difficult for me to test the patch.
Maybe I can set-up a test environment to try this out, but I can't say how quickly my workload will allow this to happen.
Comment #6
torgospizzaSure, no problem. I actually have had some server issues to deal with where we had to restore from backups, so I'll need to test my own patch as well. (Again.) Feel free to update this when you are able.
Comment #7
torgospizzaJust FYI I have released a bugfix for 1.7, which fixes the reciprocal associations problem. Feel free to try that one out. Otherwise I'll be closing this issue.
Comment #8
alegacy commentedI get the same error and I'm using 1.7 and I re-installed version
Comment #9
alegacy commentedAlso, if it should help, this warning doesn't show up in my normal edit PRODUCT TYPE but only for PRODUCT TYPES I created from the Product Class.
Comment #10
torgospizzaHere is a patch which might solve the issue. I believe the problem has to do with the array_merge in hook_form_alter (which is how the Related Products form gets added to the Edit form). It doesn't make sense that this would only show up when trying to edit one type of product class, and not a normal product, although anything is possible.
Just FYI this patch is rolled against the latest 5.x version, which adds some new features but leaves everything else working the same. (Although you might want to double-check your block and pane settings, to make sure things such as your "upsell messages" have not been erased.)
Comment #11
torgospizzaComment #12
torgospizzaI believe this issue has been fixed. Please open a new one if you encounter these errors again.
Comment #14
xurizaemonI'm seeing this issue on 5.x-1.7 CVS at admin/content/types/product/fields
At this point in uc_upsell_form_alter(), $form['#submit'] is not set. $form['submit'] is set here, but I don't believe it's what you want.
This attached might do the trick ... I wrote this patch before finding the issue. It's late.
Comment #15
xurizaemonSorry - I did say it was late.