Page 2 of 3
Re: Forum constantly reloads when not logged in.
Posted: Sat May 02, 2020 9:21 am
by axew3
Ehy! Just gave a try, i registered
alias. All seem to work perfect, by the way, i see a js error on console, coming out into your wordpress theme header, a js function that cause this:
Code: Select all
TypeError: document.getElementById(...) is null forum:421:54
resizeIframe https://www.nylaathria.dk/forum/:421
callResize https://www.nylaathria.dk/nyl/viewforum.php?f=13:868
but this is NOT the iframe resizer of the plugin, it is from your wp theme, you should resolve this that output into wordpress page-forum causing the js error where
dynheight return a null value on page-forum (it output into wordpress header)
Code: Select all
<script type="text/javascript">
// reSize Iframe when ever child calls it
function resizeIframe(dynheight)
{
document.getElementById("iforum").height=parseInt(dynheight)+10;
}
</script>
this can be resolved in various ways, first of all may detecting why this function called in this case (on page -forum) return a null value for the passed
dynheight var
Re: Forum constantly reloads when not logged in.
Posted: Thu May 14, 2020 6:46 am
by Nighty
I've updated the theme we're using (Hestia), which was a couple of versions behind - mainly due to my changes - However, the "Gutenberg" thing was kind of broke, so had to :p
Forum looks, in my opinion, better now, as in: it looks more like it belongs to the page -- Just some sizing issues, it's cutting off the bottom of the forum. I'll look into that later, it's about time I get some sleep
I'll look into the js error when I get back up.
Thanks for the help!
Re: Forum constantly reloads when not logged in.
Posted: Thu May 14, 2020 9:34 am
by axew3
Nighty wrote: ↑Thu May 14, 2020 6:46 am
-- Just some sizing issues
So you may will take a look into this to resolve definitively any resizer issue
viewtopic.php?p=4505#p4505
Re: Forum constantly reloads when not logged in.
Posted: Thu May 14, 2020 5:12 pm
by Nighty
Hm.
A guildie pointed out to me that the site (forum) seems to be back on a reload loop after the design changes, so kind of back to square one.
Got an idea about what's going on there?
As the site is now, when not logged in.
Re: Forum constantly reloads when not logged in.
Posted: Fri May 15, 2020 2:42 pm
by axew3
mhh ... i see a strange thing into your page forum, that let me think php versions can may interfere, so a fix should be applied maybe-
Your wp, i see that even if my user is not logged in, the function wp_get_current_user(); return 1.
This cause the loop, because the user is not really logged instead into phpBB, nor in wp. Then the iframe loop.
let me check the solution
Re: Forum constantly reloads when not logged in.
Posted: Fri May 15, 2020 2:49 pm
by axew3
open page-forum.php and where this line:
Code: Select all
var wp_u_logged = ".$current_user->ID.";
change with this:
Code: Select all
var wp_u_logged = ".get_current_user_id().";
it is better to change this line by default because it return a strange result i see (and fortunately it is was not affecting any security issue. Imagine a result that should be 0 that return 1 instead) WoW
Please let know asap