chris-ware / nova-breadcrumbs

Breadcrumbs for Laravel Nova
152 stars 44 forks source link

Installing package disables pagination links on index pages #14

Closed anderly closed 5 years ago

anderly commented 5 years ago

When I install this package. It appears to disable pagination links on index pages. Have you seen this behavior?

Before enabling \ChrisWare\NovaBreadcrumbs\NovaBreadcrumbs in NovaServiceProvider.php:

chris-ware commented 5 years ago

@anderly Which version of Nova are you using and do you have any other nova packages enabled?

anderly commented 5 years ago

@chris-ware Nova 2.0

Using these packages:

I'm also using Nova with a domain configured for subdomain routing. Below is in config\nova.php:

'domain' => '{tenant}.nova.test',

I'm wondering if it has something to do with the tenant subdomain routing.

I'll test removing that and see if that isolates the problem.

authanram commented 5 years ago

Same issue here. Removing the your package from the NovaServiceProvider made the pagination working again properly.

    "require": {
        "php": "^7.1.3",
        "chris-ware/nova-breadcrumbs": "^0.7.0",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.8.*",
        "laravel/nova": "^2.0",
        "laravel/tinker": "^1.0"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^7.5"
    },

Hope this helps.

chris-ware commented 5 years ago

The package has yet to be tested on Laravel 5.8. I've tried testing it was 1.3.2, which is the version I have to hand at the moment, and Pagination seems to do nothing, even though the documentation seems to suggest it is available. I shall endeavour to test it on 2.0 as the pagination seems to be a nice feature. I probably expect that I need to rebuild the javascript as I extend the base Index view.

authanram commented 5 years ago

I probably expect that I need to rebuild the javascript as I extend the base Index view.

I had a short look also and yes, it's about the index view.

chris-ware commented 5 years ago

This should now have been sorted in the latest release. I've tested it locally and it appears to work fine.

zarsi commented 5 years ago

Hello! Seems to be still problem with v1.0.0.

chris-ware commented 5 years ago

@zarsi What version of Nova are you using as there is a pagination issue with Nova 2.0.0 that was rectified in 2.0.1 and later.

jdanino commented 5 years ago

I'm also having this problem on a fresh install of nova v2.0.3 and Laravel 5.8.16. The pagination works on the first click, then stays disabled. Would be awesome if this could be fixed, its a great little tool!

chris-ware commented 5 years ago

Apparently there are still some issues with Pagination. I haven't updated the package yet with Nova 2.0.3, so it may be that the issues are resolved there. I'm currently working on a new major update on this at the moment, but will see if I can recompile the Javascript for Nova 2.0.3/2.0.4.

ppisecky commented 5 years ago

Yup, I'm seeing the same behavior for Nova 2.0.4. Laravel 5.8

darmen commented 5 years ago

Confirming. Nova 2.0.4. Laravel 5.8

chris-ware commented 5 years ago

I just need to rebuild the javascript for the latest version of Nova, but having some issues with mirroring it to local repo. Once I've done that, I'll release a new patch.

chris-ware commented 5 years ago

The package has now been recompiled for 2.0.5. I have put version constraints in place, for the maximum version, to prevent issues like this from occurring, where the nova version doesn't match the version of nova files that the package has bundled.

chris-ware commented 5 years ago

Closing issue now that this issue should be resolved.

preliot commented 5 years ago

Unfortunatly not resolved (in my app).

When package is enabled, pagination works one time and fails. Also note that when you press a previous / next button, Laravel Nova should show an empty table with loading dots. (new feature in 2.0.5)

When package is disabled in NovaServiceProvider.php > tools everything works as expected.

chris-ware commented 5 years ago

@preliot Have you run artisan nova:publish since upgrading? The package is definitely using the latest views from Nova.

Are you getting any console or network errors?

preliot commented 5 years ago

@chris-ware No console errors . Just run artisan nova:publish (no files replaced) and no effect.

Also observe that Laravel Nova should empty the table and temporary show loading dots. With your package the table shows old data, waits to reload, shows new data and then pagination links fail (they stay disabled).

chris-ware commented 5 years ago

@preliot

I've just re-run the build on it, as it wasn't in production mode anyway, and released a new minor version. It definitely is running using 2.0.5, so there should be no difference between the view I present and the view Nova presents, aside from some extra API calls.

If you are still having issues, can you let me know which particular view you are having issues with?

I'm working on a major update to this package, that should hopefully remove the reliance of custom views, instead loading via hooked components, but there is a reliance on Nova adding hooks into the extra views.

preliot commented 5 years ago

@chris-ware I executed:

composer update chris-ware/nova-breadcrumbs

If nothing else is needed, the issue remains. I can see the new minified css / js in your package, so the update went well.

The issue is present in al my index views.

chris-ware commented 5 years ago

@preliot Could you check your network traffic and see if there are any failed API calls? If there are no console errors, then the code is working as expected so it must be in processing. Something isn't happening when taking the API as a successful api load populates Vue with the correct data and removes the loading view.

Aside from that, there isn't much else I can do as I'm unable to replicate and have no logs to be able to even pinpoint an issue, so I'm coding in the dark

preliot commented 5 years ago

@chris-ware No errors in API. Hope your new api driven approach fixes this.

flxsource commented 5 years ago

@preliot So far we've not been able to recreate this. Are you able to put together a minimal repo that reproduces this? Thanks

preliot commented 5 years ago

@flxsource Unfortunatly i'm dropping this package. There were several bugs related to this package and i'm checking it again when the new api driven approach is released.

chris-ware commented 5 years ago

Closing due to being unable to replicate.