I am now getting the same problem.
For some reason the $_SERVER['REQUEST_URI'] variable contains the
hostname. Not sure what's causing that but the hack (as I see it at the moment - and for these combination of J! and FB ) is to simply redirect to $_SERVER['REQUEST_URI'] rather than build the redirect in the way you would expect and as suggested in the original fix.
In other words the solution to the initial problem for me (using J! 1.0.13 and FB 1.0.3) is to simply replace the javascript with a redirect to $_SERVER['REQUEST_URI'].
No need to create $self_url - just simply comment out the js and add in the redirect.
[code:1]// do not reload the page if user is posting :: TODO: check if it cab be replaced by mosRedirect
if ($func != "post"«») {
mosRedirect($_SERVER['REQUEST_URI']);
die();
/* echo 'setTimeout("window.location.reload( true )",100);';*/
}
}[/code:1]
Warnings:
1) I do not know if this will work with an https
2) It may not work with another version of J! (newer or older).
Something somewhere is rewriting $_SERVER['REQUEST_URI'] to append the hostname etc and this may be 'corrected' at a later date.
PS. If you want to test this more easily change the timeout test a few lines above this code. Change the line $inactivePeriod = ($fbSession->lasttime)+1800; to (say) $inactivePeriod = ($fbSession->lasttime)+60; and the reload is triggered after 1 minute.