Error when accessing parameters
patrickfaivre opened this issue · 12 comments
jc-fancy-imagebar-2.2.0 on Webtrees 2.1.2 : the display is fine.
But I can't access the settings: see the error message in the attachment.
I think this is the same error as #96 which was solved I thought.
Is it possible that you have deleted a tree recently?
Apparently the check that the last-tree-id setting in the database belongs to an existing tree fails (again).
You could remove the setting from the database table wt_module_setting. Look for module_name: fancy-imagebar and setting_name: last-tree-id. This should solve your problem for now. That will give me time to look for a better solution.
Hi Carmen - I looked at the TreeService::find()
code in webtrees.
It relies on assert()
, which can be disabled. If it wasn't present, you would get the error that was reported on the forum.
I need to replace it with an if(null) { throw }
So, if I understand you correctly this needs to be adjusted in webtrees.
Should I create a new issue?
Hello Carmen,
There was no tree deleted.
The fancy-imagebar module does not exist; there is only the jc-theme-justlight module (see attachment).
Sincerely
As a workaround I've made a small change to the code. Would you please test if this works?
Just replace the file FancyImagebarModule.php on the server.
Sorry, please tell me how to download this file!
https://raw.githubusercontent.com/JustCarmen/webtrees-fancy-imagebar/main/FancyImagebarModule.php
Right mouse click 'save link as'
I replaced the file FancyImagebarModule.php
There is still the error message (see attachment).
Okay, good to know. I can't reproduce the error what makes it hard to solve. I think we have to wait for @fisharebest then.
If this doesn't help, then I don't think the issue is at my end.
Thanks @fisharebest for your help with this matter.
@patrickfaivre because I can't reproduce the error myself I need you to test it for me.
Would you please download this file: https://github.com/fisharebest/webtrees/raw/960991e4e5e143df3ec2250f2ba00514bc02827e/app/Services/TreeService.php
And put it in the webtrees folder app/Services on your server.
Let me know the results.
I'm away for a couple of days without my laptop, so I won't respond until next week.
With this version of TreeService.php, jc-fancy-imagebar works perfectly! Thanks to you!