BlasiusSecundus / branch_export

Export helper module for the open source family tree software, Webtrees.
GNU General Public License v3.0
3 stars 1 forks source link

Javascript error #3

Closed ric2016 closed 6 years ago

ric2016 commented 6 years ago

The current version of the module causes javascript errors: "ReferenceError: I18N is not defined" in "branch_export.js:282:5"

This negatively impacts other custom modules (that's how we came across this error, as discussed here: https://www.webtrees.net/index.php/en/forum/4-customising/31605-solved-gov4webtrees-webtrees-module/66975)

Tested with webtrees: 1.7.9 php: 5.6.x and 7.2.2 branch_export: current master

BlasiusSecundus commented 6 years ago

Thank you for letting me know this issue. (Update: I think I found the real cause, see below)

BlasiusSecundus commented 6 years ago

Meanwhile, I think I was able to reproduce the issue and found the definitive cause. If the user was not on the module’s page, the main JS files was still loaded (unnecessarily), but translate.js was not. This is now fixed and the unnecessary JS code is no longer loaded.

BlasiusSecundus commented 6 years ago

I did some more testing, and I think the issue is fixed, ready for merging and closing the issue. Could you please test the fix/I18N branch, to double check it works correctly? Thanks.

ric2016 commented 6 years ago

I can confirm that the error no longer occurs when using the fix/I18N branch. Thanks!

BlasiusSecundus commented 6 years ago

OK, thank you for the confirmation, fix merged into dev and master.