PDA

View Full Version : AJAX being difficult and rude.


Meeper
07-13-2011, 04:20 PM
Hello,

So as the title says, ajax.php is giving weird results, primarily for quick edit and quick reply. More accurately, when I tcpdump'd the output, it was sending a tab (0x09) character immediately before the <?xml tag in the response xml. I dug into class_xml.php and ajax.php, disabled any plugins that used xml_* hooks and ajax_* hooks, and no luck. Any idea where else I should look?

kh99
07-13-2011, 05:21 PM
You might try disabling all plugins, there maybe be some in global.php and other files included by that.

Then I don't know but if I were trying to figure it out I'd probably put some code in ajax.php (or create a plugin on one of those hooks) to see if it's actually being output by the call to print_xml() (like maybe write the output to a file) although looking over the code briefly, I don't see how that would be happening (you probablly came to the same conclusion).

Meeper
07-13-2011, 05:58 PM
Update:

The tab character seems to be output by the web server, not anything in vBulletin.

I created a plain html file with "<- see, tab!", and sure enough, the tab was there.

Update 2:

As kh99 implied, one of the includes started with:
<?php

*wanders off, muttering imprecations about amateur plugin developers*

AusPhotography
07-14-2011, 07:12 AM
*wanders off, muttering imprecations about amateur plugin developers*

:D Most are amateur :p

My day job is IT Manager and I've been cutting code since the '70s.
But in this context I'm amateur is as much as I do vB related work simply to enhance our site.

Kym