ingeniasoftware/luthier-ci

routes in api.php only works when ajax request is made by jquery

Closed this issue · 12 comments

When i try to make an ajax request with axios or fetch api gives a 404 error

Did you write request route into api.php?

Hi @s9ul3ss!

In adition to @tepeumut suggest, can you verify that the HTTP_X_REQUESTED_WITH HTTP header is sent with the value xmlhttprequest?

Hello. I wrote it in api.php

I tried to send the X-Requested-With header with the value XMLHttpRequest in axios and it worked but in fetch api it didn't

in fetch api gives a 200 but doesn't show the json in the response

Can you share both your route php code and the javascript code please?

This worked for me, just go to system/core/input.php and comment line 836 and write return true.

cuando intento hacer una solicitud ajax me esta generando el error 503 en mi servidor de producción, solamente el error ocurre desde que empecé a usar Luthier CI, al desactivar el plugin funciona sin problemas hay alguna configuración adicional que se debe realizar?

When I try to make an ajax request it is generating 503 error on my production server, only the error occurs since I started using Luthier CI, when deactivating the plugin it works without problems, is there any additional configuration that must be done?

Hi @jalidchaer, thanks for using Luthier CI.

Please provide more information in order to help you with your issue. 5xx errors are server-related and can occur by many causes such bad server configuration, syntax errors, out of memory, etc.

If you are using apache, try to find the error.log file in your hosting file system and open a new issue with the related stack trace.

Hi @andersonsalas,
Thanks for your answer, the 503 error occurs in ajax requests, as far as I could it is due to a problem in the memory limit, is there any memory or resource limit that must be configured on the server for the use of the plugin?

PHP execution and memory limits can be configured with memory_limit and max_execution_time php.ini directives. However, keep in mind that those directives may be locked/disabled on shared hostings, so I'm assuming that you're using a VPS/dedicated server for your application.

PS: I'm locking this issue because is too old. Please feel free to open another one if you need more assistance.