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

[Bug] Create Operation Has Some Bugs #72

Closed
altayevrim opened this issue Mar 27, 2024 · 1 comment
Closed

[Bug] Create Operation Has Some Bugs #72

altayevrim opened this issue Mar 27, 2024 · 1 comment
Assignees
Labels

Comments

@altayevrim
Copy link

altayevrim commented Mar 27, 2024

Bug report

Create Operation Has Some Bugs

What I did

I tried to create some Operations on normal way. I couldn't make it work Bulk typed operation at all. (It didn't display on the crud table no matter what I have tried).
I also tried to use Line typed operation. It generated the codes button did show up but it didn't redirect to the correct method hence when I did click it, It did throw an BadMethodCallException thankfully it gave this suggestion

Did you mean App\Http\Controllers\Admin\UserCrudController::postMakeLineAdminForm() ?

when I checked app/Http/Controllers/Admin/Operations/MakeLineAdminOperation.php@setupMakeLineAdminRoutes

protected function setupMakeLineAdminRoutes(string $segment, string $routeName, string $controller): void
    {
        Route::post($segment.'/{id}/make-line-admin', [
            'as'        => $routeName.'.makeLineAdminAction',
            'uses'      => $controller.'@makeLineAdminAction',
            'operation' => 'makeLineAdmin',
        ]);
    }

when I changed uses to postMakeLineAdminForm it started to work again

All button actions were chosen as Make AJAX call to a POST route (after showing confirmation message)

What I expected to happen

It seems some Operation generators have some problems on DevTools since I cannot use them directly by just working on the place that it says
// You logic goes here...

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

PHP 8.3.3 (cli) (built: Feb 16 2024 00:15:01) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.3, Copyright (c) Zend Technologies
with Zend OPcache v8.3.3, Copyright (c), by Zend Technologies

LARAVEL VERSION:

11.0.8.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.3.0
backpack/crud: 6.7.2
backpack/devtools: 3.1.0
backpack/generators: v4.0.4
backpack/pro: 2.1.11
backpack/theme-tabler: 1.2.8

Operating System and Server Setup

I encountered the problem above on my Mac OS machine, and my web server is set up using Herd Pro with MySQL.

@pxpm
Copy link

pxpm commented Mar 27, 2024

Thanks again @altayevrim

Like I said in #71 this should be fixed in devtools 3.1.1.

If you are still experiencing issues after the update, please let me know and we can re-open it.

Cheers

@pxpm pxpm closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants