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

Block multi module browser bug #2278

Open
rudenav opened this issue May 31, 2023 · 0 comments · May be fixed by #2533
Open

Block multi module browser bug #2278

rudenav opened this issue May 31, 2023 · 0 comments · May be fixed by #2533
Assignees
Labels
type: enhancement New feature or request

Comments

@rudenav
Copy link

rudenav commented May 31, 2023

Description

I have a block with a browser field that produces errors in the log file

Steps to reproduce

  1. Create a block
  2. Define the getForm method with a browser field linked to several modules
    public function getForm(): Form
    {
        return Form::make([
            Browser::make()->name('link')->modules([Page::class, Contact::class]),
        ]);
    }
  1. Select a module and store the form.
  2. When you try edit this record you will get an errors in the log file
local.NOTICE: Twill warning: The url for the "link" browser items can't be resolved. You might be missing a link key in your twill.block_editor.browser_route_prefixes configuration.

and

local.ERROR: Route [twill.link.edit] not defined. {"userId":1,"exception":"[object] (Symfony\\Component\\Routing\\Exception\\RouteNotFoundException(code: 0): Route [twill.link.edit] not defined. at /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:467)

also the link in the form in the browser field on the selected module will be empty

Expected result

The system should look for twill.pages.edit or twill.contacts.edit route respectively.

Actual result

The system looks for an undefined route [twill.link.edit] that based on the browser field name

Versions

Twill version: 3.0.2
Laravel version: 10
PHP version: 8.2
Database engine: Postgresql

@ifox ifox added the type: enhancement New feature or request label Feb 10, 2024
@ifox ifox moved this to Next in Twill roadmap Feb 10, 2024
@zeezo887 zeezo887 self-assigned this Mar 11, 2024
@zeezo887 zeezo887 moved this from Next to In progress in Twill roadmap Mar 11, 2024
@zeezo887 zeezo887 linked a pull request Mar 11, 2024 that will close this issue
@ifox ifox linked a pull request May 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

3 participants