Hello,
Im trying to use this script with ASP.NET MVC 5. I enabled the debug, and when i click on a link it throws me this error:
> pjax.js:878 GET http://localhost:25282/Clientes/Listar/1?t=1543502398672 500 (Internal Server Error)
> module.exports @ pjax.js:878
> loadUrl @ pjax.js:162
> linkAction @ pjax.js:646
> (anonymous) @ pjax.js:684
> pjax.js:113 Uncaught TypeError: Cannot read property 'match' of null
> at Pjax.loadContent (pjax.js:113)
> at Pjax.module.exports [as handleResponse] (pjax.js:749)
> at XMLHttpRequest.request.onreadystatechange (pjax.js:823)
> loadContent @ pjax.js:113
> module.exports @ pjax.js:749
> request.onreadystatechange @ pjax.js:823
> XMLHttpRequest.send (async)
> module.exports @ pjax.js:878
> loadUrl @ pjax.js:162
> linkAction @ pjax.js:646
> (anonymous) @ pjax.js:684
Here is my script
> <script type="text/javascript">
> var pjax = new Pjax({
> selectors: ["#pjax-container"],
> debug: true
> });
> </script>
If i enter manually (through browser) to http://localhost:25282/Clientes/Listar/1?t=1543502398672 there is no problem.
Anyway, there is no possibility to remove the query string t in the requests ?
Thanks
In Pjax initialization options, set cacheBust to false. See here.
Thank you @BehindTheMath! i setted to false, but im still getting the error.
> In Pjax initialization options, set `cacheBust` to
> `false`. See [here](https:/github.com/moox/pjax#cachebust-boolean-default-true).
Thank you @BehindTheMath! i setted to false, but im still getting the error.
We should check [here](https://github.com/MoOx/pjax/blob/2c6506af65e23a1aa256b0c00dddc39590a3a088/lib/proto/handle-response.js#L10) if `responseText` is falsy.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hello,
Im trying to use this script with ASP.NET MVC 5. I enabled the debug, and when i click on a link it throws me this error:
Here is my script
If i enter manually (through browser) to http://localhost:25282/Clientes/Listar/1?t=1543502398672 there is no problem.
Anyway, there is no possibility to remove the query string t in the requests ?
Thanks
In Pjax initialization options, set
cacheBusttofalse. See here.Thank you @BehindTheMath! i setted to false, but im still getting the error.
i solved editing the .js of the loadcontent function:
i added the if (html != undefined) {
We should check here if
responseTextis falsy.