Web based family history software

Question Global Edit of a Geographic Place Name Possible?

  • ndoggac
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 months 16 hours ago - 9 months 16 hours ago #1 by ndoggac
On v2.1.18, I navigate to "Control Panel / Geographic Data / USA / New York".  On this page I have "St. Lawrence" and "St Lawrence" with >100 entries under each.  Note the missing period in the second entry is the sole difference.  I click on "Edit" for either to try and change all entries to the other and I get a bunch of SQL errors on a pink screen.  I tried in both directions thinking adding/removing a period in an SQL statement might be the issue.

Is there a workaround, or is this considered a bug?

Thanks for any help!

Code:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-St. Lawrence' for key 'vf_place_location_parent_id_place_unique' (SQL: update `vf_place_location` set `place` = St. Lawrence, `latitude` = ?, `longitude` = ? where `id` = 3542) …/vendor/illuminate/database/Connection.php:712 #0 …/vendor/illuminate/database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback('update `vf_plac...', Array, Object(Closure)) #1 …/vendor/illuminate/database/Connection.php(533): Illuminate\Database\Connection->run('update `vf_plac...', Array, Object(Closure)) #2 …/vendor/illuminate/database/Connection.php(466): Illuminate\Database\Connection->affectingStatement('update `vf_plac...', Array) #3 …/vendor/illuminate/database/Query/Builder.php(3063): Illuminate\Database\Connection->update('update `vf_plac...', Array) #4 …/app/Http/RequestHandlers/MapDataSave.php(98): Illuminate\Database\Query\Builder->update(Array) #5 …/app/Http/Middleware/RequestHandler.php(55): Fisharebest\webtrees\Http\RequestHandlers\MapDataSave->handle(Object(Nyholm\Psr7\ServerRequest)) #6 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Http\Middleware\RequestHandler->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #7 …/app/Module/HitCountFooterModule.php(154): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #8 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\webtrees\Module\HitCountFooterModule->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #9 …/app/Module/CheckForNewVersion.php(122): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))

 
Last edit: 9 months 16 hours ago by ndoggac.

Please Log in or Create an account to join the conversation.

More
9 months 12 hours ago - 9 months 12 hours ago #2 by Sir Peter
Replied by Sir Peter on topic Global Edit of a Geographic Place Name Possible?
Control Panel > YOUR TREE > Data Fixes > Update Place Names

Check the proposed changes carefully before applying a bulk update.

EDIT: Control Panel > YOUR TREE > Data Fixes > Search and Replace

Peter
Last edit: 9 months 12 hours ago by Sir Peter.

Please Log in or Create an account to join the conversation.

More
9 months 12 hours ago #3 by Franz Frese
Replied by Franz Frese on topic Global Edit of a Geographic Place Name Possible?
Wrong way (you want to create  something, that already exists (I never tried that)).
I would try to use the "data fixes" for changing.

Please Log in or Create an account to join the conversation.

More
9 months 12 hours ago - 9 months 12 hours ago #4 by Franz Frese
Replied by Franz Frese on topic Global Edit of a Geographic Place Name Possible?

Control Panel > YOUR TREE > Data Fixes > Update Place Names

Check the proposed changes carefully before applying a bulk update.
Is there a description of what this tool does? (Besides: you must enable this in control panel)
The only description I found is : Update the higher-level parts of place names, while keeping the lower-level parts. That does not describe, what the tool does.
For me it seems as if in this case the "lower part" has to be changed?

!! crossing answers!
Last edit: 9 months 12 hours ago by Franz Frese.

Please Log in or Create an account to join the conversation.

More
9 months 8 hours ago #5 by fisharebest
Replied by fisharebest on topic Global Edit of a Geographic Place Name Possible?
> Is there a workaround, or is this considered a bug?

It's a bug, in the sense that you've triggered an unexpected exception in the code.

But it's also user error in that you are trying to rename a place to another place that already exists.

Remember that this is a gazetteer - a list of place names with their coordinates.

Changing this won't changing the data in your genealogy. webtrees finds "St. Lawrence" in your data, and then uses this "geographic data" to find the location so it can display it on a map.

To update your genealogy data, use the tool as described above.

"Higher level" means that if you want to rename "Georgia" to "GA", then you have to be aware of things like this:

Georgia, United States
Tblisi, Georgia

So, you'd need to change "Georgia, United States" => "GA, United states" - and not just "Georgia" => "GA".

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
9 months 8 hours ago #6 by Franz Frese
Replied by Franz Frese on topic Global Edit of a Geographic Place Name Possible?
Isn't Georgia in Tblisi, Georgia a higher level? It is a country while on the other hand it is (only) a state?

Please Log in or Create an account to join the conversation.

More
9 months 4 hours ago - 9 months 3 hours ago #7 by hermann
When using that data fix, you have to specify all the top hierarchy levels that are used in your tree.

If you rename "Georgia" to "GA" in Gregs example the result will be - when I remember it right -
- Georgia, United States (not modified)
- Tblisi, GA

If you rename "Georgia, United States" to "GA, USA" the result will be:
- GA, USA (and all locations like "x, y county, Georgia, United States" will become "x, y county, GA, USA")
- Tblisi, Georgia (not modified)
    

Hermann
Designer of the custom module "Extended Family"

webtrees 2.1.21 (all custom modules installed, PHP 8.3.12, MariaDB 10.6) @ ahnen.hartenthaler.eu
Last edit: 9 months 3 hours ago by hermann. Reason: typo fixed

Please Log in or Create an account to join the conversation.

More
9 months 3 hours ago #8 by Sir Peter
Replied by Sir Peter on topic Global Edit of a Geographic Place Name Possible?

When using that data fix, you have to specify all the top hierarchy levels that are used in your tree.

If you rename "Georgia" to "GA" in Gregs example the result will be - when I remember it right -
- Georgia, United States (not modified)
- Tblisi, GA

If you rename "Georgia, United States" to "GA, USA" the result will be:
- Georgia, USA (and all locations like "x, y county, Georgia, United States" will become "x, y county, GA, USA")
- Tblisi, Georgia (not modified)
 
This is correct and the reason why I edited my post.
Option 1: Control Panel > YOUR TREE > Data Fixes > Update Place Name
Replace St Lawrence, New York, USA with St. Lawrence, New York, USA
Option 2: Control Panel > YOUR TREE > Data Fixes > Search and Replace
Replace St Lawrence, New York, USA with St. Lawrence, New York, USA
or simply replace St Lawrence with St. Lawrence
In any case be caryful, i. e. export your tree or create a database backup and have a look at the proposed changes before applying them.

Peter

Please Log in or Create an account to join the conversation.

  • ndoggac
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 months 4 weeks ago #9 by ndoggac
Thank you so much everyone!!

I went with Option 2 (first I did a backup of course). I also have snapshots of the entire docker container it runs in too - so double backups.

Cross-referenced the number of results from the search & replace query, to the counts under the erroneous place name, and they matched exactly.

I also reviewed the first few to make sure they looked proper. Ran the "update all" for individuals, and then repeated for families.

Voila, all fixed.

That was so easy thanks to the experts here. Much appreciated.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum