nova-tabs icon indicating copy to clipboard operation
nova-tabs copied to clipboard

HasTabs trait hides relationship panels in Laravel Nova 4.10.1

Open mikkellindblom opened this issue 2 years ago • 7 comments

Ver. 2.0.9

There seems to be a conflict with Laravel Nova 4.10.1. When adding the HasTabs trait to a resource, relationship panels are hidden on the update/create screens.

Screenshot 2022-06-28 at 13 53 33 Screenshot 2022-06-28 at 13 53 23

When removing the trait:

Screenshot 2022-06-28 at 13 59 26

mikkellindblom avatar Jun 28 '22 11:06 mikkellindblom

Actually i see now i miss a bunch of tabs, never mind.

marcfil avatar Jun 28 '22 12:06 marcfil

With Nova 4.10.1 and Tabs 2.1.0 I seem to have everything back.

Keep in mind, HasMany and MorphMany, shouldn't show up on create/update, that's simply per Nova's design.

image

Let me know if it works for you now.

marcfil avatar Jun 28 '22 13:06 marcfil

Thank you so much 🥳 It works great.

mikkellindblom avatar Jun 28 '22 21:06 mikkellindblom

It seems to be broken again in 4.11.1 @marcfilipan

mikkellindblom avatar Jul 06 '22 11:07 mikkellindblom

on nova 4.12.6 the HasTabs trait actually makes all HasMany relationships dissapear in details view, also with erros in console:

TypeError: Cannot read properties of undefined (reading '0')

jorgeneira avatar Jul 19 '22 01:07 jorgeneira

Looks like it only works now for Nova v4.10.1. We downgraded to make it work for the meantime because it's broken in Nova v4.12.x.

Thanks

chrisbjr avatar Jul 20 '22 03:07 chrisbjr

I'll be able to take a look at it at the of the week.

marcfil avatar Jul 20 '22 06:07 marcfil

@marcfilipan did you have a look already? anything i can do to help fix this issue?

mstaack avatar Aug 14 '22 21:08 mstaack

@crynobone said this is related to the change in 4.12 Nova will now retain the user-defined panel sort order. image

mstaack avatar Aug 16 '22 10:08 mstaack

@mstaack were you able to solve the issue?

albalooshi avatar Aug 28 '22 16:08 albalooshi

We are really waiting for you. Thanks!

s-fog avatar Aug 30 '22 12:08 s-fog

I have everything updated to latest, and it seems to work fine for me.

I'll try it on a fresh install to see if something goes wrong.

marcfil avatar Aug 31 '22 02:08 marcfil

I can confirm I'm experiencing the issue on anything above Nova 4.11. Running Laravel 8, PHP 7.4, Nova Tabs 2.1.

When I upgrade Nova to 4.12 or the latest (4.17 I believe), relationship panels no longer display if they aren't wrapped in a tab if the HasTabs trait is present.

jakelehner avatar Aug 31 '22 15:08 jakelehner

I guess the solution is wrap relationships in a Tab?

I've always had mine wrapped in a Tab and I've not seen this issue once, so it might be worth just updating docs to make that the recommended way of displaying them?

ianrobertsFF avatar Sep 07 '22 16:09 ianrobertsFF

@marcfilipan the issues happens when the relations are not within a tab. try reproducing this as soon as you can ;)

mstaack avatar Sep 08 '22 08:09 mstaack

Can anyone tests this fix: https://github.com/eminiarts/nova-tabs/pull/247

crynobone avatar Sep 08 '22 09:09 crynobone

Fixed in https://github.com/eminiarts/nova-tabs/releases/tag/2.2.0

marcfil avatar Sep 08 '22 10:09 marcfil