thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

No hooks menu item #2251

Closed VizuaaLOG closed 6 years ago

VizuaaLOG commented 6 years ago

Description:

I have a fresh installation of both Laravel and Voyager. One of the issues I'm having is when I do something, create a new database, add a new relationship to a BREAD, add a new menu item or delete anything. It processes but nothing I change, I then have to further refresh the browser for the action completed notification to show and the thing to happen. I have tried having Dev tools open so that my cache is always clear but still nothing happens straight away.

Edit: The refreshing thing I think is due to an extension I have installed as it works fine in Safari and in Chrome incognito. But the hooks menu item not showing still happens in Safari and incognito mode.

The other strange thing I'm having, is I have no 'hooks' item in the left menu. I can navigate to admin/hooks manually, but even deleting the hooks menu item (refreshing as per above issue) the item disappears, I then re-add it (refresh again) and then the item is showing within the menu builder, but still does not show on the left sidebar menu. Is there something I'm missing, a step I overlooked or something? I just cannot find what is causing this.

Steps To Reproduce:

These are my steps, not sure if this is a known issue.

  1. Fresh install of laravel laravel new project-name
  2. Fresh install of Voyager composer require tcg/voyager
  3. Install Voyager php artisan voyager:install
  4. Create a new user php artisan voyager:admin --create
  5. Login to the admin and there is no 'hooks' and every action that has some effect on the UI, requires an additional refresh to take effect.
VizuaaLOG commented 6 years ago

After digging around today, I found that the problem was that when installing Voyager, the hooks permission was not added to the database. So technically I didn't have permission to view the hooks area, and the menu item was not showing. Although surely this should prevent me from accessing /admin/hooks.

This is also related to this issue considering this is bundled with the core installer, I think this should be addressed.

fletch3555 commented 6 years ago

Voyager is Voyager. It includes Hooks via the voyager-hooks repo, which is where this permission needs to be added (thus the issue you linked to). Yes, we include it, but it's not Voyager's fault that it doesn't exist. (we've had a couple issues related to this, and they've all received the same answer.

Thanks though!

handiwijoyo commented 6 years ago

@VizuaaLOG I added a PR #2402 for quick fix for this

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.