Jump to content
TNG Community
boonie67

WP & TNG Histories

Recommended Posts

boonie67

Is there a reason why the history English & or French would not work in Word Press integration to TNG. It did however work at one time and now the pages are blank. Any changes? it works fine on the TNG site without integration. Would someone with WP & TNG integration please chime in here, this is only error remaining on site except for one small tab color on individual pages. Any help much appreciated and thanks for looking.

Share this post


Link to post
Share on other sites
boonie67

Let me start by saying ooops sorry about that, Roger. They were made many years ago say 8 or so with the history template in without the body and then the body is in the English & French folders which allows switching languages. They worked awhile back on the integration, but don't know if the upgrade to TNG v11.1 did anything to it. It is a funny thing if I remove the integration and just have genealogy and wordpress in root they work fine. The pages are blank but colored however before one had to add font color at top of page if one wanted it. 

Attached is the template without body in the histories folder. The body of the English & French Versions are in their respective language folders. And this was how Ken explained it many years ago and it works great, except on integration. Could be some other updated part is needed now for it to work correctly. And thank you very much appreciate the reply. Thanks for heads up on Weaver Theme seems to work fine.

 

 

historyneige.php

Share this post


Link to post
Share on other sites
Ken Roy

Randal,

Are you using $cms['tngpath'] as part of the include for the language specific page as in

	include($cms['tngpath'] . "$mylanguage/carignan_regiment.php");

 if so you may need to make sure the $cms[tngpath] is set correctly.

I don't use WP so I don't know what that value for the path should be.

Share this post


Link to post
Share on other sites
boonie67

Hi Ken,

Yes I have the history templates in which the "include($cms['tngpath'] . "$mylanguage/historyneige.php");" without quotes, as all the histories I created have these included, except for one I made yesterday in tng administration. The file in the above previous post is attached and all work well our when running just tng. Can not figure this out it was working last week, even tried different wp themes, because not all themes are alike.

The histories I have created are from your instruction of 6 or 8 years ago and they work fine in tng. I have removed media block and you are welcome to view. All was working on wamp but now its throwing an error about header not sent for WP.

I Have looked at some wp site and see no language changes in history, even Kloosterman's site has two different menus one for English and one for Dutch. There has to be some sort of fix for this because it did work when I was in the trial mode. 

Any way thanks for the reply and feel free to go on our site and try the histories will leave all as it for most of the day.

Share this post


Link to post
Share on other sites
Ken Roy

Sorry Randall,

I do not know anything about WP so I do not know if the $cms['tngpath'] needs to be updated to work correctly to find the language specific page

 

Share this post


Link to post
Share on other sites
boonie67

Thanks Ken,

I thought if anyone would know it would probably be you, with your french on your own site. What about the new history template in tng v11 do you have that one in your site? 

Share this post


Link to post
Share on other sites
theKiwi

Try Updating the TNG Global Variables in the WordPress Admin ------> TNG area

Also if you edit the historyniege.php file to add

echo "cmstngpath = " . $cms['tngpath'];

before the line that includes the historyniege.php file, what value is printed out for $cms['tngpath']?

Roger

Share this post


Link to post
Share on other sites
boonie67

Roger,

Let me resend you the attachment again so may view it and then maybe I could understand better. By the way I have removed block media so feel free to look into the history there isn't a block, it may give you an idea what is going on.

 

Share this post


Link to post
Share on other sites
boonie67

Well integrating Kloosterman method is almost error free except for the histories switching to French and English. They were working couple weeks ago however it has stopped this week. It does load the page however it is blank.  There has to be some script to include that includes the page with the history selected. Using Weaver xtreme theme for now and seems to be all working correctly except for the history. Need someone versed in WP to help with this. I am a novice but shouldn't the tng part be called from tng and not WP? 

Question why would the histories work before and now they load blank pages? Could it be WP updated automatically? Grabbing at straws at the moment. Just wondering would the plugin work error free? I know that Roger has it installed. 

Thanks for looking and any help very much appreciated.

Share this post


Link to post
Share on other sites
Ken Roy

Well, it is awful difficult to diagnose problems on sites that are locked down (require a user login).  Blank pages often mean that you have a syntax error   See Blank Pages on the TNG Wiki

If it was working before and now loads blank pages, it has to do with something you changes

Share this post


Link to post
Share on other sites
boonie67

Ken,

I had sent a reply yesterday it was unlocked till afternoon if it would help it can be unlocked again. It has been locked since images, and data was taken and spread all over commercial sites. I will unlock it, but remember the histories did switch history before. The intro page and other pages still do change language, it is just the histories.

It is now unlocked till resolved and thanks, will look at blank pages, but I am a novice in syntax errors.

Share this post


Link to post
Share on other sites
boonie67

I checked several history files for errors and no syntax errors detected in code, so back to square one. Why does it work our of WP and not integrated with it. All other change language work well, one example is the Home Page, I am wondering if the change language is necessary? Thanks for the help and feedback, very much appreciaed Ken.

Share this post


Link to post
Share on other sites
Ken Roy

Looking at View Source, the page is truncated immediately after the </head> line.

When I look at View Source for https://ouracadianfamily.com/genealogy/browsemedia.php?mediatypeID=histories

there are 2 head sections.  Is that normal on WP sites?  Like I have said previously I know nothing about WP, so the WP experts will need to chime in

Share this post


Link to post
Share on other sites
boonie67

Ken, Yes I will attach files.

Before you get started check the site now back to just tng no integration all the histories translate fine, send me a message & I will integrate back at your request.

 

 

 

Share this post


Link to post
Share on other sites
Ken Roy

Interesting the the -en file is in French and not English.

Did you ever change the code to add the echo for the $cms['tngpath'] as requested by Roger in a prior post?  if so what was the path provided?

If not please add

On 3/22/2017 at 8:43 AM, theKiwi said:

echo "cmstngpath = " . $cms['tngpath'];

above line 21 in  the history/AcadianFamilies-source.php provided.  Interesting that this file is different name than what I tried to access earlier.

Share this post


Link to post
Share on other sites
Ken Roy
17 minutes ago, boonie67 said:

Before you get started check the site now back to just tng no integration all the histories translate fine, send me a message & I will integrate back at your request.

Well, I am not sure that it is working since when I switch languages the page text remains in French.  Edited - Sorry, I only looked at the beginning and it appears to be French.

It is also difficult to trouble shoot when pages get changed from what they were.

Share this post


Link to post
Share on other sites
boonie67

Ken,

After integrating wp and tng again, I quoted out header from source file and it is working now, will try others. 

I do not know on your site but on this one it stays on French or English in the histories until switched again.

Share this post


Link to post
Share on other sites
Ken Roy

Randall,

 

2 minutes ago, boonie67 said:

After integrating wp and tng again, I quoted out header from source file and it is working now, will try others. 

what do you mean?

 

Share this post


Link to post
Share on other sites
boonie67

When in the histories page and viewing all the history pages, switching on my site is done in the histories page. I cannot switch histories from the page I am viewing in English to French from that page.

Share this post


Link to post
Share on other sites
Ken Roy

If you mean you removed the following line

<H1 align = "center" style = "text-align: center">
Mariages et Familles Cajun</h1>

<H1 align = "center" style = "text-align: center">
Mariages et Familles Cajun</h1>

then try changing all the HTML tags to be lower case only.  <H1 is not a valid tag.

Share this post


Link to post
Share on other sites
Ken Roy
7 minutes ago, boonie67 said:

When in the histories page and viewing all the history pages, switching on my site is done in the histories page. I cannot switch histories from the page I am viewing in English to French from that page.

Did you comment out the tng_header call that generates the TNG page header and menu bar? 

I don't know what gets generated when you are not using a template.  As to whether the Language pull down is shown any place.

 

Share this post


Link to post
Share on other sites
boonie67

Yes commented out the tng_header, that was why the page wouldn't load.

Page loads but I have error on top page with the insert of Roger script, evidently placed it incorrectly. Now it won't remove from the page, see below.

https://ouracadianfamily.com/genealogy/histories/historyAcadianFamilies.php

Share this post


Link to post
Share on other sites
boonie67

All histories are working both languages now, but had to remove Roger's script, it produced an error and put back the script I had originally, $cms['tngpath'] = "../"; 

Just a note if you place wordpress in wamp it returns an error, just comment out the tng header. 

Thank you, much appreciated Ken and Roger.

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

×