Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: No State/Province in Add member form, but add thirdparty does have it #32446

Closed
JonBendtsen opened this issue Dec 21, 2024 · 11 comments
Closed
Labels
Bug This is a bug (something does not work as expected)

Comments

@JonBendtsen
Copy link
Contributor

Bug

When adding a new member, and you select a country which has states/provinces, it does not show any states/provinces based on the selected country. This does work when adding a new thirdparty.

Dolibarr Version

20.0.0 docker image

Environment PHP

8.2.7

Environment Database

MariaDB 11.5.2-MariaDB-ubu2404

Steps to reproduce the behavior and expected behavior

Enable member and thirdparty modules

click create new member, select France as country, no states/provinces appear which I would expect because I get states/provinces when I do the same with a new thirdparty

Attached files

add_member_france_no_provinces
add_thirdparty_in_france_which_does_have_provinces

@JonBendtsen JonBendtsen added the Bug This is a bug (something does not work as expected) label Dec 21, 2024
@JonBendtsen
Copy link
Contributor Author

Same issue with United Kingdom and United States. This works under Thirdparties, but not under Members

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen i don't have this problem in v20 !

@JonBendtsen
Copy link
Contributor Author

@JonBendtsen i don't have this problem in v20 !

oh, that is particular. Are you also running 20.0.0? or one of the other versions?

How do we track down why we experience a difference?

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen i use 20.0.2 ( + last fixes in 20 branch)... try to upgrade to 20.0.2

@JonBendtsen
Copy link
Contributor Author

Hey @hregis the bug persists even with v20.0.2 docker image. How can we track down other differences between your and my installation?

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen line 1082 of "adherents/card.php"

if ($soc->country_id || GETPOSTISSET('country_id')) {
	print img_picto('', 'state', 'class="pictofixedwidth"');
	print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOSTINT('state_id') : $soc->state_id, GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : $soc->country_code);
} else {
	print $countrynotdefined;
}

@JonBendtsen
Copy link
Contributor Author

@hregis this worked, I suppose it will end up in v20 or v21?

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen 20.0.3 :-)

@JonBendtsen
Copy link
Contributor Author

@hregis how come I didn't find another issue with similar title when I searched for it?

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen maybe fix in develop branch and backported to 20 branch ?

670e646

@JonBendtsen
Copy link
Contributor Author

@hregis okay, I would not have found that even when searching for member and state/province in Pull Requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

2 participants