HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


XMPP module

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#63603 (In Topic #13761)
Avatar

Well-settled

getting an error

Hi there,

I have my own ejabberd chat server so I figured I would set one up on my local host to test before deploying anything live. I installed the module as per the instructions: http://ocportal.com/site/downloads/entry/add-onsmodifications/version_50/user_interactivity/xmppchat.htm

ejabberd 2.1.5 running fine. I can log in using the ocPortal user accounts and everything and create rooms within Gajim (chat client).

So it seems like everything is working fine except with ocPortal. I might not have created the menu right. I linked it to Zone: site > Module: chat and it gives this error I pasted at the bottom of this message.

I installed the addon by selecting it from the list of addons in the admin zone and it seemed to install fine.

What could I be doing wrong? Thank you for your time =)

Ryan
P.S. I just accidentally clicked the little blue box with a white arrow in it which appeared at the bottom after clicking Preview. It links to this: http://ocportal.com/data/preview.php?page=topics&type=new_topic#
It says An error has occured: You have gone to an URL which requires 'posted' data to be sent (post), as well as the information in the URL itself. This is most likely because you have copied and pasted a link to a new browser window, but the page the link was for was a results page for an action.
Just thought I would let you know. Thanks =)




An error has occurred

A template file is missing: JAVASCRIPT_XMPP_DOM-ALL (version: 5.0.2 beta 1, PHP version: 5.3.3, URL: /ocportal/site/index.php?page=chat)

Here is the stack trace:

Below is a stack trace revealing the state the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check TY2U website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.

File'/var/www/html/ocportal/sources/failure.php'
Line'594'
Function'get_html_trace'
Args

File'/var/www/html/ocportal/sources/global2.php'
Line'920'
Function'_fatal_exit'
Argsobject


File'/var/www/html/ocportal/sources/tempcode.php'
Line'499'
Function'fatal_exit'
Argsobject


File'/var/www/html/ocportal/sources/css_and_js.php'
Line'40'
Function'do_template'
Args'JAVASCRIPT_XMPP_DOM-ALL'


File'/var/www/html/ocportal/sources/global2.php'
Line'1,524'
Function'js_compile'
Args'javascript_xmpp_dom-all'

'/var/www/html/ocportal/themes/default/templates_cached/EN/javascript_xmpp_dom-all.js'

true


File'/var/www/html/ocportal/sources/global2.php'
Line'1,589'
Function'javascript_enforce'
Args'javascript_xmpp_dom-all'


File'/var/www/html/ocportal/sources/symbols.php'
Line'932'
Function'javascript_tempcode'
Args'header'


File'/var/www/html/ocportal/sources/tempcode.php(1405) : eval()\'d code'
Line'94'
Function'evaluate_conventional_variable'
ArgsNULL

array ( )

0

'JS_TEMPCODE'

array ( 0 => 'header', )


File'/var/www/html/ocportal/sources/tempcode.php'
Line'1,405'
Function'eval'

File'/var/www/html/ocportal/sources/site.php'
Line'855'
Function'evaluate_echo'
Class'ocp_tempcode'
Objectobject
Type'->'
Args

File'/var/www/html/ocportal/site/index.php'
Line'51'
Function'do_site'
Args

Back to the top
 
Posted
Rating:
#63622
Avatar

Hi,

Not sure how that file went missing, but it's attached.
I also updated the addon file.

Attachment
» Download: JAVASCRIPT_XMPP_DOM-ALL.tpl (325 Kb, 178 downloads so far)


I hope it all goes smoothly for you. Since we switched Linux vendors I had to turn off the on-site chat here because I just couldn't get the ejabberd web integration service to respond (ejabberd is really opaque when it comes to debugging – worked on debian linux, couldn't get it working using the same configuration on redhat linux after trying 4 different versions of it).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#63625
Avatar

Well-settled

Oh nice! Thank you Chris!

I have ejabberd 2.1.5 running fine on CentOS 5.5 and Fedora 13. I have had some web chat working in the past but not on these most recent versions of things so I guess we will see what happens. It takes some getting used to thats for sure. I will let you know how it goes.
Back to the top
 
Posted
Rating:
#63638
Avatar

Well-settled

Well, so far I am having no luck getting it to connect with this ocPortal chat addon. Maybe it's just outdated or something. It seems it talks to the ejabberd and seems like it's connecting but it never actually connects fully and the http_bind session eventually times out in ejabberd. So… not really sure what to do about it.

I found this though and it looks pretty simple and sweet. I was able to connect to my ejabberd server with it using its sample echobot app. Maybe it would be useful to you. http://code.google.com/p/jaxl/
Back to the top
 
Posted
Rating:
#63641
Avatar

That's a shame, it's exactly what we got. I tried so hard to make it work (about 8 hours I think), and as I say, it worked before when we used debian. I opened the server in a debug mode and watched what happened in real-time. I used Firebug to monitor the connections. Like you observed, it communicates initially then just goes silent on both ends. I think ejabberd was having threads crash and not reporting it, which I did notice when debugging the first time around. Even if you do get ejabberd to give some kind of error, it's usually not giving any message at all and just some compressed functional-language back-trace (drives me mad ;)). I suspect it's some kind of compatibility issues with whatever libraries we have installed on the system. I suspect not many people use the http-bind ("bosh") stuff so it hasn't got debugged.

But maybe you'd like to start a topic with ejabberd about it, see if they can give advice.

Regarding the PHP solution – I think these require starting up a PHP process as a server. I looked into it back when I was planning different options, and decided it wasn't ideal because it required some extra exotic configuration and bridging work. I'm interested though.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#63646
Avatar

Well-settled

Ok I may ask the ejabberd folks and see what they say.  But I like the looks of this demo chat I just got running.  I got it to do this in about 5 mins:
PHP Code, Setup and Demo of Jaxl boshchat application | Abhi's Weblog

Not so sure if it has to start up an extra process or not.  I think it can run bots in the background if you want but they don't have to be running for the chat server I linked to just work.  I visit the chat page and it just works so it seems like its just using the available web server processes.  It seems to run very smoothly anyway.

And after spending many hours trying to get the other thing working I honestly don't really care what it does, it works =)  It is simple and works great so far.  Looks like it has a lot of optional features built in as well.
Back to the top
 
Posted
Rating:
#65354
Avatar

Well-settled

Hey,

Something is changed in the 2.1.6 release of ejabberd with ocPortal 5.1 beta. It only happened when I updated ejabberd to 2.1.6 though.

It now says in the log: Accepted legacy authentication for admin@chat.example.com/xmpp4js by ejabberd_auth_external

And the Loading message on the chat lobby goes away but the chat screen never comes up. I don't get any errors anywhere anymore that I can see.

Also, I can actually connect through my XMPP client (Gajim)
Back to the top
 
Posted
Rating:
#65355
Avatar

Well-settled

Actually, I think I maybe got it to work by Editing the room and saving it… not sure if thats what did it or not but somehow its working. If I configured the logs right though but it is definitely working! I tried to make it so guests couldn't view but it seems the Guest is working as well. Woohoo! Alright, ocPortal is #1 in my books. I might have to convert all my sites to it even if some are for other CMS. Thank you!!!
Back to the top
 
Posted
Rating:
#65356
Avatar

Pleased to hear, I think we may have another shot at it too then.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#65360
Avatar

Community saint

Not sure if it's useful or not, but I follow various XMPP blogs and there was a large switch to Prosody a while back. Unlike ejabberd, which is designed to be efficient and distributed, Prosody is tries to be easy to understand and use. From what I've read it's got plugins and protocols galore, so should work as a drop-in alternative XMPP-wise (and if you can run Erlang on your server then you can probably run Lua ;) ). My only concern is that it was last updated 5 months ago
Back to the top
 
Posted
Rating:
#65362
Avatar

Well-settled

Hmm, interesting. I like ejabberd though as it installs just fine and runs great.  I don't know any reason why I would try to run something else. Prosody looks promising but I haven't tried it yet. It looks like Prosody is still being actively developed though. Last commit on their mercurial was 28 mins ago. Maybe they will have a release for you soon.  :)
Back to the top
 
Posted
Rating:
#65365
Avatar

Well-settled

I figured out something that might be of use. The reason I didn't see the room listed at first is because the muc wasn't persistent. Once I logged into it with my chat client it was created but once I logged out of the chat client and then visited the lobby on the website it didn't list it anymore.  That is because it wasn't there anymore. At least one person has to remain in the room or it has to be set to be made persistent in order for the room to show up on the chat lobby page.
Back to the top
 
Posted
Rating:
#65370
Avatar

Ah yes, as an admin you can change that. Your chat client should have an option in it somewhere to set that on a room.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#65374
Avatar

Well-settled

Yes, Gajim is great for managing the XMPP server. It does have all the options, and I set the default room in the ejabberd config to be persistent as well. The only thing I can't really figure out now is how to make everything not visible to guests.  It seems only one guest can be in the chat at a time.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: