Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: etmrugl on December 27, 2007, 11:52:46 PM

Title: Egroupware - Error: the XML response that was ...
Post by: etmrugl on December 27, 2007, 11:52:46 PM
I did a fresh install of smeserver-egroupware-1.4.003.3.noarch.rpm

The installation works, but when I run Egroupware a very irritating popup appears several times a minute:

Error: the XML response that was returned from the server is invalid. Received:

It is a known problem and reported on the forum of egroupware.org. They suggest that you turn off magic_quote_gpc. If I look at the PHP information in egroupware: magic_quote_gpc local is off, magic_quote_gpc master is on.

Does anyone has a workaround for this issue?

BR, Ruud
Title: Re: Egroupware - Error: the XML response that was ...
Post by: uli334 on December 28, 2007, 05:20:27 AM
Hello,

got exact the same problem and would be glad to see a solution.
With this bug egroupware cant be used...

Uli
Title: Re: Egroupware - Error: the XML response that was ...
Post by: cool34000 on December 29, 2007, 12:35:26 AM
I had this problem once... As I was testing admin interface, I added all available icon apps to the admin account and then I had this message...
Try to revert back to default apps, and only add what you really need! Then logout and login again. Can't remember which one it was, sorry :-?
Title: Re: Egroupware - Error: the XML response that was ...
Post by: etmrugl on December 29, 2007, 12:56:35 PM
Thanks for the reply, but..  (there is always a but :-))

I have 3 user accounts and the admin account. The XML error appears only on my own user account. (and not in the admin account)
Only difference is that my account receives most of the spam. I will try to reroute the spam to another account. (might take a few days, will need to search a lot)

Ruud
Title: Re: Egroupware - Error: the XML response that was ...
Post by: cool34000 on December 29, 2007, 01:09:17 PM
Quote
The XML error appears only on my own user account.
Yes! Which applications did you add to your user? All of them?

Quote
(and not in the admin account)
That's the same for any account, try to uncheck some icons apps for your own user (using the admin account). Like I said, that should do the job!
Title: Re: Egroupware - Error: the XML response that was ...
Post by: etmrugl on December 29, 2007, 01:47:25 PM
I unchecked all applications on my own user account. (default you will still see: Home, mail, calendar, addressbook, infolog and logout)

Did not fix the problem.
Title: Re: Egroupware - Error: the XML response that was ...
Post by: uli334 on January 05, 2008, 07:14:33 AM
Hello,

I've got the same error a few times. First I changed "magic_quote_gpc" to "Off" in "php.ini". But still got the error.
When using "admin" all was ok. When using a self-defined user, I got it again.
Now I'm using a user configured as "Default" and there is no error.

Seems it is caused by a special module of egroupware...?
I'll be using egroupware with the "Default" users and hope the error will be fixed in the next version.

Uli
Title: Re: Egroupware - Error: the XML response that was ...
Post by: compsos on July 28, 2008, 01:12:28 AM
Hi
We are getting the same error. The admin login is fine but all others have the pop-up box. The pop-up blocks access to the browser including other tabs.

Quote
Error: the XML response that was returned from the server is invalid.
Received:

In the Messages log is

Quote
httpd: PHP Parse error:  parse error, unexpected T_STRING, expecting '{' in /opt/egroupware/html/notifications/inc/class.notification_popup.inc.php on line 23

Line 23 of class.notification_popup.inc.php "class notification_popup implements iface_notification {"

Does anyone know of a fault finding sequence for this type of fault?

Code: [Select]
<?php
/**
 * eGroupWare - Notifications
 *
 * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
 * @package notifications
 * @subpackage ajaxpopup
 * @link http://www.egroupware.org
 * @author Cornelius Weiss <nelius@cwtech.de>
 * @version $Id: class.notification_popup.inc.php 24126 2007-06-18 08:49:59Z nelius_weiss $
 */

require_once('class.iface_notification.inc.php');

/**
 * Instant user notification with egroupware popup.
 * egwpopup is a two stage notification. In the first stage 
 * notification is written into self::_notification_egwpopup
 * table. In the second stage a request from the client reads
 * out the table to look if there is a notificaton for this 
 * client. (multidisplay is supported)
 */
class notification_popup implements iface_notification {

/**
 * Notification window {div|alert}
 */
const _window 'div';

/**
 * Appname
 */
const _appname 'notifications';

/**
 * Notification table in SQL database
 */
const _notification_table 'egw_notificationpopup';

/**
 * holds account object for user to notify
 *
 * @var object
 */
private $account;

/**
 * holds preferences object of user to notify
 *
 * @var object
 */
private $preferences;

/**
 * holds db object of SQL database
 *
 * @var egw_db
 */
private $db;

/**
 * constructor of notification_egwpopup
 *
 * @param object $_account
 * @param object $_preferences
 */
public function __construct$_account=false$_preferences=false) {
// If we are called from class notification account and prefs are objects.
// otherwise we have to fetch this objects for current user.
if (!is_object($_account)) {
$this->account = (object) $GLOBALS['egw']->accounts->read($_account);
$this->account->id =& $this->account->account_id;
}
else {
$this->account $_account;
}
$this->preferences is_object($_preferences) ? $_preferences $GLOBALS['egw']->preferences;
$this->db = &$GLOBALS['egw']->db;
$this->db->set_appself::_appname );
}

/**
 * sends notification if user is online
 *
 * @param string $_message
 */
public function send$_message ) {
$sessions $GLOBALS['egw']->session->list_sessions(0'asc''session_dla'true);
$user_sessions = array();
foreach ($sessions as $session) {
if ($session['session_lid'] == $this->account->lid'@'$GLOBALS['egw_info']['user']['domain']) {
$user_sessions[] = $session['session_id'];
}
}
if ( empty($user_sessions) ) throw new Exception("Notice: User #{$this->account->id} isn't online. Can't send notification via popup");
$this->save$_message$user_sessions );
}

/**
 * Gets all notification for current user.
 * Requests and response is done via xajax
 * 
 * @return xajax response
 */
public function ajax_get_notifications() {
$response =& new xajaxResponse();
$session_id $GLOBALS['egw_info']['user']['sessionid'];
$message '';
$this->db->select(self::_notification_table
'*', array(
'account_id' => $this->account->id,
'session_id' => $session_id,
),
__LINE__,__FILE__);
if ($this->db->num_rows() != 0) {
while ($notification $this->db->row(true)) {
switch (self::_window ) {
case 'div' :
$message .= '<p>'nl2br($notification['message']). '</p>';
break;
case 'alert' :
$message .= ".\n"$notification['message']. "\n";
break;
}
}
$this->db->delete(self::_notification_table,array(
'account_id' =>$this->account->id,
'session_id' => $session_id,
),__LINE__,__FILE__);

switch (self::_window) {
case 'div' :
$response->addAppend('notificationwindow_message','innerHTML',$message);
$response->addScript('notificationwindow_display();');
break;
case 'alert' :
$response->addAlert($message);
break;
}
}
return $response->getXML();
}

/**
 * saves notification into database so that the client can fetch it from 
 * there via notification->get
 *
 * @param string $_message
 * @param array $_user_sessions
 */
private function save$_message, array $_user_sessions ) {
foreach ($_user_sessions as $user_session) {
$result =& $this->db->insertself::_notification_table, array(
'account_id' => $this->account->id,
'session_id' => $user_session,
'message' => $_message
), false,__LINE__,__FILE__);
}
if ($result === false) throw new Exception("Error: Can't save notification into SQL table");
}
}
Title: Re: Egroupware - Error: the XML response that was ...
Post by: compsos on September 07, 2008, 05:36:33 AM
I have not found a solution to the pop up other than switching off notifications.

This is not an SME issue as other systems were having the same issue with egroupware's notifications.

Cheers