Jump to content
TNG Community

Person ID Prefix Change


tngrlkrz

Recommended Posts

I am testing  changing TNG's  personID from 'I' to 'P'.   TNG is rebuilt from a gedcom exported from Family Historian totally with every update.  '@I' is was changed to '@P' with a text editor in the gedcom before import to TNG.  All appears to work OK except for calls to 'my page' , 'my bookmarks'  still creating a url with the 'I' prefix in the variable 'mypersonID' .  Somewhere that variable is still getting loading with the 'I', even though admin:setup:prefixes has been changed for Individual to 'P'.  

Any idea where to look for this? Wingrep shows numerous php files use the 'mypersonID' variable, but I don't see the prefix being loaded with the 'I'.

The reason for changing the prefix is the 'I' is used on quite a few screens (and more so with the mods I've installed), and I utilize user-selectable fonts as well, so font changes to make the 'I' not look like the number '1' are a bigger challenge.

 

UPDATE:  The issue is resolved.  I overlooked changing the prefix in the TNG  users database .  Now all works wonderfully.

Link to comment
Share on other sites

  • 2 weeks later...
Paul Barrett

I had a similar issue after importing a gedcom from Ancestry.  I got a P prefix too and had to tweak things.

I exchanged email with Darrin on the topic and suggested the gedcom import utility could have a prompt to change P to I during import to avoid these downstream issues.  He said he'd think about it.

 

Paul

Link to comment
Share on other sites

I intentionally switched to 'P' because of the 'I' looking like numeric, and I have the Person ID appearing in many places, some customized.  So I found a simple editor find/replace in the gedcom to be imported from Family Historian (on a regular basis, the complete tree) did the trick.  But thanks for suggesting to Darrin.

 

Link to comment
Share on other sites

1 hour ago, Paul Barrett said:

"I" looking like a number.  Very good point

So maybe the answer is to go with the flow and default TNG to use P?

Except the flow in that direction is pretty small - driven by Ancestry.com

Most of the rest of the genealogy software world uses I and has done for more than 30 years.

Roger

Link to comment
Share on other sites

7 hours ago, Hiraeth said:

The ID prefix need not look like a number. Try this mod: http://tng.lythgoes.net/wiki/index.php?title=ID_Prefix_Format

Yes, for those two places, with a mod. Alternatively css files could be modified.  But there are numerous other places the person ID appears, especially in various Mods. And I have user-driven template selection, too much styling to change, so I chose 'P'.   TNG, unlike other software, doesn't have a depend on a fixed prefix, but displays it in enough places to warrant the change (for me).  

Since I rebuild from gedcom in periodic updates from Family Historian, which does  have a fixed 'I' person prefix, a simple quick edit find/replace changes all prefixes in the gedcom in seconds before import to TNG.   Have had zero issues since this change.  

 

8 hours ago, Paul Barrett said:

"I" looking like a number.  Very good point

So maybe the answer is to go with the flow and default TNG to use P?

TNG doesn't really need to change anything, and is prefix-tolerant.  If you're referring to the admin:setup: default prefix, that won't change existing persons in the database, but will impact some functions such as the Search and Relationship modules, and some Mods which use that setting.

Link to comment
Share on other sites

Paul Barrett

I had to fix a problem with media not importing from Ancestry.  So I deleted my database and started over.

This time instead of importing direct from Ancestry (which Is where my 'P' prefixes originated from), I inserted Family Tree Maker into the path, because by syncing Ancestry with FTM, I could retrieve the media from Ancestry. Then I could used GEDCOM export from FTM to get it all into TNG.

That worked, but in the process, I got 'I' prexies for ID's.  So FTM changed Ancestry's  P's to I's.  I am sticking with I's even if they do get mistaken for 1's.  Prhaps i should change the font in the template? :)

Link to comment
Share on other sites

1 hour ago, Paul Barrett said:

Prhaps i should change the font in the template? :)

Hi Paul, There is a ID Prefix Format mod that makes the ID prefix more legible and obvious.

edit... this has been pointed out earlier in this thread - thanks Graham

Link to comment
Share on other sites

As the OP of this thread, I responded as to why the ID Prefix Format mod wouldn't cover enough situations for me, so I do a gedcom conversion handily, but perhaps would work for Paul.

 

Link to comment
Share on other sites

If anyone does choose to switch prefixes (as I have), there is one important fallout to be aware of: any google search history url's which contain a personID will now return a '404 not found' to the browser since the prefixes no longer match.   I shall have to wait for new history to be generated. But I'm still going forward and like the change.

 

Link to comment
Share on other sites

1 hour ago, tngrlkrz said:

I do a gedcom conversion handily, but perhaps would work for Paul.

On another post I suggested he get the free version of Legacy. Maybe he could use that program to change the ID prefix as well?

 

Link to comment
Share on other sites

4 minutes ago, tngrlkrz said:

If anyone does choose to switch prefixes (as I have), there is one important fallout to be aware of: any google search history url's which contain a personID will now return a '404 not found' to the browser since the prefixes no longer match.   I shall have to wait for new history to be generated. But I'm still going forward and like the change.

You could install the Person Not Found Mod to direct users to the People Search function

Link to comment
Share on other sites

2 hours ago, tngrlkrz said:

If anyone does choose to switch prefixes (as I have), there is one important fallout to be aware of: any google search history url's which contain a personID will now return a '404 not found' to the browser since the prefixes no longer match.   I shall have to wait for new history to be generated. But I'm still going forward and like the change.

 

Or you could put a ReWriteRule into your .htaccess file to change the request from the old prefix to the next prefix and tell Google that this is a permanent change

Roger

Link to comment
Share on other sites

10 minutes ago, theKiwi said:

Or you could put a ReWriteRule into your .htaccess file to change the request from the old prefix to the next prefix and tell Google that this is a permanent change

Roger

Roger, what statement would accomplish that?  Currently, ICDsoft checked and said my .htaccess is working OK, excepting for the prefix change  My file looks like this now:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Redirect permanent /genealogy https://www.kmtrees.com

Note that the last line was inserted because I recently moved TNG up one folder level and no longer have a /genealogy/ folder.  That  redirection is working fine, except for getperson.php or any other url with the personID in it.

Ron

Link to comment
Share on other sites

2 hours ago, Ken Roy said:

You could install the Person Not Found Mod to direct users to the People Search function

Ken,

Thanks, will take a look at that mod; it would help to redirect users to the people search.

 

Link to comment
Share on other sites

On 3/27/2017 at 7:39 PM, Ken Roy said:

You could install the Person Not Found Mod to direct users to the People Search function

Ken,  just a followup on your suggested mod; I've installed it, but replaced one line (privately) in order display the page header which gives it the look of the website instead of a white page.

in the cfg file, replaced:

header("HTTP/1.0 404 Not Found");

with:

tng_header( $text['logfilefor'] . " $owner", $flags );

Before and After below.Screenshot (475).pngScreenshot (476).png

 

Thanks again.

Link to comment
Share on other sites

Ron,

Thanks for the suggested change.  I will take a look at it.  The mod was provided by Rush Krieger on the forum several years ago.

Link to comment
Share on other sites

Removing that "header" line though means it won't send the required code to the browser / agent so it knows what happened - it will think that it is a regular page that just happens to say "sorry".

You can probably have a page that has both elements - the "header" and then "tng_header"?

Roger

Link to comment
Share on other sites

11 hours ago, theKiwi said:

Removing that "header" line though means it won't send the required code to the browser / agent so it knows what happened - it will think that it is a regular page that just happens to say "sorry".

You can probably have a page that has both elements - the "header" and then "tng_header"?

Roger

No problem, didn't realize the other 'header' had that impact.  I tested with both elements and works fine on my Wamp system.  

However, having an issue with my test website with this Mod unrelated to the inclusion of the elements which I didn't notice; the problem occurs with the original mod as well, The URL after hitting 'search' is constructed improperly as below. Not sure why on that system.

2017-04-02_23-11-27.jpg 

Also works fine on my Live system with both 'header' and 'tng_header' elements included.

The mod is using the line:

    echo "<br />{$text['pleaseuse']} <a href=$tngdomain/searchform.php>{$text['search']}</a> {$text['tolocateperson']}";

I think this centers around the use of $tngdomain. My primary is www.kmtrees.com, but the test system is test.kmtrees.com.

From the config.php on test.kmtrees.com, followed by www.kmtrees.com (live).  

$rootpath = "/home/krzmarzick/www/test/";
$homepage = "index.php";
$tngdomain = "https:/test.kmtrees.com/";  <<<<<found the problem, missing double '//'.
$sitename = "Roots & Relatives Remembered";

Problem solved....$tngdomain was improperly set on my test system.

So, bottom line Ken, after this puttering around, is Roger is right, both elements can be included.

Thanks,

 

Link to comment
Share on other sites

  • 3 months later...

I am back to working on tree after sometime off. Last thing I did was to discover that I have both I from FTM imports and P from new adds. I would like to convert the i to P so that merge can work. Any trick to doing this after the fact?

Link to comment
Share on other sites

Not sure if 'after the fact', but If you can rebuild/clear your TNG database from scratch from a Gedcom, what works for me is to do a find/replace of '@I' with '@P' before the import to TNG.  Also, change the admin/setup/general settings/prefixes and suffixes/  person prefix to 'I'.  Since I 'clear' my tree with each import from Family Historian export Gedcom, I do this regularly. 

Link to comment
Share on other sites

I have > 24,000 people and about 10% are "I". I had hoped it might be as simple as usingphpmyadmin to access the sql file and doing a replace there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...