-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow different Addresses per different Sites #11
Comments
Hi Lindsey, good to see you've still got this on the roadmap! I remember we discussed this a while back, when the plugin was still SmartMap. We really need this feature as our sites are mainly English/Thai, and Thai has its own script. The same issue would, of course, come up with China, Japan, the Middle East nations and a host of others. For example, with the location "Chiang Mai, Thailand" Although the location data can be looked up in English, we use the Google Maps address fields (along with some custom fields) to populate the marker popup and the entry page. So we really need the Thai version if possible :-) Thanks so much for considering this, Andrew |
Certainly, no problem! I still regard it as one of the more important issues. 🙂 Once some of the 4.1 issues are resolved, I look forward to knocking this out in 4.2. |
I have a project I'm currently working on that could really use this feature. In our case, it's a multi-site where we have location data for each site in a global. Since I can't set the address field as translateable, the location info is shared between both sites (even though they have separate addresses). I would need to look at setting things up differently to make it work as things are now, so getting this support would be a huge plus. |
@lindseydiloreto Hey Lindsey, any updates on supporting translation methods / multi-site support? This might become very relevant to an upcoming project. Is this still planned, and if so, is there any kind of ETA you can share? |
Any update on this? Currently running into the same issue with a multisite and an address field in globals. |
I believe I finally have this done... Would anyone on this thread care to pull the latest dev version and test it? "doublesecretagency/craft-googlemaps": "dev-v4-dev" This is currently only available on Craft 4. Once it is deemed stable, it will be ported to Craft 5. Multisite SupportThis update formally introduces multisite support. In other words, an Address can now contain different values for each site in your project. All standard translation methods are supported. Once this feature is confirmed to be working and stable on Craft 4, I will tag and release a Google Maps update. Additionally, I will also port this feature to:
For anyone willing to take it for spin, please let me know once you've run some tests. I'm eager to hear how it goes! 🙏 |
Hi @lindseydiloreto, that’s great news! Sadly, though, I'm not currently running any Craft 4 sites, and I'm not sure when I might have time to spin one up for testing. I'll try to do that, but with any luck, some of the others will be in a better position than I am. |
That's great, I have some development research time Friday next week where I can give it a test. |
@lindseydiloreto Just gave this a try, looks good to me 👍 Added a small cosmetic comment here, but everything seems to be working: c0db643#r142853593 One thing to note is that this will multiply the number of rows in the database with the number of sites. As I mentioned on Discord, I think this is the best way, just something to note. Probably useful to mention this in the docs or changelog. Might have performance and storage space implications for sites with tons of addresses and sites. In theory, it might be possible to leave the site ID empty if the field is set to not be translatable and only save the address once in this case. However, I'm not sure if this will work with the way the address table is joined in |
@MoritzLost Ok great, thanks for testing everything! 🙏 I agree that this table structure (a row for each site) is probably the best approach. It seems to work well with how Craft handles things internally, and is hopefully somewhat future-proof. Per your advice, I just added a migration warning to both the CHANGELOG and the docs. Thanks for looking over everything, it's greatly appreciated! 🍺 |
The Address field should be aware of which Site is being edited. Currently, all Sites share the same Address data.
I believe it's mostly a matter of adding a
siteId
column to the Address table in the database. We'll find out how true that is once I dive into the task.This feature is expected to be released as early as v4.1, or as late as v4.3. If anything changes, I'll post back to this thread!
The text was updated successfully, but these errors were encountered: