If security settings are high the module can't find the tree
Closed this issue · 7 comments
I've set "show the family tree" to members only as I don't want to dispose any information to the public at least until I have all member permissions.
If I'm logged in via a browser I can download the gedfile in the browser context.
If I log myself off, this is no longer possible, and if I try via curl/wget a download is not possible.
<div class="alert alert-danger">
Benutzerdefiniertes Modul: _download_gedcom_with_url_<br><b>Tree not found: kanoma</b></div>
</div>
Is there any chance to supply a user context on the commandline?
The error message says that the tree with the name "kanoma" was not found.
So, the first thing to check would be if this tree name is correct and available in the webtrees installation with the used URL. You can find the tree name in the Control Panel at: Control panel / Manage family trees / Preferences
Misunderstanding. It's an access problem.
The tree exists. I'm working on that tree and I'm able to make a backup via your module if, and only if, the access rights on that tree are set to "tree is public accessible".
As stated above I do not want to expose the tree to the public. And if I minimize access rights on that tree to "members only" your module is then unable to find that tree.
Thank you for further describing. Before further investigating, I also wanted to be sure that there is no simple typo etc..
With the further description, I could reproduce the issue. Yes, with the existing code the visible and downloadable trees are restricted to public accesible trees.
I changed this in the code now. As a test, you can download the changed file here: https://github.dev/Jefferson49/DownloadGedcomWithURL/blob/main/DownloadGedcomWithURL.php
Click on the file name on the left side and download the file.
or if this does not work:
https://github.com/Jefferson49/DownloadGedcomWithURL/blob/main/DownloadGedcomWithURL.php
Just replace this single php file in your installation.
It would be nice if you could provide some feedback if the new version works in your environment. If yes, I will publish a new releaese.
Thanks for your immediate fix but while testing I ran into another prpblem.
Opening the new settings dialog I got an errormessage on the gui:
Class "Cissee\WebtreesExt\MoreI18N" not found …/modules_v4/DownloadGedcomWithURL/resources/views/settings.phtml:17
So I could not set the secret key and test functionality.
Is my installation missing something?
Sorry, there was an error related to the translation in the Control Panel. Unfortunately, this does not occure in my own installation, because I have the vesta modules (Cissee namespace) installed.
I created a bugfix for that and attach a pre-release ZIP file:
download_gedcom_with_url_v3.0.1.zip
You can unzip this to your installation and re-test.
Now it works!
Thanks to your fixes, I sleep better now, knowing I can constantly backup my family tree :)
Thanks a lot for testing! This helps very much for improving the module!
I will also publish it as an official release v3.0.1.