Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8113789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:56:39+00:00 2026-06-06T02:56:39+00:00

We all run into errors using Drupal– most of which are easy to fix.

  • 0

We all run into errors using Drupal– most of which are easy to fix. Some, however, are not so easy to fix and require many hours of digging even though the website works fine with the error.

My question: To work around this digging, is it possible to have Drupal assign a specific CSS class to each error so you can easily make it display:none?

If there isn’t a way to do this, is it possible to assign a display:none; to the parent element (the error “div” in this case below) if – for example – the error string = "Warning: Invalid argument supplied for foreach() in element_children() (line 6282 of /var/www/html/includes/common.inc)." using jQuery / Javascript?

<div class="messages error">
    <h2 class="element-invisible">Error message</h2>
    <em class="placeholder">Warning</em>
    : Invalid argument supplied for foreach() in
    <em class="placeholder">element_children()</em>
    (line
    <em class="placeholder">6282</em>
    of
    <em class="placeholder">/var/www/html/includes/common.inc</em>
    ).
</div>

Thanks for the help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:56:41+00:00Added an answer on June 6, 2026 at 2:56 am

    Hiding error messages using CSS is a very very very bad idea. Instead, you should turn off error reporting to screen by going to Administration » Configuration » Development » Logging and errors and turning Error messages to display to none.

    With that switched off, no one will see those errors but, as the admin, you can view them yourself by going to Administration » Reports » Recent log messages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have run into an issue in which IE does not open up the
All web developers run into this problem when the amount of data in their
I run into follow problem. Did I miss anything? Association.all().count() 1 Association.all().fetch(1) [Association(**{'server_url': u'server-url',
I am using boost's threading library and have run into linking issues in Visual
I'm currently rewriting some existing technologies that were once using RSA Security's libraries into
I am currently using jQuery Mobile on a project and have run into a
I'm working on some cross-platform code using OpenGL and SDL, but have immediately run
I've run into trouble in the past when I've tried porting some C++ code
I'm using gwt-maven-plugin to manage a GWT project. I use the gwt:run goal all
when calling PQconnectdb in the main program all run very well, but if i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.