- Issue created by @senzaesclusiva
- ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
@senzaesclusiva does area structure of the Italy somehow different from the USA/CA ?
For example we know the structure - it looks like:
US:
State > City
State > Village
State > Town
CA:
Province > City
Province > Town
..
Ukraine:
Oblast > City
Oblast > VillageAny chance that it is different somehow?
- ๐ฎ๐นItaly senzaesclusiva
Hi @dstorozhuk
In essence there are two structures in Italy
region->city
province->city
but the latter depends on the former as a correspondence. The complete one is
region->province->town (small town, village, etc)If in the select list you give the option to enter either the province or the region (try to imagine a professional use for collecting traders in a trade sector), you will never be able to do a complete search by 'region' because someone will surely enter the province and it will not be found.
It is as if there were additional administrative areas in Ukraine, each comprising several oblasts, and then the structure would be
Something > oblast > city
Somethingelse > oblast > cityI don't know if I explained this well; if I didn't, let me know what is not clear
- ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
@senzaesclusiva I see.
So just to add some clarity about purpose of this module.
This module is not for collecting shipping/delivery address information. It doesnโt provide any validation on the entered address and itโs structure.
The module idea was to create a simplified version of the Address module, which exists as standalone project.
This module can be used if you need collect address information for some non-strict cases.
It simplifies the Country/Administrative area selection, but that all what it can as opposed to Address module, which add country-specific address structure, validation, etc.However, I have to check why you can see City in State/Province. Itโs can be because of the error in code/source data, or some cities/admin arras intersecting by names.
- ๐ฎ๐นItaly senzaesclusiva
Absolutely agree. I never imagined it as a replacement for Address, just an easier module to collect addresses where they are needed.
It's just that when they become many and you have to do a search, each field must have homogeneous data.
Unfortunately I don't have the technical skills to understand if there is some error code or conflict with some library.
Keep in mind that I am testing on a D10.2.1 from scratch on Php 8.1.13, if that helps, and I have installed Admin Tollbar and Simple Address only by using Composer 2.6.6.Thank you very much for your interest
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
I guess the issue is that the state_province.json file contains Italian region names and Italian province names, but it uses the name of the main city for the latter. For example, where it says
"state": "Brescia"
, it should say"state": "Province of Brescia"
. Brescia is a city, like Milan. - ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
According to the Wiki, https://en.m.wikipedia.org/wiki/Brescia is city and comune. And comune is an administrative division of Italy. https://en.m.wikipedia.org/wiki/Comune . Probably, that is why Brescia appears in state_province.json. BTW, state_province.json was taken from Address module.
- ๐ฎ๐นItaly senzaesclusiva
The problem is that in many regions the main cities name the province itself. Brescia is both city and province.
If one lived in Brescia would have to write
Contry: Italy
State/province: Brescia
City: Bresciabut one data item is missing, the (administrative) Region
For that I find it more correct:
Country: Italy
State/province/region: Lombardia
City: BresciaIt is just a matter of changing the label and the admin telling the user how to fill in.
What is certain is that the field 'State/provinces/region' should not contain both provinces and cities, it is confusing. - ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
@apaderno , if you have some suggestions how to make more clear for the end user, keep it unified across the countries and not overcomplicate the module - i am open.
From my side I know that it is totally fine to name Region Kiev, or Vinnitsa, and and on the use same name for the city.
Probably some hook? For Administrative Division field? - ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
@senzaesclusiva you are talking about the field label.
Ok, probably we can allow site owners to select how to label the Administrative Division field.
Like State/Province or State/Province/Region.
Or, probably even better - just allow to name that field according to particular site needs.
So by default, it always State/Province, but then site admin can got change the label according to the site specific needs. - ๐ฎ๐นItaly senzaesclusiva
@dstorozhuk I would never dare to ask a developer to make major interventions on his own module.
As I see it, I would just leave the possibility of renaming the label and leave only the regions in the select list.
It is no big deal for the user to write the city (with the abbreviation of the province, if necessary) address and postcode.
So a minimal thing that does not change anything on the whole setting.For the rest I would check the compatibility with Views, which I do not understand why only for those two fields (country, state/province, does not produce results)
Simple Address is an excellent substitute for Address, for those who do not need to do all the checking that Address allows.Thanks for everything, if you can, and sorry to bother you
A good evening - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
In Italy, city is just a title given to some comune from the President of the Italian Republic. Speaking of city of Brescia and comune of Brescia, there is no difference, since they both cover the same territory.
I would rather do like senzaesclusiva suggested, and give as Italian administrative sub-divisions the regions, so for Brescia I would select Italy as country and Lombardy as "state."
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Using Brescia as example (as I live there), I would enter Italy, Lombardy, Brescia. I would not enter Italy, Lombardy, Province of Brescia, Brescia nor Italy, Lombardy, Comune of Brescia, Brescia.
- ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
@apaderno, I believe you agree with me that we can't adopt the module for Italy only and ignore other countries.
The Address module also does not have Lombardy in province field. It has only "Brescia" in province.
https://master-usbivelh0mploaxoplh13ac1evgwqctn.tugboatqa.com/node/add/a...@senzaesclusiva
Check the latest dev version. It should have the ability to change the Label of the State/Province column to one that more reflects particular site needs.
`composer require 'drupal/version_information:^1.0'`.The Views integration needs more work, since full country name and province are not stored in DB now. Probably, I just need to store the full country name and state name in DB to make searchable with exposed filters and context.
- ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
- ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
@goodboy - if you have time and will - it could be nice to provide that integration with Views for country name an state/province to make them searchable.
- ๐ฎ๐นItaly senzaesclusiva
Many thanks @dstorozhuk, sorry for my two-day absence.
This afternoon I will try the dev version
Ps: "The Address module also does not have Lombardy in province field. It has only "Brescia" in province."
- This is an "error" also in Address. Eg. Lombardy has 12 provinces. If you want to make a selection of the whole region you can still do it, but you have a query filter with 12 'and'.
Some Address modules that add/complete data for a state (I tested the one for Germany) insert 'administrative zones' (or regions as we call them in Italy)
I will let you know and thanks again - ๐ฎ๐นItaly senzaesclusiva
Hi @dstorozhuk
tested the dev version. I would say it fits well with what I wanted to achieve.
Thanks for everything - First commit to issue fork.
- ๐บ๐ฆUkraine goodboy Kharkiv, Ukraine
goodboy โ changed the visibility of the branch 3414590-redundancy-in-italian to hidden.
- ๐บ๐ฆUkraine goodboy Kharkiv, Ukraine
goodboy โ changed the visibility of the branch 3414590-redundancy-in-italian to hidden.
- Status changed to Needs review
10 months ago 9:51pm 23 January 2024 - Status changed to Needs work
9 months ago 8:26pm 6 March 2024 - ๐บ๐ฆUkraine Kostiantyn
Just finished testing. The filtering works for all fields except for field_adress:state. When the checkbox "Display the State/Province name instead of the state code" is enabled, the filtering for this field doesn't function as expected. It searches based on codes like AO-CNN instead of the actual name (see screenshots), even though it displays the name. If this is not related to this issue, then it can be closed.
-
dstorozhuk โ
committed 8acfa700 on 1.0.x authored by
goodboy โ
Issue #3414590 by goodboy, Kostiantyn, dstorozhuk, senzaesclusiva,...
-
dstorozhuk โ
committed 8acfa700 on 1.0.x authored by
goodboy โ
- ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
@Kostiantyn we can close that task and merge. I will open a separate issue for Search By State.
- Status changed to Fixed
8 months ago 6:03pm 2 April 2024 - ๐จ๐ฆCanada dstorozhuk Chicago ๐บ๐ธ, Toronto ๐จ๐ฆ, Kyiv ๐บ๐ฆ
Automatically closed - issue fixed for 2 weeks with no activity.