New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roundcube fails if XMPP server offline. #20

Closed
masterxq opened this Issue Feb 10, 2014 · 6 comments

Comments

Projects
None yet
3 participants
@masterxq

masterxq commented Feb 10, 2014

Roundcube will fail loading if the XMPP server is offline.
With the error:
PHP Fatal error: Call to a member function getAttribute() on a non-object in /var/lib/roundcube/plugins/converse/php/xmpp-prebind-php/lib/XmppPrebind.php on line 127

That should be catched.

Thanks for your work
MasterQ

@PoGo606

This comment has been minimized.

Show comment
Hide comment
@PoGo606

PoGo606 Mar 4, 2014

Same problem here, whole roundcube should be able to run even with the XMPP server offline.

PoGo606 commented Mar 4, 2014

Same problem here, whole roundcube should be able to run even with the XMPP server offline.

@priyadi

This comment has been minimized.

Show comment
Hide comment
@priyadi

priyadi Mar 17, 2014

Owner

I fixed this in XmppPrebind.php upstream long time ago. But I totally forgot to update its copy here. It's committed now and it should give you login form if the XMPP server is offline.

Owner

priyadi commented Mar 17, 2014

I fixed this in XmppPrebind.php upstream long time ago. But I totally forgot to update its copy here. It's committed now and it should give you login form if the XMPP server is offline.

@priyadi priyadi closed this Mar 17, 2014

@PoGo606

This comment has been minimized.

Show comment
Hide comment
@PoGo606

PoGo606 Mar 17, 2014

Hello,

Thanks for the update, but I'm afraid that it didn't fix all the issue.
I've shutdown the xmpp server, and try to connect to Roundcube, I've got the following error message :

Fatal error: Call to a member function getAttribute() on a non-object in /usr/share/apache2/roundcubemail/plugins/converse/php/xmpp-prebind-php/lib/XmppPrebind.php on line 133

I've check the file XmppPrebind.php and it has been updated accordingly to your repository.

PoGo606 commented Mar 17, 2014

Hello,

Thanks for the update, but I'm afraid that it didn't fix all the issue.
I've shutdown the xmpp server, and try to connect to Roundcube, I've got the following error message :

Fatal error: Call to a member function getAttribute() on a non-object in /usr/share/apache2/roundcubemail/plugins/converse/php/xmpp-prebind-php/lib/XmppPrebind.php on line 133

I've check the file XmppPrebind.php and it has been updated accordingly to your repository.

@priyadi

This comment has been minimized.

Show comment
Hide comment
@priyadi

priyadi Mar 17, 2014

Owner

Hi, try modifying around line 133 so it looks like the following:

                $response = $this->sendInitialConnection();

                $body = self::getBodyFromXml($response);
                if (is_object($body)) {
                        $this->sid = $body->getAttribute('sid');
                } else {
                        throw new Exception('Unable to connect to XMPP server');
                }
                $this->debug($this->sid, 'sid');

Let me know if this fixes your problem.

Owner

priyadi commented Mar 17, 2014

Hi, try modifying around line 133 so it looks like the following:

                $response = $this->sendInitialConnection();

                $body = self::getBodyFromXml($response);
                if (is_object($body)) {
                        $this->sid = $body->getAttribute('sid');
                } else {
                        throw new Exception('Unable to connect to XMPP server');
                }
                $this->debug($this->sid, 'sid');

Let me know if this fixes your problem.

@priyadi priyadi reopened this Mar 17, 2014

@PoGo606

This comment has been minimized.

Show comment
Hide comment
@PoGo606

PoGo606 Mar 17, 2014

Yes it did !

Many thanks !

PoGo606 commented Mar 17, 2014

Yes it did !

Many thanks !

@priyadi

This comment has been minimized.

Show comment
Hide comment
@priyadi

priyadi Mar 17, 2014

Owner

Fix committed. Let me know if there's any more problem.

Owner

priyadi commented Mar 17, 2014

Fix committed. Let me know if there's any more problem.

@priyadi priyadi closed this Mar 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment