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

Problem in production #47

Open
Dipherent opened this issue Jun 8, 2021 · 2 comments
Open

Problem in production #47

Dipherent opened this issue Jun 8, 2021 · 2 comments

Comments

@Dipherent
Copy link

Dipherent commented Jun 8, 2021

Hi David thanks for this amazing package, but can you help please. It is working perfect locally but when I uploaded it to the server it does not seem to work.. I check the console in dev tools and here is the error I get:

-> POST https://ecxample.com/nova-vendor/nova-toggle/toggle/job-trackers 404
Uncaught (in promise) Error: Request failed with status code 404
at FtD3.t.exports (vendor.js?id=f0fd4e570967fbf04e26:1)
....

To be accurate, the toggle does not work on the index in production. When I go into the resource page and then click update or save, it works... but not on the index. In my local setup it works normally.

Do you know how to solve this please?

Thanks

@Dipherent Dipherent changed the title Not working in production Problem in production Jun 8, 2021
@davidpiesse
Copy link
Owner

Hi @Dipherent
So the issue only occurs on the index view in production?
Does it works on the details and form pages in production?

Does it work on index in dev?

Double check you have flushed your cache (for the js file).

A 404 suggest that the Nova vendor routes are not being loaded right.
What do you have in your artisan route:list?

php artisan route:list |grep toggle

@Dipherent
Copy link
Author

Hi @davidpiesse

After very long two days I was able to resolve this by doing the following (I still don't understand why but it is working now):

In my Nova resource

Before:

Toggle::make(__('Invoice Paid'),'invoice_paid')->editableIndex(),

After:

Toggle::make('invoice_paid')->editableIndex(),

Any clues why this was a problem?

Again, thanks for this amazing package.

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