Skip to content

Joomla component loading throws exception [migrated]

I’m working on a Joomla 4 website which is migrated from Joomla 3.11. Everything else is working fine except one page. These page is also rendered and further it loads data from a ajax request from the same server. The ajax request is failing. While troubleshooting the issue I found that jquery is trying to load PHP files directly. This is the jquery code which is loading php file.

jQuery.get( "components/com_mycomp/lib/common/load.php", {scope:"get_first_site"}, function(first_site) { .... }

When I navigate to this url (http://localhost/components/com_mycomp/lib/common/load.php) manually from the browser, it throws and exception: “Failed to start application”
enter image description here