I encountered the following warning message while changing templates after installing Joomla - “Direct Access to this location is not allowed” . What is the reason for the occurrence of this message. Can anyone explain how can i resolve this error ?
I encountered the following warning message while changing templates after installing Joomla - “Direct Access to this location is not allowed” . What is the reason for the occurrence of this message. Can anyone explain how can i resolve this error ?
Since you got the error while changing the templates, check the index.php file for the tempate.
What does it say ? If it says, defined( '_VALID_MOS' ) or die( ...
and legacy mode is off, then this error will occur.
To resolve this, change _VALID_MOS to _JEXEC as defined( '_JEXEC' ) and it should be OK.
"Direct Access to This Location Is Not Allowed"
The above warning message may occur while,
- changing template, installing components (plugins, modules etc) or attempting to enter a component from administrator backend.
- users think they have successfully change to another default template, but when viewing the CMS website or homepage, the error message appears.
- loggin in as superadministrator or administrator, because components and modules developed and done for older version of Joomla! 1.0.x are not compatible with the future generation of Joomla.
Joomla! 1.5 is the latest version of CMS that has undergone major architecture change in coding and design. However, Joomla v1.5 provides a legacy mode that supports backward compatibility for older modules, components, plugins and templates which haven’t been updated for version 1.5.
The Legacy Mode is provided via plug-in, and is disabled by default. You need to enable Joomla! Legacy Mode.
In order to find the workaround for this warning error message, you need to find where does the problem actually exists - in the original code or at the server.
If you restore the original code and it works, then it means something is wrong with your code.
If the original code doesn't work anymore, then it means something is wrong at the server end.
Bookmarks