Closed (won't fix)
Project:
Addresses
Version:
6.x-1.12
Component:
Code, CCK related
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 May 2010 at 16:32 UTC
Updated:
12 May 2017 at 21:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
codycraven commentedwjaspers - thank you for the thorough report. If someone could please reproduce this in a different environment I would appreciate it as I am very limited on time currently.
Comment #2
cliveR952 commentedI'm getting the same errors thrown up (repeated 5 times, see below) when someone tries to create a new account (see http://www.byusforus.net). It doesn't stop the user creating the account, but does put them off a little!
Environment
Ubuntu 8.10
Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.6 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g
Drupal 6.16
warning: Illegal offset type in /home/default/byusforus.net/user/htdocs/includes/form.inc on line 1373.
warning: Illegal offset type in /home/default/byusforus.net/user/htdocs/includes/form.inc on line 1373.
warning: Illegal offset type in /home/default/byusforus.net/user/htdocs/includes/form.inc on line 1373.
warning: Illegal offset type in /home/default/byusforus.net/user/htdocs/includes/form.inc on line 1373.
warning: Illegal offset type in /home/default/byusforus.net/user/htdocs/includes/form.inc on line 1373.
warning: preg_match() expects parameter 2 to be string, array given in
Comment #3
rolodmonkey commentedI have a short-term solution:
For me, this was happening when I set any of the CCK field settings to "Hidden". I removed the CCK field, added a new one and used "None" on those fields instead.
I did spend some time looking through Backtrace, et al. What is happening is that form_builder() is getting a $form where $form['#type'] is an array('hidden', 'hidden'). This is not supposed to happen, $form['#type'] is always supposed to be a string.
There are four places in the module code where '#type' is set to 'hidden'. One of these must be getting merged or flattened when a form is built.
It looks like the problem might be happening with in the 'Default value' area. When I tried to submit the settings for my address field, one of the fields that I set to 'Hidden' was failing validation in the 'Default value' area, despite the fact that it was not required.
I strongly suspect this code here:
That is all the time I can spend on this. I hope it is enough to get this fixed.
Comment #4
ISPTraderChris commentedJust wanted to confirm that this problem does seem to arise as a result of flagging fields as 'Hidden' rather than 'None'.
Comment #5
fayola commentedYep I can confirm this as well. The errors repeat for each address field marked as hidden.
Comment #6
loominade commentedconfirm problem.
subscribe
Comment #7
gewillson commentedYes, this happens. Subscribing.
Comment #8
hongpong commenteddid this ever come to a resolution? subscribing
Comment #9
Anonymous (not verified) commentedThis still happens.
Comment #10
AlexisWilke commentedAssuming #3 was on the right track, we are probably missing a
'#tree' =>true somewhere.Let me know whether the attached patch does anything good for you.
Thank you.
Alexis
Comment #11
AlexisWilke commentedI suppose you're using version 6.x-1.12?
Comment #12
Anonymous (not verified) commentedHmm, I think I may had downgraded to 1.10 due to another bug: http://drupal.org/node/899732
So if this is fixed in 1.12 it might not anymore.
Comment #13
ratinakage commentedI experienced this issue with version 1.12 and the patch #10 fixed it for me!
Thanks...
Comment #14
AlexisWilke commentedOkay, I applied the patch to the development version. I will publish as 1.13 if one other person says it fixes the problem. The development version is the same as 1.12 + patch in #10 at this point.
Thank you.
Alexis Wilke
Comment #15
merzikain commentedThe patch doesn't fix it for me.
What I get is:
warning: Illegal offset type in /home/content/88/4800788/html/includes/form.inc on line 1378.
warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/content/88/4800788/html/includes/bootstrap.inc on line 856.
And on top of that the address option doesn't even show up on the node form.
Comment #16
deggertsen commentedSame problem here. I get the following:
warning: Illegal offset type in /includes/form.inc on line 1378.
warning: htmlspecialchars() expects parameter 1 to be string, array given in /includes/bootstrap.inc on line 856.
I do see the address option on the form unlike @merzikain. And the form does still seem to work for the most part. However, I have received reports from some people that they are not able to successfully submit the form so this may be a bigger problem. I'm setting this to a higher priority for this reason, but if I'm wrong on this feel free to set the priority back down.
Thanks
Comment #17
otherroutes commentedI can confirm this issue is not fixed with the patch.
I am using 6x-1.12 and the patch applied at #10 applied. I have three fields marked as hidden and get the following error:
warning: Illegal offset type in [site]/includes/form.inc on line 1378.
warning: Illegal offset type in [site]/includes/form.inc on line 1378.
warning: Illegal offset type in [site]/includes/form.inc on line 1378.
warning: htmlspecialchars() expects parameter 1 to be string, array given in [site]/includes/bootstrap.inc on line 860.
warning: htmlspecialchars() expects parameter 1 to be string, array given in [site]/includes/bootstrap.inc on line 860.
warning: htmlspecialchars() expects parameter 1 to be string, array given in [site]/includes/bootstrap.inc on line 860.
I changed the hidden to none and the errors went away, but the address was still not formatting correctly. So I removed the field and added it back. Now it's not showing at all!
Comment #18
taran2lAttached patch fixes described problem.
Also some other parts of the module's code have been rewritten to fix other related issues.
Please review.
Comment #19
eric66 commentedPlease discard this post. Tried to patch the wrong version :-(
Comment #20
rolodmonkey commentedComment #21
rolodmonkey commentedSince Drupal 6 is no longer supported, I am closing this issue.