Kyon147 / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
336 stars 99 forks source link

Getting Issue when using GET and POST methods in some cases #256

Closed rgopalakeans closed 3 months ago

rgopalakeans commented 6 months ago

First up all, Thanks for the great package.

We have an app, it supports to add unlimited options for the user. We tried below,

In routes/web.php

Route::get('/manage/addnewrule', []); Route::get('/manage/updaterule', []);

In manage.blade.php & manage-edit.blade.php

<form id="frmRuleID" method="get" action="{{ route('shopify.manage.addnewrule') }}"> <form id="frmRuleID" method="get" action="{{ route('shopify.manage.updaterule') }}">

Trying to add more options

options

But we got error below,

error1


Tried Way II:

In routes/web.php ( Instead of get, post method used )

Route::post('/manage/addnewrule', []); Route::post('/manage/updaterule', []);

In manage.blade.php & manage-edit.blade.php ( method="post" )

<form id="frmRuleID" method="post" action="{{ route('shopify.manage.addnewrule') }}"> <form id="frmRuleID" method="post" action="{{ route('shopify.manage.updaterule') }}">

But we got error below,

error2

Note: The above error, we got not all the time. If we trying with 25% options it adding & updating, But when try complete options update, get the above error. Please guid us to solve this issue?

Thanks, Gopal R

rgopalakeans commented 6 months ago

@Kyon147 Did you checked the above issue?

Kyon147 commented 6 months ago

Hi @rgopalakeans

The request URI error is down to the server and that you are putting too much data into the url as part of the request. You'd need to change how you do it, or batch the requests if the options are too large.

For the GET method is not supported, I've not seen this before and could not replicate it but the error itself in the web.php file happens sometimes because of caching I've found after changing it or it could be something on your web server changing the request type.

Would be hard to know without further investigation.

Kyon147 commented 3 months ago

Closing stale issue