Pending

User tests: Successful: Unsuccessful:

avatar Naouak
Naouak
27 Feb 2013

404 is for non existing file.
403 is for page that need authorization.

avatar Naouak Naouak - open - 27 Feb 2013
avatar infograf768
infograf768 - comment - 1 Mar 2013

Please create a tracker on joomlacode and explain why you propose this change.
also, there are many other places in Joomla where JERROR_ALERTNOAUTHOR is used, sometimes with a 404 sometimes with a 403. If this change is necessary, shall we not change all?

avatar nicksavov
nicksavov - comment - 23 Mar 2013

Thanks for coding this, Naoak! Also, to add to infograf's comments, some testing instructions would be useful.

For anyone interested, here's the tracker item on JoomlaCode:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30373

avatar oc666
oc666 - comment - 25 May 2013

This might help you:
ofer@ofer-Latitude-E6220:~/projects/joomla3$ grep -rin "JERROR_ALERTNOAUTHOR" * | grep -v language | grep -v 403 | grep raise
administrator/components/com_config/controller.php:57: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_content/content.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_admin/views/sysinfo/view.html.php:54: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_templates/templates.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_menus/menus.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_banners/banners.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_messages/messages.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_finder/finder.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_redirect/redirect.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_checkin/checkin.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_newsfeeds/newsfeeds.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_weblinks/weblinks.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/views/debuguser/view.html.php:37: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/views/debuggroup/view.html.php:37: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/controller.php:66: JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/users.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/controllers/level.php:56: JError::raiseError(500, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/controllers/groups.php:48: JError::raiseError(500, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/controllers/groups.php:66: JError::raiseError(500, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/controllers/groups.php:84: JError::raiseError(500, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/controllers/groups.php:102: JError::raiseError(500, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_users/controllers/groups.php:120: JError::raiseError(500, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_contact/contact.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_installer/installer.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_tags/tags.php:16: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_plugins/plugins.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_categories/categories.php:16: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_search/search.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_modules/modules.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_cache/cache.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
administrator/components/com_joomlaupdate/joomlaupdate.php:14: return JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
templates/beez3/error.php:209: $this->error = JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));
templates/system/error.php:13: $this->error = JError::raiseWarning(404, JText::('JERRORALERTNOAUTHOR'));

avatar elinw
elinw - comment - 25 May 2013

These should just be enqueuing messages not raising warnings. The challenge is to send the correct number to the browser.

avatar elkuku
elkuku - comment - 25 May 2013

Let me throw in a thought here please....
I'm just experimenting in our JTracker thingy with custom Exceptions for 403, 404 and 500 events that can be thrown everywhere and are processed by specialized exception handlers to perform "some actions" like sending the correct status code and giving the possibility to write custom logs for those events.
As I said, it's just a thought ;)

avatar mbabker mbabker - reference | - 16 Nov 13
avatar mbabker mbabker - close - 16 Nov 2013
avatar garyamort garyamort - reference | - 2 Dec 13

Add a Comment

Login with GitHub to post a comment