whitecube / nova-flexible-content

Flexible Content & Repeater Fields for Laravel Nova
MIT License
778 stars 230 forks source link

Resource Details view fails to load in Nova 4.32.13 and up #507

Closed ryandrobinson closed 3 months ago

ryandrobinson commented 4 months ago

Tested in Laravel Nova 4.32.13 and 4.32.15:

Loading a Nova Resource Details screen that has a Flexible field causes the Chrome tab to lock up. No exceptions are logged, and no console errors are shown.

The latest version of Nova I've found to work properly with this package is 4.32.11

jmverges commented 4 months ago

@ryandrobinson happy to see I'm not the only one.

PimButton commented 4 months ago

We also have this problem!

LTKort commented 4 months ago

@ryandrobinson Does the amount of layouts / presets and/or models have any effect? We’ve tried with 2 pages and 6 layouts and everything seems to work, but with bigger projects it breaks. When looking into the changes of Nova, not a lot of ‘real’ logic has changed.

justindantzer commented 4 months ago

@LTKort Locally I'm testing with a single layout, containing 2 fields, and have the same issue noted by @ryandrobinson.

Can confirm version Nova 4.32.11 is functional with Flexible fields.

bracketsdigital commented 4 months ago

same issues here :(

aurelien-ci commented 4 months ago

I have the same problem : we can create the ressource but then its impossible to open edit page, even if the fields or the layout is empty (with nova 4.32.14, nova-flexible-content 1.0.14)

SchwartzN commented 4 months ago

Same issue as @aurelien-ci

bracketsdigital commented 4 months ago

We seem to be okay if we update our composer.json file to specify the previous release: "whitecube/nova-flexible-content": "1.0.13" ..then run: composer update --prefer-dist

alekmlynek commented 4 months ago

Have this same issue. Client reported it to me after creating a "resource" then having it freeze up. It seems like a JS issue, the browser asks to terminate the script that is run on infinite loop.

As a terrible bandaid, I've advised them to use the "Update and Continue Editing" function and then manually exit the resource.

chrispage1 commented 4 months ago

Yep, exactly the same issue here.

It's worth noting this does seem specific to a Nova update as keeping the same flexible content package and upgrading Nova causes the problem. For now I've reverted to our last known working Nova version 4.27.12

mateusgalasso commented 4 months ago

same error here

ArtDepartmentMJ commented 4 months ago

Same 😟

pazazdigital commented 4 months ago

Hey whitecube, very happy to pay you for you to resolve this asap. Let us know. :)

voidgraphics commented 4 months ago

We seem to be okay if we update our composer.json file to specify the previous release: "whitecube/nova-flexible-content": "1.0.13" ..then run: composer update --prefer-dist

If this is the case, it means the bug comes from #490 which is the only change there was in that version. Admittedly, I merged it without testing, as I had neither the time nor the necessary license, and the comments on it seemed to indicate it was functional. I apologise for the trouble.

The license being a problem, I can not fix this right now, and I need to discuss a possible renewal with @toonvandenbos before I do anything. It's the week-end right now, so I will ask for your patience until monday. I believe in the mean time you can force version 1.0.13 of this package to fix the problem.

Hey whitecube, very happy to pay you for you to resolve this asap. Let us know. :)

That's very kind, thank you. We always appreciate sponsorships. If you're rather thinking about a one-time contribution to help us get this particular issue sorted, you can contact me by e-mail at adrien@whitecube.be and I'll make sure the boss hears about it so we can dedicate some time for this asap!

In any case, if anyone else wants to have a go at a PR, that would work too and I'll be sure to get it merged quickly (although without testing it first, again, as I have no access to a license right now).

Also a reminder that we are looking for someone who regularly uses this package and would be willing to help us maintain it. If anyone is interested, feel free to send me an e-mail about this as well.

LTKort commented 3 months ago

@voidgraphics I reverted #490 in #509

LTKort commented 3 months ago

Okay, I think I found the issue, the layout attribute keys were all being loaded and looped. So there were some extreme long strings, and layouts were being loaded that should not load.

I pushed my fix on #509. Is there anyone who could verify this works?


To test or use these changes, temporarily add my fork to the repositories property of your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/ltkort/nova-flexible-content.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "whitecube/nova-flexible-content": "dev-l11-compatibility",
    }
}

Finally, run: composer update

Jon78 commented 3 months ago

I pushed my fix on #509. Is there anyone who could verify this works?

Good find. Works!

daanadriaan commented 3 months ago

I pushed my fix on #509. Is there anyone who could verify this works?

Works!

voidgraphics commented 3 months ago

Please upgrade to v1.1.0 for L11 compatibility and a revert of the problematic PR which caused this error.