Troubleshooting cause of Inline Edit error (why does it fail to load validation)

I’ve installed my custom module, which also has an extension, logic hooks, and a custom field. When any user tries to do an Inline Edit (Quick edit), a javascript error box, from this line of code where it tries to use a javascript AJAX request to load the field validator, appears. The browser popup says, “There was an error loading the field. Your session may have timed out. Please log in again to fix this”. It’s not because of session timeout, it’s because the validator failed to load a valid JSON response. How can I find the reason why this AJAX request returns a invalid JSON response? Note, When I uninstall my custom module, the error disappears, and Inline Editing works again!

Do you have any custom code injecting JS into that view? That can cause the JSON calls to break.

This is easy to spot by looking closely at the web requests in the web browser (payload and response).

You can also try debugging it server-side, controller action is here

1 Like

Thanks @pgr the browser console showed a glitch in the AJAX response, and fixing that made the inline editing work again.