-
Notifications
You must be signed in to change notification settings - Fork 576
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
[Package Capsules] Broken getModulePermalinkBase #2470
Comments
Hi @Tofandel, Thanks for reporting this. Capsules were initially meant to be self-contained and were all housed under the same namespace but with the introduction of packages, it is clear that those improvements are welcome. I'm open to reviewing more changes to make resolution cleaner and more robust. |
I PR'd the quick fix for now, I'll send a PR to generalize and allow to configure all the namespaces resolutions sometime this month when I have more time |
Description
Package capsules which have a namespace different than
config('twill.namespace')
(Usually it's a namespace with the package name) will fail attwill/src/Http/Controllers/Admin/ModuleController.php
Lines 2412 to 2448 in 17803f1
$name
is not a model class but a simple singular no uppercased wordSteps to reproduce
Create a package with 2 capsules with nesting enabled
Go to the route for the nested capsule
Expected result
No error
Actual result
No capsule found for
seminar
Versions
Quick fix would be to uppercase
$name
before getting the capsuleBetter fix would be to build on #2423 and improve the way all the classes are located (and maybe add a cache as well)
The text was updated successfully, but these errors were encountered: