Hi
My other issue is that a country is required even if I de-select the Country field in "Customize fields to use".
In the help text, we're told:
"Note: normally, the following fields are REQUIRED but will not be (naturally) when not used: Country, State, Zip, City, Address"
however when I disable it, I get the following warning when trying to add billing info:
Illegal value for Billing address's Country field. You must select a Country from the dropdown list.
Though I didn't make address info required.
Do you have any idea why this is happening? I'd really like to not display the country (since this website is only for one particular state in the US).
Thanks,
Scott
Comments
Comment #1
rconstantine commentedI'll look into it. So to make sure I'm clear, the address itself is not required and the field is disabled, right? Do you have a default country specified?
Comment #2
scottrigbycorrect:
- address "required" checkbox is not selected.
- field in 'customize fields to use' is not selected.
For a moment I thought maybe it was because I had "united States" selected in the 'Allowed Countries' fieldset. But I deselected it, saved the content type, then edited billing info for another user in a seperate browser and no dice. The same error as above.
should I add the devel module to help troubleshoot?
[I can do that tomorrow]
Thanks
Scott
Comment #3
rconstantine commentedTry replacing the following function with this code:
Sorry it isn't a proper patch.
Comment #4
rconstantine commentedAnd for the node display, try replacing this function too:
If this checks out for you, I'll roll a new version.
Comment #5
rconstantine commentedOkay, my tests allow me to turn off everything a at least with the field not required at all, I was able to show only Address, City, ZIP, and Suite with no submission problems. Hopefully you find the same results. I'm off to check a couple of other combos.
Comment #6
rconstantine commentedNote, the above solution does not prevent the country and state from being stored, it uses the defaults. So make sure in your case that you set them.
Comment #7
rconstantine commentedSetting the overall required-ness for the field works; only the fields marked as visible become required for real and the submission works fine.
Comment #8
scottrigbyGreat - this seems to work well, thanks!
should I try to turn this into a patch (I've never done that before , but I see the basic idea using + & -)?
PS, there's still an error when I go to edit the address field:
Should I see this as a completely separate issue?
Thanks again
Scott
Comment #9
rconstantine commentedDid you save all cck fields again per my upgrade instructions?
If so, then yes, it should be another issue. Don't worry about making a patch. Now that you've tested this, I'll just do another release. But just to make sure your error IS a separate issue, please do the following for me...
Download and install the 'devel' module. Activate the 'backtrace' feature. You shouldn't have to activate anything else. Make sure your error reporting (standard Drupal feature) is set to screen and log, not just log. Then visit the offending page. You should get a reverse order list of function calls that made the error, including line numbers and arguments. Either copy the whole thing and post it here, or find the function and line from my module that is causing it and just give me that and the arguments. Then we'll decide whether it's another issue or not.
Comment #10
rconstantine commentedComment #11
scottrigbyI haven't done this yet (devel module, backtrace) - apologies - i was away and am now back working on this project. I have other issues to attend to on this, but will try to follow these steps later today. Thanks, Scott
Comment #12
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.