Project

General

Profile

Actions

Bug #1753

closed

Showing a modal from an AJAX request that returns a full-blown HTML page clears the page

Added by Olivier Favre almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

How to reproduce:

Edit a host, get a conflict: this displays an error info in a modal dialog.
Ack then overwrite: it should have shown another error info in a modal dialog too,
but instead of an HTML fragment, foreman gave a full HTML page (with html, head and body) as an answer to some AJAX query,
this has the nasty effect of clearing the page, only showing "2012".

Clue:

$.ajax({
  [...],
  success: function(result) {
    # If result is an HTML fragment, everything is fine
    # if it is a full HTML page, this will somehow clear the page and show "2012"...
    $('#modal-frame-content').html(result);
  }
});

This is a general problem that can arise with code like the above.

Actions #1

Updated by Ohad Levy almost 12 years ago

can you provide the logs from foreman while doing the request?

Actions #2

Updated by Romain Vrignaud almost 12 years ago

  • Priority changed from High to Normal
Actions #3

Updated by Ohad Levy almost 12 years ago

this seems to happen only when the response is 404.

and I'm guessing its related to when renaming a host.

Actions #4

Updated by Amos Benari almost 12 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF