Warning: Parameter 1 to amazon_store_buttonize_link() expected to be a reference, value given in drupal_retrieve_form() (line 771 of D:\xampp\htdocs\d7\includes\form.inc).
Hello,
I am working with a brand new D7 rc4 installation and run into this error message when trying to set up an Amazon Store.
Can you please help me with this?
Regards,
Kirsten
P.S. Happy New Year to all of you!
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | amazon_store_form_signatures.patch | 6.73 KB | pancho |
| #3 | patch.txt | 8.8 KB | vertuso |
| #2 | Screenshot of the error | 16.5 KB | KirstenLangholz |
Comments
Comment #1
rfayThanks for the report. Patches are welcome. I won't be able to look at this for a couple of weeks at least.
Please provide the exact context of this message? What URL were you on when you got it? What button did you click?
Comment #2
KirstenLangholz commentedUnfortunately I am not able to patch. So, whenever you are fine with it, go ahead.
As for your questions:
If you have any further questions that might help you to set it up right, please let me know.
Thanks for spending your time for me and others.
Kirsten
Comment #3
vertuso commentedHere is a patch for this and some other issues.
Maybe you can help me out though. I am new to Drupal and when I started working on these issues, I made a backup of amazon_store by doing mv amazon_store amazon_store_save. Then I got the cvs HEAD and put it into amazon_store by creating a new directory. Then I fixed the items in the patch and my site had no more errors. Then I deleted amazon_store_save and now I have the error messages again. I cleared my cache and as far as I can tell there are no other copies anywhere. I am pretty stumped on this. Any clues why it still is seeing the old version of the files? I've restarted Apache and still...
I am using Lampp on Ubuntu with Netbeans if it makes any difference.
Comment #4
vertuso commentedI figured out where they were being picked up. I originally did a cvs checkout and it stored the files in (/opt/lampp/htdocs/amazon_scooter_store/sites/all/modules/contributions/modules/amazon_store, etc., so I just deleted the contributions directory and clear cache and now it works. Learn something new...
Comment #5
rfayThanks for the patch!
You do need to move the old module out of the module discovery path, or it can be found and mess everything up.
When providing a patch, set the issue to "needs review".
The change from ereg_replace to preg_replace() is correct. But changing all the form signatures to not pass by reference is *not* correct.
Comment #6
panchoThanks for your patch, vertuso!
The correct callback signature for forms is ($form, &$form_state), with $form_state being explicitely called by reference. So you did a bit to much removing the ampersands (&) from both parameters.
I already fixed the callback signatures in amazon_store.module (see #1034774: Warning: Parameter 1 to amazon_store_addcart_form() expected to be a reference). However I overlooked the occurrences in the ctools_plugins, so thanks to your efforts, we're getting this completely fixed!
Committed to D7 branch: http://drupal.org/cvs?commit=490368
Comment #7
panchoComment #8
BenK commentedJust keeping track of this thread