Closed psyco42 closed 1 year ago
The module_v4/webtrees-descendants-chart/resources/views/modules/charts/chart.phtml has only 25 lines, what is less than 46. You use the wrong chart.phtml there. That one is from the ....../descendants-chart/chart.phtml!
As @arbor95 said, something went wrong copying to the new instance. Please try to install the modules again.
Thanks for your help.
I did a few things to understand my issue better.
First of all, I re-install a fresh setup of webtrees in my same server with a problematic instance. I add the pedigree module, and it works perfectly.
The module directory is clean and working properly in the fresh instance (same server setup, MySQL, webtrees version).
So, I have definitively something corrupted in my instance, but I couldn't figure out what (and why it affects only those two modules).
"So, I have definitively something corrupted in my instance, but I couldn't figure out what (and why it affects only those two modules)."
So simply delete the two dirs in the module dir and make them fresh!
Sorry to insist but I did that first, and it didn't help.
A fresh module directory in my fresh webtrees setup works. A fresh module directory into my existing webtrees instance doesn't.
But I found something very interesting in my initial steps of debugging.
If I open a new page with the generated URL, the chart is displayed normally. https://github.com/magicsunday/webtrees-pedigree-chart/blob/master/resources/views/modules/pedigree-chart/chart.phtml#L28
So, I would say something is declared on top of it for the script not to work
In other words, if I manually open data-wt-ajax-url in a new tab, it displays the module correctly.
So why not using the fresh install? Rename your directory for Backup. Copy fresh stuff in place. Remove the data Directory From your fresh install and copy it over from your Backup. Maybe some file from the webtrees source is corrupted.
Hi,
I transfer everything to the fresh setup, and everything works.
So, we won't know the root cause but it is definitively not from the module source code itself.
I got the following error in the console when I open the page with the module. Nothing is render under the filters. I have no error in the PHP error log.
VM309:15 Uncaught TypeError: WebtreesDescendantsChart.DescendantsChart is not a constructor
line 46 in module_v4/webtrees-descendants-chart/resources/views/modules/charts/chart.phtml
The "WebtreesDescendantsChart" object isn't in the original webtrees code, and it present only in the magicsunday plugins.
Context Plugin version 1.4.0 Webtrees version 2.1.15 Tested under PHP 8.0 and 8.1
I migrated from my old to my new server. I did a copy of the DB and the whole Webtrees directory, then I import it to my new server. More or less a recovery plan from a backup.
Everything works with my new server except for two plugins from Magicsunday. In both cases, I have the same javascript error.
I cannot find the difference between the two servers, which can lead to this bug in the interface. It is a strict copy in terms of files and DB, same PHP extensions.
The two plugins github.com/magicsunday/webtrees-pedigree-chart/ github.com/magicsunday/webtrees-descendants-chart