Upgrading from 2.0 to 3.0 - routing issues
Hello! I'm currently updating twill to 3.0 from 2.0, and I'm having some issues with routes.
I'm getting the following error:
"Route [admin.index] not defined. (View: /var/www/html/Xerocraft/vendor/area17/twill/views/partials/navigation/_overlay_navigation.blade.php)".
Any clues on what might be causing this?
I run twill under the default "/admin" path:
ADMIN_APP_PATH=admin
Thanks! π
ifoxβ’95d ago
Hi @KyleAF did you run the upgrade script?
if you did, running optimize:clear should help. If not, you need to start there!
KyleAFβ’94d ago
Thank you for the response! I just tried optimize:clear. It cleared the cached bootstrap files, but no luck unfortunately π¦
I did run the script prior while upgrading as well.
I wonder if uninstalling and reinstalling might help?
ifoxβ’94d ago
Ok, your twill-navigation file needs to be updated to use twill. instead of admin.
KyleAFβ’94d ago
Oh! Can I republish a fresh copy of the twill-navigation config file? Do you happen to know that command?
KyleAFβ’94d ago
My twil-navigation config is rather simple, but I suppose it could have changed pretty drastically
ifoxβ’94d ago
You don't need a new one, this format is still compatible, and what I suspected is not in your config, so it's not that
KyleAFβ’94d ago
ahh, bummer π¦
KyleAFβ’90d ago
In case it means anything, if I comment out the
ADMIN_ROUTE_NAME_PREFIX
from the .env file, then it instead gives the odd error of Route twill..index not definedKyleAFβ’90d ago
Also, in the route:list, it looks like the expected route-name is "admindashboard"?
KyleAFβ’90d ago
Also, if I intercept and dump the request it looks like it's accurately routing to the Twill DashboardController
KyleAFβ’90d ago
Made progress: I tried competely reinstallting twill and it didn't quite help, but I did discover that if I have one specific one of my module's commented out in twill-naviation, it works:
KyleAFβ’90d ago
I can also replicate this on any of the other modules if I misspell their module name, such as:
'pages' => []
to 'pagees' => []
will cause the exact same error
but my "wikimenu" isn't misspelled that I cna figure
Got it figured out! Though I don't think it's necessarily my fault. @ifox it might be worth a read here for code-adjustment maybe? or a documentation-warning about using made-up words for module names. Unless I missed something, or unless you think this is such as edge-case as to not be worth it, lol.
My module name is unusual: "wikimenu". Not a real word. I think the code is making assumptions about what the plural version of this fake word is, because everything works perfectly ONLY if I use the singular-version 'wikimenu' => []
in twill-navigation, whereas all other modules are plural inside twill-navigation. All other references are the same throughout my code as other modules..ifoxβ’90d ago
ha this is indeed an edge case because of Laravel's pluralization that doesn't work correctly with the word "menu". We added this in Twill 3: https://github.com/area17/twill/blob/3b5d66f870fbc46ad67a53e5b61f86711619a144/src/View/Components/Navigation/NavigationLink.php#L170
GitHub
twill/src/View/Components/Navigation/NavigationLink.php at 3b5d66f8...
Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/c...
ifoxβ’90d ago
Seeing your navigation file isn't very long, you could easily convert it to the new approach: https://twillcms.com/docs/getting-started/navigation.html#content-oop-method
KyleAFβ’90d ago
Ahh, thank you! I'll look into making the switch. Seems pretty straightforward
1.4KMembers
View on DiscordWant results from more Discord servers?
More PostsDisabled defaults in controller based on user RoleGroupI want to disable, create, edit or delete actions according to user RoleGroup or there is another waDrag and drop issueHello, any idea how to achive DnD working on modules list.
Problem is in that when you go below limiFile library 404 errorHello, I'm encountering issues with the file library. When I upload a file, such as a .txt file, it'InlineRepeater deleting data on related Model entriesI'm using an InlineRepeater to add relations with pivot data between two Repositories. The relations"astrotomic/laravel-translatable" n+1 queriesI've got a package issue which is composer required by twill.
800+ queries on a model only getting Repeaters and Blockeditor won't work with media library.I saw the pst regarding JSON repeaters. So I switched to the block editor for the content that NEEDSTag Field on Block not Displaying Saved TagsHello.
I am using the Tag Field in a block, the tags are being saved correctly, but the field is cFile link in view issueHi everyone i'm trying to render a file in blade view bug seem difficult to me how can i render linIssue using repository methods??? Twill 3Can someone please provide any support for the following error:
Declaration of App\Repositories\PostHow can I make sure my assets are loaded correctly on a subdomain?I have a site for example website.nl and a twill installation on website.nl/subsite
Now when I go tI can't see any images in twill media library.Hello, everyone!
I have installed twill and tried to upload a image to media library.
However, I amDatePicker ExceptionI'm getting an unexpected error while using a pretty simple DatePicker in my sidebar form.
`UndefinSome fresh vibes would be nice :))Would love to hear some global announcement about twill cms this year and where it's heading @ifox .Edit defaultOrders in controllerWhat would be the most correct way to edit?
$this->defaultOrders of ModuleController in my controlleVue2 EOL Plans?We're upgrading our application and generally upgrading our setup in preparation for the Vue2 EOL atRoute [admin.password.reset.link] not defined on upgrade from 2.x to 3Hey folks, I followed the upgrade guide step by step successfully, but when I try to visit the adminTwicpics & fit=cropApparently fit=crop is automatically added to the url, also when using Twicpics as image service. HoCan anyone help me get a single image/media field working within a json repeater ?I've detailed the issue here: https://github.com/area17/twill/discussions/2358DatePicker problemHi! sorry, what s wrong with my setup ....
Just installed a fresh laravel app, with newest twill 3Admin api requests blocked for mixed-contentThis is an odd one and happening in a single environment (which unfortunately is production) . I kno