PDA

View Full Version : Multi-language feature breaking my request


TheMarco
07-28-2008, 06:58 PM
This one is probably for the pixelpost developers.

I got a bug report from lfp that on his site the comments don't work when the language is English. He's using the multi-language feature of Pixelpost.

I found that when the language chosen on his site is portugese, the following XHR request works:

http://www.fotosgrafias.com/index.php?x=ajax_save_comment

When it's English, the EXACT SAME request gives a 404.

I'm completely baffled. Can someone explain to me what's going on?

Dennis
07-29-2008, 04:54 AM
Perhaps a stupid question: are both inputs the same?

TheMarco
07-29-2008, 07:49 PM
I'm not sure what you mean. If you look at http://www.fotosgrafias.com/ and try to post a comment using Firebug, you'll see the exact same request being fired, resulting in a 404 on the English and a working response on the Portugese.

I just don't seem to understand how this multi language thing works internally. Apparently it does change something that makes this break.

Dennis
07-29-2008, 08:06 PM
As author of all the language stuff in Pixelpost I can say this is not true. What I meant is if the input is the same. (So the same comment for both languages)

Make sure the mailaddress is a valid address format or leave it empty. Secondly make sure the SPAM flood settings are either respected or changed. If you post a comment within a certain amount of time after the page is loading or after the last comment it will get blocked because of a possible SPAM flood.

It fires a 404, but if it blocks a request it will show the reason why. (It will throw out spam err. nrs). You're template will probably not show them because of the way it sends the comment. This will make debugging hard.

TheMarco
07-30-2008, 07:14 AM
@Dennis, I know what you mean with the errors. I actually catch those in my JS.

In this case, the request gives:

<H1>Not Found</H1>

The requested URL /index.php was not found on this server.<P>

<P>Additionally, a 404 Not Found

error was encountered while trying to use an ErrorDocument to handle the request.

No error code is given.


Try going to the site and call:

http://www.fotosgrafias.com/index.php?x=ajax_save_comment

You get:

The comment could not be accepted because it got flagged as SPAM by our anti-SPAM measures. (ERR: 03).

Then, switch to English and paste this URL into the address bar again. You'll get the above error.

TheMarco
07-31-2008, 07:38 PM
*bump*

any ideas?

Dennis
07-31-2008, 07:43 PM
Sorry, I have been looking through the code, it must be a funny server setting.

I can't reproduce it (not even on my own site that uses Dutch and English).

TheMarco
08-01-2008, 07:02 AM
Ok thanks for checking into it Dennis!

I suspected this as well as it doesn't make any sense that a request to the same resource works or fails depending on something that doesn't seem to have anything to do with it!