• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Error: the XML response from the server cannot be processed

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
12 posts • Page 1 of 1

Postby Eminos » Fri Mar 24, 2006 3:32 am

Hi there.

I've just discovered this great thing, and I want to implement it on my homepage.

I have some problems though:

1. I get this error msg:
"Error: the XML response from the server cannot be processed"

2. There are some errors in the styling. Some things in the chat seems to be centered and moved.

---

Please take a look at this link to see what I'm talking about:
http://www.bihinternet.com/index2.php

---

There are some threads on this forum that discusses my first problem, but there is no solution (?)

/Eminos
Eminos
Member
 
Posts: 61
Joined: Fri Mar 24, 2006 3:23 am
Top

Postby Eminos » Fri Mar 24, 2006 5:30 am

I've managed to get rid of my #1 problem. Don't know how, I just started over and copied all my code form the beggining.

However I have got some other problems.

The chat doesn't seem to automaticly connect (or connects very slowly), it freezes or something ? Works fine in the demos on my server, but as soon as I combine the chat code with my original code, there is some interference.

There seems to be some "<center>" problems and perhaps some CSS problems, I can't find any problems in my original code.

The center problem is resolved by deleting this line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

...but then of course I get problems in the chat styling.

Please take a look at the link that I posted above.

/Eminos
Eminos
Member
 
Posts: 61
Joined: Fri Mar 24, 2006 3:23 am
Top

Postby phpfreechat » Fri Mar 24, 2006 9:39 am

Eminos wrote:The chat doesn't seem to automaticly connect (or connects very slowly), it freezes or something ? Works fine in the demos on my server, but as soon as I combine the chat code with my original code, there is some interference.

If you integrate the chat into a page which does a lot of calculation before processing the chat, you must separate the AJAX calls in a script.
See the demo3 : http://www.phpfreechat.net/demo/pfc/dem ... client.php

Eminos wrote:There seems to be some "<center>" problems and perhaps some CSS problems, I can't find any problems in my original code.

phpFreeChat try to be XHTML complient and the problem is that<center> tag is not allowed in XHTML.
You must uses CSS rules to center what you want :
Code: Select all
text-align: center;

or
Code: Select all
margin: auto;

(it depends on what you want to center : inline or block)


Hope that help.

regards,
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Eminos » Fri Mar 24, 2006 2:40 pm

Ok, thanks man. I guess I will have to update my homepage to xhtml. That's more modern.

I have one other "problem" too.
When loading the page, it jumpes down to the chat. I want the page to start on the top of the page, not to jump down to the chat. [see link in first post]

An other problem is when hiding and showing the userbox and smileys, they disappear ! .. even the chatbox sometimes disappear after hiding/showing smileys and userbox.

/Eminos
Last edited by Eminos on Fri Mar 24, 2006 2:51 pm, edited 1 time in total.
Eminos
Member
 
Posts: 61
Joined: Fri Mar 24, 2006 3:23 am
Top

Postby phpfreechat » Fri Mar 24, 2006 3:44 pm

Eminos wrote:When loading the page, it jumpes down to the chat. I want the page to start on the top of the page, not to jump down to the chat. [see link in first post]

This is due to the initial focus givent to the chat' input text box. This is a real problem I didn't think about before your notice... I should add a parameter to desactivate the initial focus, I will do that for the next release.
As a workeround, maybe you can start the chat disconnected using this parameters : $params["connect_at_startup"] = false; (see the demo2 for an example), but I'm not sure it doesn't give focus as it should.

Eminos wrote:An other problem is when hiding and showing the userbox and smileys, they disappear ! .. even the chatbox sometimes disappear after hiding/showing smileys and userbox.

This bug is fixed in last 0.9 release.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Eminos » Fri Mar 24, 2006 3:56 pm

"This bug is fixed in last 0.9 release."

Just installed that version, but the bug is still there. I have emptyed the Temporary Internet Files.

/E
Eminos
Member
 
Posts: 61
Joined: Fri Mar 24, 2006 3:23 am
Top

Postby phpfreechat » Fri Mar 24, 2006 4:51 pm

Right! this is strange ...
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Eminos » Fri Mar 24, 2006 9:42 pm

Yes, very strange. This bug is very anoying.
When you fix this, and that initial focus "bug", then I can start using this officially on my homepage.

When is the next version due ?

BTW: Many thanks for great chat funciton ! I searched all over hotscripts.com, and this is exactly what I want ..

/E
Eminos
Member
 
Posts: 61
Joined: Fri Mar 24, 2006 3:23 am
Top

Postby phpfreechat » Fri Mar 24, 2006 10:04 pm

About the focus problem.
Could you try to comment these two lines in pfccommand_nick.class.php :
line 50 : $xml_reponse->addScript("$('".$c->prefix."words').focus();");
line 74 : $xml_reponse->addScript("$('".$c->prefix."words').focus();");

Keep me informed if that fix the focus problem.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Eminos » Fri Mar 24, 2006 10:07 pm

Yes it works, thank you very much.

/E
Eminos
Member
 
Posts: 61
Joined: Fri Mar 24, 2006 3:23 am
Top

Postby phpfreechat » Fri Mar 24, 2006 10:33 pm

Great!
I just commited a new parameter: focus_on_connect

use this patch to apply this feature:
Code: Select all
Modified: trunk/src/pfccommand_connect.class.php
==============================================================================
--- trunk/src/pfccommand_connect.class.php (original)
+++ trunk/src/pfccommand_connect.class.php Fri Mar 24 22:29:31 2006
@@ -50,6 +50,10 @@
    $xml_reponse->addScript("pfc.updateChat(true);");
    $xml_reponse->addScript("pfc.isconnected = true; pfc.refresh_loginlogout();");

+    // give focus the the input text box if wanted
+    if($c->focus_on_connect)
+      $xml_reponse->addScript("$('".$c->prefix."words').focus();");
+
    return $clientid;
  }
 }

Modified: trunk/src/pfccommand_nick.class.php
==============================================================================
--- trunk/src/pfccommand_nick.class.php (original)
+++ trunk/src/pfccommand_nick.class.php Fri Mar 24 22:29:31 2006
@@ -47,7 +47,6 @@
      $c->nick = $newnick;
      $c->saveInSession();
      $xml_reponse->addAssign($c->prefix."handle", "value", $newnick);
-      $xml_reponse->addScript("$('".$c->prefix."words').focus();");
      if ($oldnick != $newnick && $oldnick != "")
      {
       $cmd =& pfcCommand::Factory("notice", $c);
@@ -71,7 +70,6 @@
    {
      // user didn't change his nickname
      $xml_reponse->addAssign($c->prefix."handle", "value", $newnick);
-      $xml_reponse->addScript("$('".$c->prefix."words').focus();");
      if ($c->debug) pxlog("Cmd_nick[".$c->sessionid."]: user just reloded the page so let him keep his nickname without any warnings -> nickid=".$newnickid." nick=".$newnick, "chat", $c->getId());
    }
    else

Modified: trunk/src/phpfreechatconfig.class.php
==============================================================================
--- trunk/src/phpfreechatconfig.class.php (original)
+++ trunk/src/phpfreechatconfig.class.php Fri Mar 24 22:29:31 2006
@@ -40,6 +40,7 @@
  var $refresh_delay       = 5000; // in mili-seconds (5 seconds)
  var $timeout             = 20000; // in mili-seconds (20 seconds)
  var $max_msg             = 20;
+  var $focus_on_connect    = true;
  var $connect_at_startup  = true;
  var $start_minimized     = false;
  var $height              = "440px";

I think I will release a 0.9.1 soon to fix these little bugs
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Eminos » Sat Mar 25, 2006 9:17 am

This user box disappearing problem not only occurs when switching the boxes on and off, but also when one disconnects and I just notices also that it disappears when there are many users in the chat.

/Eminos
Eminos
Member
 
Posts: 61
Joined: Fri Mar 24, 2006 3:23 am
Top


Post a reply
12 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 23 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub