I'm getting that silly error when calling an ajax request, and when I open the URL of the Ajax in the browser, I get the same error.
I've been in this for 2 months. I removed my .htaccess and nothing changed. This is happening only on local environment, not on production.
I tried adding
zlib.output_compression = On;
to my php.ini but did not change anything.
I'm using Opencart 2.2.0.0 | PHP 5.6 | Ubuntu LAMP
UPDATE 1
This is the code called via ajax:-
if I add a print_r($data); it prints the data array, but the issue occurs when it tries to return the rendered content of the view file, I tried to create another view file but got the same response.
UPDATE 2
Here is the request from devTools > network tab:-
and the response tab is empty, no response it returned.
UPDATE 3