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

[BUG] Route [voyager.theme.index] not defined. #20

Open
DerekBuntin opened this issue Feb 4, 2019 · 4 comments
Open

[BUG] Route [voyager.theme.index] not defined. #20

DerekBuntin opened this issue Feb 4, 2019 · 4 comments

Comments

@DerekBuntin
Copy link

Hooks Version: ^1.0
Voyager Version: 1.1.10
Laravel Version: 5.7.24
PHP Version: >=7.1.3
Description:
Themes and redirect hooks give the same error:

Route [voyager.theme.index] not defined.

Steps To Reproduce:
Try and access admin after logging in and the system gives a 500 error message.

NOTE:

Hooks Version: ^1.0
Voyager Version: 1.1
Laravel Version: 5.7.24
PHP Version: >=7.1.3

I have another project on the same local system running earlier versions of voyager and the two hook packages that work with Laravel 5.7.24.

UPDATE:

I updated the working project from Voyager 1.1 to 1.1.10 and this issue appeared.

@DerekBuntin
Copy link
Author

This conditional logic is what's causing the problem in the register method:

if (request()->is(config('voyager.prefix')) || request()->is(config('voyager.prefix').'/*')) { // }

Once commented out the hook worked with exception to an error being generated when running:

php artisan optimize

Saying that it can't optimize the routes because of the closure being used within the addThemesRouter so I commented out the original and replaced it with the following:

$router->get('themes/options', $namespacePrefix.'ThemesController@index');

I commented out the original:

$router->get('themes/options', function () { return redirect(route('voyager.theme.index')); });

Everything was back up and running as normal after these changes were made.

@billoo2378
Copy link

Hello, I am interested in the voyager theme but i actually want to know that the voyager theme will be suitable for my site http://restaurantfastfood.com/ and how many versions of the voyager themes available so far.

@predam
Copy link

predam commented Mar 22, 2022

The problem is related to the route cache.
This should fix the problem php artisan route:clear

@hugo-abdou
Copy link

@predam thank you

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

4 participants