Drupal Print Error Messages
Contents |
all over the world. Join today Community Community Home Getting Involved Chat Forum SupportModule Development and Code Questions How to display error message? Posted by drupalisme on August 4, 2008 at 2:04pm I drupal error messages to display need to display the error message for debugging my module, i.e to display drupal error messages not showing error from this wrong SQL statement:$results_test = db_query("SELECT A B FROM {users}"); but Drupal hides above error. I already try to drupal webform error messages add this in settings.php but still not work:ini_set('display_errors', 1); in php.ini:error_reporting = E_ALLdisplay_errors = On Any advice, please? Log in or register to post comments ⋅ Categories: Drupal 5.x Comments drupal_set_message Kevin Hankens commented drupal hide error messages August 4, 2008 at 3:18pm Check out the drupal_set_message() function in the Drupal API. Good luck! Log in or register to post comments I mean ... drupalisme commented August 5, 2008 at 2:22am Sorry, I need to display the PHP error message, so this will make me easy to debug my code. Any idea? Log in or register to post comments Displaying PHP errors dimmer commented October 19, 2008
Drupal Hide Error Messages From Users
at 8:01am This is bothering me as well. In fact, I'm perplexed at how drupal hides errors. I'm guessing it has to do with buffering output... I've got the following in my apache configuration: php_admin_value error_reporting 'E_ALL | E_STRICT' php_admin_flag display_errors 'on' php_admin_flag display_startup_errors 'on' php_admin_flag log_errors 'on' Yet, I can do something like print $variabledoesntexist; and get no error. Log in or register to post comments You may try my patch at MrHaroldA commented August 20, 2009 at 12:34pm You may try my patch at http://drupal.org/node/554660 for this issue... ezCompany | DIY-Layout | TANK86 Log in or register to post comments This one worked for jauny commented July 31, 2011 at 12:12pm This one worked for me:http://www.ubercart.org/faq/2246 Summarized: Insert these three lines at the beginning of the index.php file. error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); Log in or register to post comments News itemsDrupal news Planet Drupal Association news Social media directory Security announcements Jobs Our communityCommunity Getting involved Services, Training & Hosting Groups & Meetups DrupalCon Code of conduct DocumentationDocumentation Drupal 8 docs Drupal 7 docs Developer docs api.drupal.org Drupal code baseDownload & Extend Drupal core Modules Themes Distributions Governance of communityAbout Web accessibility The Drupal Association About Drupal.org Terms of service Privacy polic
Association members fund grants that make connections all over the world. Join today Warning message Documentation is currently being migrated
Drupal Disable Error Messages
into the new system. Some pages might be temporarily missing, and drupal disable error messages for anonymous some guides might appear empty. Thank you for your patience while we are improving Drupal.org documentation. drupal error message the file could not be created Creating custom modules Getting started Telling Drupal about your module Writing comments and implementing your first hook Declaring the block Retrieving data Generating block content Testing and https://www.drupal.org/node/290929 troubleshooting the module Preparing for a module configuration form Creating the configuration form Validating the data Specifying a custom permission for a new page Adapting the query Theming the page Theme function parameter map Adding a 'More' link Testing with SimpleTest Practicing patches Writing module .info files (Drupal 7.x) Show all errors while developing https://www.drupal.org/docs/7/creating-custom-modules/show-all-errors-while-developing Creating Drupal 7 hooks Drupal 7's code registry Exportable configuration Suppress caching (for development) or to use an external page cache Using the theme layer (Drupal 7.x) Writing .install files (Drupal 7.x) Drupal 6/7 programming from an object-oriented perspective Making your custom data translatable Module development HowTos Working with multilingual content Show all errors while developing Last updated on September 21, 2016 - 18:52 Set Drupal to show all errors when developing your module. Some errors are only reported when all PHP error reporting is switched on. Without the error reporting on, you get the dreaded White Screen of Death. Check for errors behind the scenes As an alternative between showing no errors and showing all errors, you may wish to monitor the errors being generated by your site by running tail -f /var/log/apache2/error.log on your server. Change settings in your dev site You can show all errors by adding a few lines to your local testing site's settings.php:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://drupal.stackexchange.com/questions/81670/cant-display-error-message-in-custome-form workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring 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 error message how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Cant display error message in custome form! up vote 0 down vote favorite I have create one form which have two fields. $form['name'] = array( '#type' => 'textfield', '#title' => t('Name'), '#maxlength' => 20, '#required' => TRUE, drupal error message ); $form['phone'] = array( '#type' => 'textfield', '#title' => t('Phone'), '#maxlength' => 20, '#required' => TRUE, ); In page.tpl.php file displayed both fields. Now i have press submit button without enter any value in text box error message will displayed. But in my page.tpl.php file cant display error message! How can i show all error message? 7 share|improve this question asked Aug 6 '13 at 14:27 user19815 614 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote Hope this will help you. In Drupal 7, just add this line in your custom template file share|improve this answer answered Aug 6 '13 at 16:22 inizio 3,424416 Wow it's work.. –user19815 Aug 7 '13 at 6:41 @user19815 if that is the correct answer, then accept it. –4life Aug 9 '13 at 14:22 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Passwo