[Bootstrap] error message box is transparent when modal dialog box is not closed

Bug #1353188 reported by Gloria Gu
This bug report is a duplicate of:  Bug #1362943: Incorrect styling of error alerts. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Triaged
Medium
Shahrukh Aslam

Bug Description

If the implementation of a form uses the following pattern to handle exception:

         except Exception:
            exceptions.handle(request,
                              _('Unable to create volume type.'))
            return False

When exception happens , the modal dialog stays , and upper right corner of the browser will have an error box which has a wrong styling. It is transparent , not red.

I found issue during my implementation using the above pattern...but my code is not in master yet...

this is how I reproduce the issue within current master code base:

to force exception: alter admin/volumes/volumes/forms.py and change the api call to use None...

alter code like : volume_type = cinder.volume_type_create(request,
                                                    None)

go to admin , volumes to create volume type, give any name...you should see the problem.

Please see the attached screen shot of the problem.

Revision history for this message
Gloria Gu (gloria-gu) wrote :
  • exception2.docx Edit (182.8 KiB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
description: updated
Gloria Gu (gloria-gu)
description: updated
Revision history for this message
Cindy Lu (clu-m) wrote :

Hi Gloria,

You and I wrote up a bug report for the same issue on the same day! :) I made mine a duplicate of yours. :)

Cindy Lu (clu-m)
Changed in horizon:
status: New → Triaged
Changed in horizon:
importance: Undecided → Medium
Changed in horizon:
assignee: nobody → ibnyadam (ibnyadam)
Revision history for this message
Shahrukh Aslam (ibnyadam) wrote :

Hi Gloria,
     The exeception type is subclass of RECOVERABLE, and the comment says "# Default recoverable error to WARN log level". Should we change the log level to warning or stick to error.

Its kinda weird issue, if i change the log level, its working good (i tried with all log levels i.e. success, warning and info) but for error, its not applying the required CSS class.

if issubclass(exc_type, RECOVERABLE):
        wrap = True
        if not force_silence and not handled and (not ignore or force_log):
            # Default recoverable error to WARN log level
            log_method = getattr(LOG, log_level or "warning")
            log_method(error_color("Recoverable error: %s" % log_entry))
        if not ignore and not handled:
            messages.error(request, message or log_entry)
        if redirect:
            raise Http302(redirect)
        if not escalate:
            return RecoverableError # return to normal code flow

Revision history for this message
Richard Jones (r1chardj0n3s) wrote :

I have opened bug #1362943 to capture the incorrect styling issue as it affects a number of other interactions.

Revision history for this message
Gloria Gu (gloria-gu) wrote :

Hi ibnyadam,

can you take a look at Richard Jones's bug? I am not not sure if they are related. You might want to try it ...

Gloria

Revision history for this message
Gloria Gu (gloria-gu) wrote :

  Richard Jones was supposed to mark his bud as duplicate of this since this bug is earlier. However he has implemented the solution, he is further along, I will mark this as duplicate :(.

Revision history for this message
Gloria Gu (gloria-gu) wrote :

s/bud/bug

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.