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

MethodNotAllowedHttpException (No message) when deleting a record #2438

Closed
NaturalDevCR opened this issue Jan 5, 2018 · 5 comments
Closed

Comments

@NaturalDevCR
Copy link

NaturalDevCR commented Jan 5, 2018

  • Laravel Version: 5.5
  • Voyager Version: 1.0
  • PHP Version: 7.2
  • Database Driver & Version: MariaDB 10.2

Description:

After creating a new database, also bread ready, when trying to delete the record, throws the error below, also when trying to edit the record, the URL goes to: https://mydomain/admin/hotels//edit

As you can see on that url there is an empty space before the edit, not sure if it's related with the main issue.

Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException thrown with message ""

Stacktrace:
#26 Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:255
#25 Illuminate\Routing\RouteCollection:methodNotAllowed in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:242
#24 Illuminate\Routing\RouteCollection:getRouteForMethods in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:176
#23 Illuminate\Routing\RouteCollection:match in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php:612
#22 Illuminate\Routing\Router:findRoute in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php:601
#21 Illuminate\Routing\Router:dispatchToRoute in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Router.php:590
#20 Illuminate\Routing\Router:dispatch in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
#19 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
#18 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /home/trankilo/public_html/beta/vendor/fideloper/proxy/src/TrustProxies.php:56
#17 Fideloper\Proxy\TrustProxies:handle in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#16 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#15 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30
#14 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#13 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#12 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:30
#11 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#10 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#9 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27
#8 Illuminate\Foundation\Http\Middleware\ValidatePostSize:handle in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#6 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:46
#5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:149
#4 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#3 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:102
#2 Illuminate\Pipeline\Pipeline:then in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
#1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in /home/trankilo/public_html/beta/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
#0 Illuminate\Foundation\Http\Kernel:handle in /home/trankilo/public_html/beta/public/index.php:55

Steps To Reproduce:

Fresh install Laravel 5.5
Fresh install Voyager 1.0
Create a database with id | name | description | price | (default timestamps)
Create a record
Try deleting a record

@fletch3555
Copy link
Collaborator

Sounds like you have something misconfigured, but I'm not sure what it would be. Is your id field a simple auto-incrementing integer? or something else?

@NaturalDevCR
Copy link
Author

@fletch3555 Yes, its a simple auto-incrementing integer, just as is created by default, name is varchar 255, description is text, and price is Decimal unsigned.

@vblinden
Copy link

@LaravDev

I created the following migration and everything is up to date. Could you provide more information about this issue?

Schema::create('hotels', function (Blueprint $table) {
    $table->increments('id');
    $table->string('name', 255);
    $table->text('description');
    $table->decimal('price')->unsigned();
    $table->timestamps();
});

@emptynick
Copy link
Collaborator

Closing due to age.
Please provide more informations if this is still a problem.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants