Jump to content
TNG Community
DougInAmbler

Moved TNG folder, now homepage shows ReadMe.html instead

Recommended Posts

DougInAmbler
53 minutes ago, Ken Roy said:

...A Home Page with no template means that the Admin > Setup > Template Settings option for Enable Template Selection is not set to Yes and a Template not selected.  My understanding is that most WordPress (WP) users do not enable template selection and use WP to style their sites ....

Ken,
As I said, the Admin Page looks perfectly normal, Template 13 is selected, and I can change to any other Template, see graphic attached.
But clicking "Public Home" page goes to the blank screen "of death".
It is only by tinkering with the Home Page URL, replacing /index.php with /index_html.html, that I can see the bare Search and Menu, template-less.  And thus I can login and get to the Administration page. I expect something very simple is missing from our index.php, I am comparing it with another TNG installation that is working fine.

The website does not use WordPress or any other standard platform. It has been working well for decades. Again, our TNG installation in the subfolder /Test was working fine, but this re-install in the desired subfolder has the "blank" or "template-less" Public Home page.

If I don't find the mistake soon of course I will delete TNG and re-install (hoping for a different outcome from the same process). Now it is curiosity that keeps me looking for the mistake.
Thanks.
Doug

Admin Page.jpg

Share this post


Link to post
Share on other sites
bhemph

Doug,
      It is possible to move a TNG installation between folders successfully, but you really have to know exactly what changes need to be made in order to do so.  As Ken noted the two primary files with absolute file paths are the config and subroot.  There is also the full domain path for the root web address of TNG in the config which is another absolute path that can affect your installation.  The other files with absolute paths are the font caches (any file in the fonts folder that is not in the full installation).

     Most admins do copies from test locations (even local servers as Klooster indicated) instead of moves and then make sure not to copy those specific files which can corrupt a TNG installation.  That way they can test out a change in one environment without impacting the live site.  So setting up a test site from scratch once and then setting up a live site from the readme, then importing the exported test databases, and manually matching the settings is the most common method of testing first and moving to live.  It is also a good idea to have backups of the config files and subroot to be able to restore in case of an accident.

     When you edit PHP files, you need to make sure that your editor does not add extra characters to the files.  Most people on Windows are using Notepad++ since the Notepad included with Windows does add extra characters that can give you the white screen.  I would say check what files you have changed for the syntax errors.  Usually the likely candidates are language files and files in the template folders.

Brent

Share this post


Link to post
Share on other sites
DougInAmbler

Brent,

I only ever use Notepad++. I have not changed any files yet, I'm just viewing the contents.

Thank you for good advice on copying from test location. It will take a while to absorb those special absolute paths and how to change them correctly.

Doug

Share this post


Link to post
Share on other sites
Ken Roy

Doug,

where does index_html.html come from?  That is not a TNG file.

For templates to work in TNG, the Admin > Setup > General Settings must have the following in Site Design

Home Page  = index.php

Custom Header = topmenu.php

Custom Footer = footer.php

 

Share this post


Link to post
Share on other sites
DougInAmbler

Ken,

I don't know the origin of index_html.html, will find out tomorrow from the original web builder, whom I am assisting.

Site Design settings are as expected, per attached pic.

Thanks, Doug

Site Design.jpg

Share this post


Link to post
Share on other sites
Ken Roy

Sounds like you have an HTML web developer that needs to learn how TNG uses PHP and SQL.

Have him read the TNG Wiki articles I referenced earlier.

Edited - You man need to replace some the TNG files with those from the full install.  tng_begin.php and begin.php come into mind as dealing with the template variables from the database

Edited by Ken Roy
add more information

Share this post


Link to post
Share on other sites
DougInAmbler

The mistake in our TNG install has been found, thanks to a web developer friend of mine.


Briefly: all of the template index.php files were missing; e.g. local file tngfiles/templates/template13/index.php was not found on the server. Uploading this file completely fixed the problem. The other expected files were present, e.g. template13/footer.php and template13/topmenu.php

This debugging also explained the "home page raw menu without template" pictured in a previous post. It is the Home Page displayed when no Template is selected, as Ken said. I think of it as the "limping home" mode of an automotive computer that has lost sensor inputs. To simulate what we saw, simply use Admin>>Setup>>Configuration>>Template to disable Template Selection, and then go to the Public Home, now with functionality but no template. We only stumbled into this screen because the probably spurious file tngfiles/index_html.html had no idea of what the Template# was.

Equivalently, tngfiles/index.php shows what happens:
if($templateswitching && $templatenum) {
    include($cms['tngpath'] . "templates/$templatepfx$templatenum/index.php");
    exit;
}

That is, if you know the Template#, display it and quit. Otherwise, code follows to output the raw menu (which we saw only by a fluke).
But in our suspect installation, with Template13 chosen, $templatenum/index.php was missing, therefore the result was a blank screen.

Now the new question is, how did the initial TNG file upload selectively strip out the files templatexx/index.php, and what other files may have been so stripped?
I  did this install, if anyone is to blame.
The prudent thing will be to re-install, and check for this anomaly. Tomorrow.

Thank you all.
Doug
 

Share this post


Link to post
Share on other sites
Ken Roy

Doug,

Glad you found the problem and also explained what the problem was.

Best regards in getting it up and running

Share this post


Link to post
Share on other sites
Rob Severijns

Doug,

Happy to see your problem is found and your site is up and running :-)

Thx for explaining too.

Rob

Share this post


Link to post
Share on other sites
DougInAmbler

Rob, thank you for your private help too.

Doug

Share this post


Link to post
Share on other sites
DougInAmbler

There was a question about the provenance of the file tngfiles/index_html.html that we stumbled into, which gave us a menu and Admin access in place of a blank page.

This file is part of the TNG 13.0.4 distribution and is annotated in tngfiles/appendix.html as follows:

index_html.html Your very basic home page (just in case you don't have one), with links to all the pages in this section, but this one is HTML. To use, rename to index.html and remove index.php. Please make it better!!

Share this post


Link to post
Share on other sites
Rob Severijns
51 minutes ago, DougInAmbler said:

Rob, thank you for your private help too

You're welcome.

Share this post


Link to post
Share on other sites
Ken Roy
1 hour ago, DougInAmbler said:

There was a question about the provenance of the file tngfiles/index_html.html that we stumbled into, which gave us a menu and Admin access in place of a blank page.

This file is part of the TNG 13.0.4 distribution and is annotated in tngfiles/appendix.html as follows:

index_html.html Your very basic home page (just in case you don't have one), with links to all the pages in this section, but this one is HTML. To use, rename to index.html and remove index.php. Please make it better!!

Thanks Doug,

I guess not having done a full install since TNG v5.0.4 on my production site (October 2005 time frame), I never noticed that file that appears to have been added in 2011. I wonder why that was added with an html extension when everything else in TNG uses .php extensions.

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

×