Jump to content
TNG Community
PeterC66

The Simile timeline is now blank in a WP/TNG integrated site

Recommended Posts

PeterC66

I have just noticed an issue with my live site that was not an issue a while ago. I have changed a few thing since I last know it was working, so I cannot yet identify what has caused it. Before I spend more time delving, I wondered if anyone else has found the same problem, or has any ideas. I use Chrome but I see the the same issue with Edge. The site uses TNG v.10.1.2; WordPress 4.4.1, Suffusion 4.4.8, and the WP/TNG Integration Mod.

You can see the issue at http://www.hcnhistory.org.uk/blank-for-people/timeline2.php?primaryID=I25813&tree=hcn&chartwidth= - the Simile timeline is blank, although everything else seems OK. The plain TNG version is at http://www.hcnhistory.org.uk/tng/timeline2.php?primaryID=I25813&tree=hcn&chartwidth= and this works fine. [Note that you will see I do have a mod to add in a choice of comparative events - national/county/local, but I have ruled this out as the cause.]

I have explored the issue in more detail on my WAMP, and have tried uninstalling all Mods, and WordPress Plugins, but the problem is still there. 

For the plain TNG version Chrome/Inspect/Console shows 2 identical errors
http://localhost/tng/__history__.html?0   Failed to load resource: the server responded with a status of 404 (Not Found)

I have not investigated this issue - but it does not seem to cause a noticeable problem.

For the WordPress/TNG version Chrome/Inspect/Console shows 4 errors
http://localhost/blank-for-people/__history__.html?0    Failed to load resource: the server responded with a status of 404 (Not Found)
simile-ajax-bundle.js:1541    TypeError: Cannot read property 'documentElement' of null "XmlHttp: Error handling onReadyStateChange"
simile-ajax-bundle.js:1543    Uncaught XmlHttp: Error handling onReadyStateChange
http://localhost/blank-for-people/__history__.html?0    Failed to load resource: the server responded with a status of 404 (Not Found)
 

I presume the TypeError at simile-ajax-bundle.js:1541 is causing the problem, but my initial look at it has not given me a solution.

I have had a look at a few WordPress/TNG sites

http://tngwp.lisaandroger.com/genealogy/timeline2.php?primaryID=I8&tree=Roger&chartwidth=
http://gregoryology.com/genealogy/timeline2.php?primaryID=I1854&tree=tree001&chartwidth=
http://www.hardwickfamily.com/genealogy/timeline2.php?primaryID=I69&tree=tree1&chartwidth=

But none of them has the Simile timeline. My main question is does anyone have the Simile timeline currently working in an integrated WP/TNG site? I know it used to work.

Any other advice would be welcome.

Thanks, Peter
 

 

 

Share this post


Link to post
Share on other sites
PeterC66

Update: I have found one or two other WP/TNG integrated sites where the Simile timeline works OK. One is at http://imhoff.us/TNG_GeneologyFiles/timeline2.php?primaryID=I00010&tree=IMH001&chartwidth=, and interestingly this also has the same error about ../__history__.html not being found. It is because of an <iframe id="simile-ajax-history" src="__history__.html?0 near the very end of the page. So this is not my problem.

Secondly, I have managed on my test system to switch themes from my Suffusion-child theme to pure Suffusion: and the Simile timeline works again. So now I can start examining all the features of my child theme in more detail.

Share this post


Link to post
Share on other sites
PeterC66

Thanks Roger, but I do not see the Simile timeline at that page, just the original TNG timeline. The Simile one is the top one on Kloosterman Time line  or Darrin's demo where you can drag it left and right. Never matter, as I do know the Simile timeline works for most people.

As an update: I have made a little more progress on my problem. I have confirmed that the problem does not go away if I deactivate all mods and plugins, and there is no problem with the coding of my Suffusion child theme.

The problem is there only when I use a child theme and there is a functions.php in that child theme - even if the file is just <?php ?> or even empty. It was never a problem a few months ago (before a recent update to Suffusion?)

I have not had time to examine it in much detail but I shall try to soon. I have logged the issue on both the Aquoid/Suffusion and Simile support forums but have had no replies there. It looks like I shall have to clear my brain and get into JavaScript debugging to find what is probably a simple problem in the gaps between WordPress and Simile!

Share this post


Link to post
Share on other sites
theKiwi

Sorry Peter - I thought that TNG now included the Simile Timeline by default - but didn't realise I had to turn it on - it's now on and works on my site.

But I'm not using a Child Theme so I guess that's the reason why it works based on what you write.

Roger

Share this post


Link to post
Share on other sites
PeterC66

Thanks Roger.  That is very interesting because I see a blank Simile timeline (see attached) when I look at yours with Chrome or Edge; but in Firefox it works fine. Mine is still blank in Firefox. Can you see the Simile timeline on your site in Chrome? Maybe it is not the child issue?  I am really not understanding what is happening!

The errors I get in Chrome when on your site and inspect are 

http://lisaandroger.com/Genealogy/js/tngmenuhover2.js Failed to load resource: the server responded with a status of 500 (Internal Server Error)
http://lisaandroger.com/genealogy/timeline_2.3.0/timeline_ajax/simile-ajax-bundle.js Failed to load resource: the server responded with a status of 500 (Internal Server Error)
timeline2.php:301 Uncaught TypeError: Cannot read property 'dd' of undefined
timeline-bundle.js:2277 Uncaught TypeError: SimileAjax.EventIndex is not a function
timeline.js:54 Uncaught TypeError: Cannot read property 'layout' of undefined(anonymous function) @ timeline.js:54
timeline.js:54 Uncaught TypeError: Cannot read property 'layout' of undefined
timeline.js:54 Uncaught TypeError: Cannot read property 'layout' of undefined

Rogers on Chrome.jpg

Share this post


Link to post
Share on other sites
PeterC66

Thanks again Roger. I now see yours working OK in Chrome and Edge as well as in FireFox. And the only error on Inspection is

Quote

.../__history__.html?0 Failed to load resource: the server responded with a status of 404 (Not Found)

Which is the same error mine has.

This is now all consistent with mine. Just to summarise, on my test site the Simile timeline:

  • fails to work if I have a Suffusion child theme within any (even a blank) functions.php
  • works fine if I do not have functions.php in my child theme

When I have the time I shall investigate further.

Peter

Share this post


Link to post
Share on other sites
PeterC66

Solved it!! Mea culpa. The Chrome console did not show this, but Firefox showed the first error as:

Quote

XML or text declaration not at start of entity ajx_timelinexml.php:2:1

A quick Google search led me to the solution... I had a blank line after the <?php ?> in my child functions.php! 

Lesson learnt. My live site now works properly eg http://www.hcnhistory.org.uk/blank-for-people/timeline2.php?primaryID=I25813&tree=hcn&chartwidth=)

Now I need to put my test site back together properly.

Thanks again, Roger.  I doubt if I could have done it so quickly without this conversation.

Peter

Share this post


Link to post
Share on other sites
klooster

I am glad you found the solution.

As I mentioned in my Trouble shooting section of my WP_TNG integration instruction page:

  • PhP coding mistakes: one little wrong character or an empty space can create havoc in a PhP coded website like TNG/Wordpress. One of the most common, and basic, mistakes made when coding in PHP is to either forget or misplace a quote, brace or semi-colon causing a syntax error. If you like to read more, check this article: PHP Mistakes. 

     

Share this post


Link to post
Share on other sites
Steve1200

I too had problems with timeline then I thought I had it working correctly. It turns out my site still had page errors. I checked Roger's and Cee's websites and they have page errors as well:

thekiwi.JPG

klosterman.JPG

 

To correct these errors, copy the history.html file from timeline_2.3.0/timeline_ajax/content/ to your TNG folder. Rename the file to __history__.html. The only issue is the timeline history file does not declare the document type or character set which means you can get a warning especially with Firefox. 

Edited by Steve1200
Link removed

Share this post


Link to post
Share on other sites
stores

I know this has been talked about a couple times over the past recent years and while my original timeline has always worked, i could never get the Simile timeline to work and while i never look at the timeline myself, that still bugged me... I replaced the said html file with yours and now both the Original and the Simile timeline are working at the same time, after i turned the Simile timeline back on in Admin/Setup/Configuration/Chart Settings... Thank you very much...

Share this post


Link to post
Share on other sites
theKiwi
9 hours ago, Steve1200 said:

I too had problems with timeline then I thought I had it working correctly. It turns out my site still had page errors. I checked Roger's and Cee's websites and they have page errors as well:

To correct these errors, copy the history.html file from timeline_2.3.0/timeline_ajax/content/ to your TNG folder. Rename the file to __history__.html. The only issue is the timeline history file does not declare the document type or character set which means you can get a warning especially with Firefox. Alternately you can download the html file with the declaration from SKDavis and extract the file to your TNG folder.

Thanks - I've added the __history__.html file to my site(s). I still get the errors on the WordPress site from the NextGen gallery, but in plain TNG there are now no error messages - hooray.

Roger

Share this post


Link to post
Share on other sites
theKiwi
On 2/4/2016 at 2:00 AM, klooster said:

No problem here:

Kloosterman Time line

@klooster

Your site is showing a couple of errors due to including http content into https pages

[Warning] [blocked] The page at https://www.kloosterman.be/genealogy/timeline2.php?primaryID=I2162&tree=001&chartwidth= was not allowed to run insecure content from http://www.kloosterman.be/genealogy/css/mytngstyle-wp.css. (timeline2.php, line 13)

[Warning] [blocked] The page at https://www.kloosterman.be/genealogy/timeline2.php?primaryID=I2162&tree=001&chartwidth= was not allowed to run insecure content from http://www.kloosterman.be/genealogy/css/mytngstyle-wp.css. (timeline2.php, line 56)

Roger

Share this post


Link to post
Share on other sites
Steve1200

Finding issues in complicated scripts like timeline can be difficult. In Windows I use a program called FileSeek which works great because it can search for files or locate code within a file. They have a free version but I liked it so well I purchased the Pro Standard version which is $15US. Here is a screen shot of a search for code.

 

fileseek.JPG

Share this post


Link to post
Share on other sites
klooster

Thanks Kiwi for noticing my "http content into https pages" problem

I Installed the "SSL Insecure Content Fixer" Wordpress plugin.

 

 

Share this post


Link to post
Share on other sites
tngrlkrz

I use Everything software for file search and notepad plus plus for searching within files. That combo works well along with Beyondcompare. Will look at File Seek though. This is on PC. 

Share this post


Link to post
Share on other sites
Steve1200

I believe my timeline issue started after a server update because it used to work fine. In any case I made a couple more changes to get rid of the remaining script errors.  I originally created a MOD but after some thought, I did not want to add another MOD. So once everything was working, I created a new timeline folder. This version of timeline corrects the history.html issue and a few lines that try to loads scripts from a non-existent MIT link. 

If you have a blank simile window or script errors, you can download the modified version of timeline here. (Link to Files removed due to updated version)

Edited by Steve1200
Added link to timeline 2.3.1 update

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

×