Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
Re:(SOLVED!)Loads forum page then reloads once aga (1 viewing) (1) Guest
Go to bottom Favoured: 7
TOPIC: Re:(SOLVED!)Loads forum page then reloads once aga
#27180
Re:Loads forum page then reloads once again? 11 Months ago  
bpresent,

What does that code do? Does that fix the double-refresh problem? Or, does it fix something else, such as the Page Not Found on first click?
curt (User)
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#27182
Re:Loads forum page then reloads once again? 11 Months ago  
It fixes the "Loads forum page then reloads once again" issue.

I simply compared the new version provided by danialt (www.bestofjoomla.com/component/option,co...limitstart,30/#23582) against my installed version and pasted the result.

So far it seems to work for me.... (no double loading and no errors yet). I have switched J! SEO back on (sh404SEF) but I have not exhaustively tested yet. I will post a reply if I experience errors.
bpresent (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Location: AU
Logged Logged
 
Last Edit: 2007/10/11 01:25 By bpresent.
 
 
The administrator has disabled public write access.  
#27184
Re:Loads forum page then reloads once again? 11 Months ago  
After doing what Prutkar suggested, I don't have this double-load problem anymore. However, I have this page-not-found error. Here's my post about it: www.bestofjoomla.com/component/option,co...8/catid,66/id,25565/

Do you know what the fix is?
curt (User)
Fresh Boarder
Posts: 13
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#27281
Re:Loads forum page then reloads once again? 11 Months ago  
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:

// 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);';*/
            }
        }


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.
bpresent (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Location: AU
Logged Logged
 
Last Edit: 2007/10/11 16:00 By bpresent. Reason: Tidy up and PS
 
 
The administrator has disabled public write access.  
#27841
Re:Loads forum page then reloads once again? 10 Months, 3 Weeks ago  
bpresent, which file does this need to be changed in??

cheers

leigh
bunglehaze (User)
FB Documentation Team
Moderator
Posts: 115
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#27843
Re:Loads forum page then reloads once again? 10 Months, 3 Weeks ago  
fireboard.php (both the fix and time fudge)... but I would not change the code or doc - as I said. I think the "error" lies in the fact that something (perhaps core J!) is changing the $_SERVER['REQUEST_URI'] (but then I'm just a part time hack with a background in COBOL programming so don't rely on my wisdom!!!) Sam
bpresent (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Location: AU
Logged Logged
 
Last Edit: 2007/10/16 05:13 By bpresent.
 
 
The administrator has disabled public write access.  
#28485
Re:Loads forum page then reloads once again? 10 Months, 2 Weeks ago  
Sam, any chance you can show the lines of code that should be replaced with the new code you provided please? I think I have the right section but for others who might be bewildered editing core files it will be of use.

This is the section I think you mean (can you confirm please)

// do not reload the page if user is posting :: TODO: check if it cab be replaced by mosRedirect
if ($func != "post" {

mosRedirect($self_url);
die();
/* echo 'setTimeout("window.location.reload( true )",100);';*/
}
}


regards

leigh
bunglehaze (User)
FB Documentation Team
Moderator
Posts: 115
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/10/21 15:44 By bunglehaze.
 
The administrator has disabled public write access.  
#28788
Re:Loads forum page then reloads once again? 10 Months, 2 Weeks ago  
Hi Leigh - sorry for the delay. You have correct location but the code you are showing is the patched code. I would prefer to say that the only change required to the unaltered 1.0.3 code is to comment out the echo (as you have) but simply add two lines above it:
Code:

mosRedirect($_SERVER['REQUEST_URI']);
die();



In other words redirect to $_SERVER['REQUEST_URI'] (not $self_url). In fact $self_url never needs to be created in the first place.
bpresent (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Location: AU
Logged Logged
 
 
The administrator has disabled public write access.  
#28807
Re:Loads forum page then reloads once again? 10 Months, 2 Weeks ago  
I have tried every version of this fix as it has evolved.

None of them work for me.

They all result in an intermittent bug where the forum page cannot be found,
so the user sees an IE 'page not found' error page.

I would LOVE to see an official fix for the double refresh issue.

Rather than any further features or tweaks or extensions I would LOVE it if the developers released a new version with these 4 fixes:
- solve refresh problem
- provide proper CB integration
- eliminate double postings
- official fix for NEW! indicator

Any chance?
ianrispin (User)
Fresh Boarder
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#28808
Re:Loads forum page then reloads once again? 10 Months, 2 Weeks ago  
I have tried every version of this fix as it has evolved.

None of them work for me.

They all result in an intermittent bug where the forum page cannot be found,
so the user sees an IE 'page not found' error page.

I would LOVE to see an official fix for the double refresh issue.

Rather than any further features or tweaks or extensions I would LOVE it if the developers released a new version with these 4 fixes:
- solve refresh problem
- provide proper CB integration
- eliminate double postings
- official fix for NEW! indicator

Any chance?
ianrispin (User)
Fresh Boarder
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
Go to top
Powered by FireBoard - Creditsget the latest posts directly to your desktop