If you try to check the updates and you have a connectivity problem or the drupal server is down you receive a large warning list without any explication.

Maybe should be easy to show a simple message like: "Impossible to connect to the update server" than this warnings list:

Failed to get available update data for one project.
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Space required after the Public Identifier in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : SystemLiteral " or ' expected in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : SYSTEM or PUBLIC, the URI is missing in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : AttValue: " or ' expected in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : attributes construct error in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : Couldn't find end of Start Tag META line 3 in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 4: parser error : AttValue: " or ' expected in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): A { in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 4: parser error : attributes construct error in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): A { in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 4: parser error : Couldn't find end of Start Tag STYLE line 4 in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): A { in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 37: parser error : Opening and ending tag mismatch: HEAD line 2 and STYLE in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 38: parser error : AttValue: " or ' expected in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 38: parser error : attributes construct error in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 38: parser error : Couldn't find end of Start Tag META line 38 in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 38: parser error : Opening and ending tag mismatch: HTML line 2 and HEAD in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): Entity: line 39: parser error : Extra content at the end of the document in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).
Warning: SimpleXMLElement::__construct(): ^ in update_parse_xml() (line 352 of C:\AppServ\www\drupal7\modules\update\update.fetch.inc).

Comments

Josh The Geek’s picture

Title: Update manager with connexion problems » Update manager connection problem error
Priority: Minor » Major

This should be major . (See http://drupal.org/node/45111)

oriol_e9g’s picture

The try catch structure is not working fine

  try {
    $xml = new SimpleXMLElement($raw_xml);
  }
  catch (Exception $e) {
    // SimpleXMLElement::__construct produces an E_WARNING error message for
    // each error found in the XML data and throws an exception if errors
    // were detected. Catch any exception and return failure (NULL).
    return;
  }

This solve the problem in my case

  try {
    $xml = @new SimpleXMLElement($raw_xml);
  }
  catch (Exception $e) {
    // SimpleXMLElement::__construct produces an E_WARNING error message for
    // each error found in the XML data and throws an exception if errors
    // were detected. Catch any exception and return failure (NULL).
    return;
  }
catch’s picture

Component: update system » update.module
Status: Active » Closed (duplicate)