Jump to content
TNG Community
MadRanger

Please customize this page!

Recommended Posts

MadRanger

Could some one please tell me what step I might have missed in upgrading from TNG v11 to v12 on my XAMPP server?

After going thru the upgrade process to include saving the specified set of files, the format for my home page is now missing as confirmed by the note at the page bottom: Please customize this page!  I reviewed the install instruction several times to see what I missed.  I haven't determined where my error was.

As I worked to resolve the problem I looked at the Setup/Configuration/Template Settings and it reconfirmed what I already knew with this display:

" 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: SELECT * FROM ORDER BY template, ordernum"

My production site is still running v11.

Thanks,

Regis

As I continued to work the issue, I found this on tng-wiki - unfortunately, I accomplished step 6 during the upgrade before I came across step 5:

To minimize the impact of the Template Settings move to the TNG database, the following steps are recommended as part of the upgrade:

  1. Copy your templateconfig.php file to a backup location before you do anything else with the upgrade
  2. Backup your configuration, template files, and TNG database tables
  3. Uninstall all your TNG Installed mods and Clean Up all Partially Installed mods
  4. Follow instructions in upgrade readme Step 2 through 5
  5. Before Step 6 in the upgrade readme, copy the templateconfig.php file you saved in step 1 above back to your config file location
    which could be your TNG root folder or you Config Path folder
  6. Perform your DB Upgrade
    your templateconfig.php changes should have been copied to the new Template (tng_templates) table
Edited by MadRanger
Added wiki note ref: Template Table

Share this post


Link to post
Share on other sites
Ken Roy

Regis,

You might have skipped the database upgrade step that created the tng_templates table.

Share this post


Link to post
Share on other sites
MadRanger

Ken,

I edited my OP with the note about the template table. While I do have the table it does not have any data.

Edit: the tabled was in fact populated - I had misread the Admin Utilities screen.

Share this post


Link to post
Share on other sites
Ken Roy

Well then you did not look at the https://tng.lythgoes.net/wiki/index.php?title=Main_Page#TNG_Major_Features

and the https://tng.lythgoes.net/wiki/index.php?title=Upgrading_Mods_to_TNG_v12

that indicates what you needed to do to preserve your templateconfig.php file if it had been modified.  Also if you are not upgrading in place, but rather creating new folders you will be missing files

If you are just now upgrading, you should also use the TNG 12.0.2 upgrade that was posted last night

Share this post


Link to post
Share on other sites
MadRanger

I had saved the templateconfig.php. I am not sure why the file I left in the root folder was not read when I upgraded the database. Or, if it is a factor in why the home page is not being presented. And I don't know how to render the template page (or how to populate the new table.

You are correct, I had not read the other links you shared.

I will look at the new upgrade package.

Share this post


Link to post
Share on other sites
Ken Roy

Regis,

Make sure you save the templateconfig.php file where your Config Path says you TNG configuration files exist  If the Config Path is null, then the files are in the TNG root folder.

You can delete the tng_templates table using phpMyAdmin,  run the dbupgrade script and it should rebuild the table. 

It is also possible that the table contains data, but the upgrade did not set the variables or preserve them to indicate that you were using Template Selection.  Go to Admin > Setup > Template Settings.  If the Enable Template Selection  is blank or No, set it to yes and see if the templates variables were populated to the tng_templates table

Share this post


Link to post
Share on other sites
MadRanger

 Thanks, Ken. I  determined that the template table is not empty and that templateconfig.php does reside in the root.

You suggested: "the upgrade did not set the variables or preserve them to indicate that you were using Template Selection".

When opening Template Settings  tab I obtain an error:

"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: SELECT * FROM ORDER BY template, ordernum

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY template, ordernum' at line 1"

 

I don't know where ordernum is called - or how to resolve the issue. I am not using MariaDB as far as I know.

Share this post


Link to post
Share on other sites
Ken Roy
5 minutes ago, MadRanger said:

Query: SELECT * FROM ORDER BY template, ordernum

The above query is missing the table name.  Go to Admin > Setup > General Settings and expand Table Names.  Make sure that all tables have names

Share this post


Link to post
Share on other sites
MadRanger

Ken, that fixed the template setting problem. Thank you kindly.

Still trying to figure out why the home page is not being picked up out of index.php in  Template 4 folder.

Share this post


Link to post
Share on other sites
Ken Roy

Is Enable Template Selection:  set to Yes?  Is Template 4 selected in the Template Settings?

Share this post


Link to post
Share on other sites
MadRanger

Ken,

It was not set to Yes  and template 4 was selected. When I did set it to Yes, an error popped when opening public home:

Fatal error: Cannot redeclare getTemplateVars() (previously declared in C:\xampp\htdocs\genealogy\begin.php:36) in C:\xampp\htdocs\genealogy\begin.php on line 51

Edit: line 36 reads "function getTemplateVars($templatenum) {"

Edit: line 51contains only a closed bracket: }

Last evening I determined that the index file was being read from the root, not from the template folder. (That may be a function of the error above. )

The basic index file that was part of v12 contains a section at about lines 4 thru 9: "//Insert the following lines in your index.php to take advantage of template switching...//end of lines to be inserted for template switching"

I am working with that file to get my home page edits properly placed. I got thru one iteration yesterday and am about to resume that effort. If I am to remove the // to invoke the template switching, I have yet to confirm.

None of this is my forte which, as I wrote to Bill Herndon this morning, is what tends to keep my synapses firing in sequence and puts unused gray matter to use.

Share this post


Link to post
Share on other sites
jon42

Hi, I had exactly the same problem.   Upgrade from v. 10 to v 12 and the home page says "Please customize this page".  Also saw the same SQL errors with no table name.  My hosting server has PHPAdmin so I was able to see the DB and saw the 4 new tables, including tng_templates which had been populated.

The solution was Go to Admin > Setup > General Settings and expand Table Names.  The 4 new table names were blank.  Filled them in. Also needed to set the template I was using.  All working now.

Share this post


Link to post
Share on other sites
Ken Roy
2 hours ago, jon42 said:

The solution was Go to Admin > Setup > General Settings and expand Table Names.  The 4 new table names were blank.  Filled them in. Also needed to set the template I was using.

I thought Darrin had fixed the upgrades during TNG v12 beta testing to automatically update the TNG table names in the config.php, so that users did not have to go to Admin > Setup > General Settings to populate the new TNG table names.

You might report this to Darrin.

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

×