Drupal Hide Error Messages From Users
Contents |
all over the world. Join today Community Community Home Getting Involved Chat Forum SupportPost installation Hide Error messages from non-Admins? Posted by jdln on October 26, 2010 drupal 7 hide error messages at 7:23pm I have a module thats occasionally giving me an SQL
Drupal Hide Warning Messages From Users
error message. As the module is working fine and the fix is committed to the next release im leaving
Drupal Turn Off Error Messages
it for now. The only problem is my client has seen the message. Can I hide error messages based on roles? I dont know how to recreate the error so its
Drupal Webform Error Messages
hard to test. Thanks Log in or register to post comments Comments I would not recommend hiding theabacus commented October 26, 2010 at 10:16pm I would not recommend hiding all errors from users, since some errors are designed for them. In the "error reporting" section of the admin (admin/settings/error-reporting) you can set PHP/MySQL errors to only write to log and not to display drupal error reporting settings php on screen. You can then check the log to see the errors that are occurring since it is hard to reproduce them... Log in or register to post comments Ok. I wish there way a way so jdln commented October 27, 2010 at 9:14am Ok. I wish there way a way so just show errors to user 1 or by role. Thanks Log in or register to post comments There's a module somewhere ari-meetai commented January 13, 2011 at 4:15pm There's a module somewhere that does exactly that. I regret I can't remember where... It won't be too difficult to code, though. EDIT: here you have - http://drupal.org/project/msg2log < Merged into Drupal Tweaks Meetai - Drupal solutions Log in or register to post comments Thanks! jdln commented January 13, 2011 at 4:57pm Thanks! Log in or register to post comments You could also try anoopjohn commented May 25, 2011 at 10:09pm You could also try http://drupal.org/project/disable_messages if hiding messages is all what you need. Log in or register to post comments d7 db query mcdoolz commented June 30, 2013 at 11:34pm I've found a few t
all over the world. Join today Download & Extend Drupal Core Distributions Modules Themes Issues how I can hide error messages for anonymous users? Closed (fixed)Project:Drupal drupal disable messages coreVersion:6.x-devComponent:otherPriority:NormalCategory:Support requestAssigned:UnassignedReporter:kenorbCreated:December 3, 2008 - 14:22Updated:June 6, 2016 - 07:59 Log in or drupal disable messages example register to update this issue Jump to:Most recent comment How I can hide error messages for anonymous users? drupal hide warning messages Is there any module which handle that? Especially errors generated by PHP and MySQL syntax errors. Comments Comment #1 sumitshekhawat7331 CreditAttribution: sumitshekhawat7331 commented December 3, 2008 at 2:24pm hi just remove https://www.drupal.org/node/953644 this line from your page.tpl.php if ($show_messages && $messages): print $messages; endif; ?> Log in or register to post comments Comment #2 ultimateboy CreditAttribution: ultimateboy commented December 3, 2008 at 3:15pm Status: Active » Postponed The above will remove error messages for all users, which usually is not a good thing. The problem is that drupal has a very narrow way of classifying https://www.drupal.org/node/342128 messages. There really are only three options: status, error, and warning. Therefore there is no easy way to classify that a certain type of message be removed without harmful side effects. PHP and mySQL errors have a type of "error", but so does not filling in a required field in a form... so you cannot classify that way. I honestly do not think there would be a way to achieve the effect you are looking for without adding more parameters to drupal_set_message(), which is an interesting idea, but at this time, I do not see this as being a huge problem that needs solving at this point in time. It is my opinion that a site should not launch with php and mysql errors... Log in or register to post comments Comment #3 ultimateboy CreditAttribution: ultimateboy commented December 3, 2008 at 3:16pm Status: Postponed » Closed (won't fix) Actually, won't fix is probably a better classification. Log in or register to post comments Comment #4 kenorb CreditAttribution: kenorb commented March 3, 2009 at 12:06pm Status: Closed (duplicate) » Postponed (maintainer needs more info) Looking f
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring http://drupal.stackexchange.com/questions/36192/hide-errors-from-users-but-show-to-admin developers or posting ads with us Drupal Answers Questions Tags Users Badges Unanswered Ask Question _ Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute: Sign up Here's how https://www.ostraining.com/blog/drupal/warnings/ it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Hide errors from users but show to admin? up vote 14 down vote favorite 3 Under 'Error messages error messages to display' I can hide errors (as is recommended for production sites). However is it possible to hide errors for everyone except a certain role? 7 share|improve this question edited May 7 at 23:34 kiamlaluno♦ 66.5k897192 asked Jul 6 '12 at 11:03 Evans 69111639 yes it is, there are some modules around for that. But what you are suggesting also hides form errors too, as I stated below. –reptilex Sep 11 '15 at 11:28 add a comment| hide error messages 5 Answers 5 active oldest votes up vote 1 down vote accepted Disable Messages module You could use the Disable Messages module for this. Here is a quote from its project page: Gives a site owner options to disable specific messages shown to end users. The core drupal message system as offered by drupal_set_message is an excellent way for modules to send out messages to the end users. However not all drupal site owners are keen to show all the messages sent out by drupal core and all modules to their users. This module gives site administrators a reasonably powerful way to filter out messages shown to the end users. Some of its features are: Filter out messages that match a full text string exactly. Filter out messages that match a regular expression. Permissions to specifically hide all messages of a given type from any role. Disable all filtering for specific users. Disable all filtering for specific paths. Apply filtering only for specific paths. Debug system to get messages in the HTML without showing it to the end users. A stable release is available for either Drupal 6 or Drupal 7 (and a DEV version for Drupal 8). Unstable alternative There is also the Better Messages module as an alternative (suggested in one of the other answers here). However, for D7 (which is what this question is about), it only has an Alfa version. share|improve t
Burge on October 30, 2012 | Drupal Twitter Websites will run into problems.Whether you're using Drupal or any other software, there will be problems at some point.Drupal runs on PHP and when PHP has problems, it reports them to you. However, often these errors will appear on your site and will be visible to visitors:In this tutorial, we're going to give you a quick introduction to these errors. We'll explain the different types that might appear on your site and how you can stop them from showing.Notices vs Warnings vs ErrorsThere are three main ways in which PHP will report problems: notices, warnings and errors.NoticesThese are the least important. According to the official PHP website, notices are generated when:"the script encountered something that could indicate an error, but could also happen in the normal course of running a script."WarningsWarnings are more serious, but probably won't break your site. According to the official PHP website, warnings are:"non-fatal errors. Execution of the script is not halted."ErrorsErrors are the most serious type of problem and may break your site. According to the official PHP website, warnings are:"Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted."Option 1: Disabling Error Reporing on Your Drupal SiteOne the solution, and probably the one you'll take first, is to stop the errors from showing. Go to Configuration > Logging and Errors. You have three choices: None will disable all error reporting. Errors and warnings will display on the most serious problems. All messages will display all problems and is probably only useful for developers. Option 2: Fix the ProblemYes, yes, I know this is a controversial idea. Fixing a problem is definitely harder than hiding a problem.Here are some suggestions to help you fix the problem. Please backup your site before trying any of these. Make sure your Drupal site and all your modules and themes are up-to-date. Search Google and Drupal.org for anyone who has reported the same message. See if they have found a solution. Read the message itself for hints about the problem. For example, the problem in the image at the top of this tutorial isall/modules/calendar/includes/calendar_plugin_display_page.inc on line 47.