Problem with AJAX requests

Started by feline, April 06, 2010, 06:19:56 AM

Previous topic - Next topic

feline

On change the ticked details (Privacy, Urgency) I have always the error:
Your session timed out while posting.  Please go back and try again.
I have debug that, and see that the $_POST array is empty ... see attached image.

Fel

PortaMx has released version 1.4 for SMF 2.0 with revolutionary features, which no other portal has. This is only possible with the PortaMx 'OOP' programming technique and the built in 'SEF' engine.

Gruffen

Yay for SimpleSEF not including the post data when handling the redirect.

Guess we'll have to rewrite it to not use $_POST.

feline

ahh .. SSEF .. Ok, that is a simple hack  8)

in SimpleSEF.php find:

define('WIRELESS', false);
header('HTTP/1.1 301 Moved Permanently');

// This seems crazy, redirecting to the same url, but it really isn't
redirectexit($_SERVER['REQUEST_URL']);


add before:

if(!empty($modSettings['helpdesk_active']) && strpos($_SERVER['REQUEST_URL'], 'action=helpdesk') !== false && strpos($_SERVER['REQUEST_URL'], 'sa=ajax') !== false)
return;


Now it works  :)

Fel

PortaMx has released version 1.4 for SMF 2.0 with revolutionary features, which no other portal has. This is only possible with the PortaMx 'OOP' programming technique and the built in 'SEF' engine.

Gruffen

Thanks, Feline :)

Though perhaps a solution that moves the session var/id to the GET instead of trying to alter another part of SSEF (groan) would be better.

feline

True .. SSEF need a little bit (more) redesign .. but .. Slammedime is not so fast  :(

Fel

PortaMx has released version 1.4 for SMF 2.0 with revolutionary features, which no other portal has. This is only possible with the PortaMx 'OOP' programming technique and the built in 'SEF' engine.

Gruffen

#5
I think I can implement this one into SimpleDesk without too much work. Fortunately that's one of the only places I think a URL will get rewritten by the mod as a redirect.

Edit: Tracked as http://www.simpledesk.net/community/issue,330.0/

feline

Thanks .. I think the session check it's secure enough to use GET for this ...

Fel

PortaMx has released version 1.4 for SMF 2.0 with revolutionary features, which no other portal has. This is only possible with the PortaMx 'OOP' programming technique and the built in 'SEF' engine.

feline

by the way .. a other good option is to make the assign/reassign also by ajax request. Possible ?

Fel

PortaMx has released version 1.4 for SMF 2.0 with revolutionary features, which no other portal has. This is only possible with the PortaMx 'OOP' programming technique and the built in 'SEF' engine.

cσσкιє мσηѕтєя

Quote from: feline on April 06, 2010, 08:28:31 AM
by the way .. a other good option is to make the assign/reassign also by ajax request. Possible ?

That feature has been discussed but it never made it into SD 1.0.

Gruffen

It's something I think we can take a look at for 1.1; since we're doing custom ticket fields, changing of which could well be AJAXified, I think we can take a look at the whole AJAX updating thing and maybe enhance it. Not promising it'll happen but it occurs to me how we could go about it.