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

MorphToMany with Pivot Repeater fields is not working #6046

Closed
msucevan opened this issue Nov 16, 2023 · 2 comments
Closed

MorphToMany with Pivot Repeater fields is not working #6046

msucevan opened this issue Nov 16, 2023 · 2 comments
Labels
needs more info More information is required

Comments

@msucevan
Copy link

msucevan commented Nov 16, 2023

  • Laravel Version: 10.31
  • Nova Version: 4.29.5
  • PHP Version: 8.1
  • Database Driver & Version: MySQL 8.0.33 (DBNGIN)
  • Operating System and Version: Herd v1.3.1 (Build: 18)
  • Browser type and version: Chrome 119 on macOS (Sonoma)

Description:

When I attach a MorphToMany with pivot fields is working as expected, when I'm loading the view/edit page I get an error: `: Cannot access offset of type string on string ``
Is this currently not supported, can I handle this somehow? Or it's a issue?

Detailed steps to reproduce the issue on a fresh Nova installation:

Reproduce with this snippet

            MorphToMany::make(__('Suppliers'))
                ->sortable()
                ->rules('required')
                ->fields(function ($request, $relatedModel) {
                    return [
                        Repeater::make(__('Prices'), 'bulk_prices')->repeatables([
                            BulkPrices::make(__('Prices')),
                        ]
                        )->asJson(),
                    ];
                }),
@davidhemphill davidhemphill added the needs more info More information is required label Nov 28, 2023
@davidhemphill
Copy link
Contributor

Sorry, but we are unable to debug your issue without a reproducible code example. When you're able to demonstrate the issue with an example, feel free to open a new issue.

@hosnyben
Copy link

hosnyben commented Jan 6, 2024

Facing the same issue :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info More information is required
Projects
None yet
Development

No branches or pull requests

3 participants