Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List module routes not always handled properly #3171

Closed
ric2016 opened this issue Apr 10, 2020 · 2 comments
Closed

List module routes not always handled properly #3171

ric2016 opened this issue Apr 10, 2020 · 2 comments

Comments

@ric2016
Copy link
Contributor

ric2016 commented Apr 10, 2020

For private trees, the list urls result in errors when the user is logged out, e.g. when using /webtrees/module/source_list/List/tree1:

#0 [internal function]: Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees\{closure}(2, 'assert(): asser...', 'C:\\xampp7\\htdoc...', 84, Array)
#1 …\app\Module\SourceListModule.php(84): assert(false, 'assert($tree in...')
#2 …\app\Http\RequestHandlers\ModuleAction.php(90): Fisharebest\Webtrees\Module\SourceListModule->getListAction(Object(Nyholm\Psr7\ServerRequest))

In general, Router.php handles these cases, but only when the tree parameter is explicitly mandatory, which isn't the case for module routes.

Therefore, the respective check and redirect has to be made either by the module itself, or we'll have to define special module routes with mandatory tree parameters (we had discussed this a while ago in a different context here), which would solve this as a side effect.

@fisharebest
Copy link
Owner

This was fixed (yesterday) by #3169

@fisharebest
Copy link
Owner

Correction - a similar problem was fixed in #3169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants