How to display an error page in Joomla! raw component code
I need to display 404 and 403 error pages if some conditions are true in my component code. I'm using /index.php?option=com_live_editor&format=raw to c开发者_StackOverflow社区all a component. raiseError just shows me an output from component with no messages.
Why are you using format=raw in your query string? Is this an Ajax call?
JError::raiseError(404, "Message");
is the appropriate way to show error pages in Joomla.
精彩评论