Jump to content
TNG Community
efgen

Census Plus International - issues upgrading from 10.1.0.3 to 12.0.0.7

Recommended Posts

efgen

I just upgraded from TNGv10 to TNGv12 and am working on updating mods.  I had 10.1.0.3 of Census Plus installed and am upgrading to the latest, 12.0.0.7.  However, the upgrade instructions are unclear in regards to the Label table & indexes.  Seems like the upgrade instructions on the Wiki are still for the 11.x version, and the upgrade instructions in mod manager assume I already had a .5 or .6 version installed.

The instructions on the Wiki say:

Quote

 

If upgrading from versions prior to any of the 10.1.0.4 or .5, 11.0.0.4 or 5, or to 11.0.2.5 versions:

...

6. Create CPI Label table

Note that this is required if upgrading from 10.0.0.4/11.0.0.4 or 10.0.0.4a/11.0.0.4a to add new Ancestry column labels

1. If you have already created the CPI indices in a prior upgrade, you can ignore this step

If already created, clicking this button will return a Cannot execute query
(#1061 - Duplicate key name 'BaseID' if you run it in phpMyAdmin)

 

 

There's no button in mod manager that says "Create CPI Label table."  However, in the section about upgrading from .5/.6, there's an "Update CPI Label Table" button.  So I did click that one... and got a message saying that it successfully created the table.

There's another button in mod manager that says "Create New CPI Indexes," also in the section about upgrading from .5/.6.  I tried clicking that one, but I get a 404 for the cpcreatenewindeces.php file.

I do see that the mod should have copied all the cp*.php files and some others from the censusplus_v12007 folder (which I did upload to the mods folder) to my TNG root directory when I did the mod install.  However, the files never made it to my root directory.  Mod Manager does say that it copied the files, though and there are no install errors.

So my questions:

- How do I fix the mod install and ensure the files get copied?  I know I can manually copy them, but if I do that, is there anything else I'll still need to fix?

- Which buttons do I really need to be clicking to complete the upgrade from 10.1.0.3?

Thanks!

Elise

Share this post


Link to post
Share on other sites
Ken Roy

Elise,

You should have upgraded the mod when version 10.1.0.4 was posted 2 years ago.  I guess I was not expecting users to NOT update their mods for so long.

I may have to research some of this since my short term memory is not what it used to be.  The Update CPI label may in fact delete and rebuild the table.

I do not understand why the modules are not in your TNG root.  How did you do the upgrade?  It should be done on top of existing directory and not by creating a new directory structure which requires other changes for things to work.  If you created a new directory structure, then your genealogy URL or TNG root path might not be correct.

Share this post


Link to post
Share on other sites
efgen

Ken,

Life got in the way!  I had mods installed that don't have updates and won't work with v12, so life gets in the way for some mod devs too ;) 

I haven't changed the directory structure.  Root -> mods -> censusplus_v12007.  I deleted the old version via Mod Manager, uploaded the new mod file and folder to my mods subfolder, then ran the Install script from Mod Manager.

Elise

 

Share this post


Link to post
Share on other sites
Ken Roy

The Update CP Label button should create the required cp_label table. 

You could try clicking the Create CPI Indexes button in the new install section and let me know if that worked.

Try uninstalling and re-installing.  I do not understand why the cp modules do not end up in your TNG root folder.

Share this post


Link to post
Share on other sites
efgen

So I uninstalled and reinstalled the mod.  I also realized that I had to do a force-refresh in winscp to see the updated contents of the root folder, for some reason.  So maybe I was seeing a cached list of files before and that's why I wasn't seeing them.  Now I see many cp*.php files there, with today's date. 

However, I'm still not seeing cpcreatenewindeces.php (I do see cpcreateindeces.php though).  I checked the mod source and I actually don't even see the cpcreatenewindeces.php file in the list of copyfile commands.  The "Create New CPI Indexes" button calls this file, though... so where does this file come from?

Elise

 

 

Share this post


Link to post
Share on other sites
Ken Roy

Elise,

I pulled the cpcreatenewindices.php file, but it looks like I forgot to delete the button.  What happens when you click the Create CPI Indices button in the New Install section?

Share this post


Link to post
Share on other sites
efgen
Quote

Create Indices for Census Plus International mod tables

ALTER TABLE `cp_data` ADD INDEX `BaseID` ( `cpbaseID` ) ... An error has occurred in the TNG software. This could be due to a setup issue, an incomplete upgrade or a program bug. If you are the site owner, you may contact TNG support for help with this problem. Please copy the query below and paste it into your message.

Query: ALTER TABLE `cp_data` ADD INDEX `BaseID` ( `cpbaseID` ) 

Duplicate key name 'BaseID'

 

My tables currently have the following indexes:

cp_data: BaseID, Surname, Location

cp_link: DataID, BaseID

cp_summary: DataID, BaseID, LinkID

cp_veteran: DataID, BaseID, LinkID

 

 

Share this post


Link to post
Share on other sites
Ken Roy

Thanks Elise,

I just need to remove the button for Create New Indexes and reword the Update CP Label then.  If you do not show in the Sites Using this mod, please add your site as using the mod

Sorry for any confusion on upgrading.  I need to post a new version to fix a minor warning if sites use PHP 7.2 and will update the wording then.

Share this post


Link to post
Share on other sites
efgen

Ken,

My tables are still missing several indexes that are created by the cpcreateindeces.php file for a fresh install... so seems like the cpcreatenewindeces.php file is actually needed?

Link, Veteran and Summary are missing the Tree index. 

Link is also missing PersonID and EventID.

Elise

 

Share this post


Link to post
Share on other sites
Ken Roy

I will have to research this.  I do not remember if I had a script that added new indexes in vnn.nn.nn.4   I believe the cpcreatenewindexes.php  was adding other indexes that would not provide any benefit. 

Sorry but the vnn.nn.nn.4 update was made over 2 years ago, so I have to find old versions of the mod to figure things out.

Share this post


Link to post
Share on other sites
Ken Roy
On 7/16/2018 at 2:59 PM, efgen said:

Ken,

My tables are still missing several indexes that are created by the cpcreateindeces.php file for a fresh install... so seems like the cpcreatenewindeces.php file is actually needed?

Link, Veteran and Summary are missing the Tree index. 

Link is also missing PersonID and EventID.

Elise

 

Elise,

Best I can tell, those index fields were those being added by the cpcreatenewindices.php file that I pulled because they were not going to solve the problem that had been reported.  It looks like I forgot to replace the cpcreateindices.php with the previous version of the file that did not not have those fields as part of any index.

I know I do not have those fields on my production site

Share this post


Link to post
Share on other sites
Ken Roy

Elise,

Thanks for surfacing this issue.  I have updated the mod cfg upgrade instructions to remove the create new indexes button and indicate that the Update CP Label button also creates the required cp_label table when upgrading from any vnn.nn.nn.04 versions of the mod

It also fixes a couple of warning errors if using PHP 7.2.6. 

No need to update unless you are running PHP 7.2.6

Share this post


Link to post
Share on other sites
Ken Roy

I had not added any census entries to my site in a long time.  After adding new census transcripts to my genealogy database and then doing an import, I discovered that the Import Secondary process the Checks Census Links was not flagging census transcripts that were linked but did not have a Census Event for the newly linked persons.  So I have posted a new version of the mod that only updates the mod cfg file

Share this post


Link to post
Share on other sites
jayat1familytree

Ken, 

I see you have a create indexes for the Census Plus. 

Could that be used as a guide to create a MOD to add the indexes as mentioned in the tng wiki?

https://tng.lythgoes.net/wiki/index.php?title=Add_indexes_to_your_database

 

 

Share this post


Link to post
Share on other sites
Ken Roy

Jay,

You can use it or the TNG database upgrade script.  Personally, I do not create those INDEXes so have no interesting in adding another mod that I need to support.

Of course you can just create the INDEXes in phpMyAdmin using the syntax provided.  The syntax is different if you create a script to do it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×