so for what it worth my consideration on this, i just take a look into more deeply.
the resume is this to me (that may you expressed before and may i did not understood) of all the problems.
When you land, the first page is correctly pushed ONCE into history with the fix i applied.
but as soon you click into any forum link, and the
history.pushState fire, it cause that the history push happen TWO TIMES, you can see it into the Back Button of the browser: there are two identical pushes, two on history: so, if you do not care to push on the address bar the url when you click into back button, the solution is this:
on the top javascript, so inside the function that output the javascript on page-forum, just add this:
Code: Select all
window.onpopstate = function(event) {
window.history.go(-1);
};
with this, the back button action will cause the correct return to the right page, even if the address bar will not update to where you return back, then if you reload the page, you'll may be redirected to the url that is on the address bar.
This appear to me at moment the more clean solution, but it is not perfect.
But the fundamental question is and still remain by the way:
why this happen? how it has been possible to be resolved wrapping the code like this, the solution of when you land to the first page on forum:
Code: Select all
jQuery( window ).load(function() { // wrapped here, or won't push correctly, duplicate happen
var w3all_landed_url = '".$w3all_url_to_cms."';
var w3all_landed_url_clean = w3allNormalize_phpBBUrl_onParent(w3all_landed_url);
// PUSH phpBB URLs when wp page load first time //
var w3all_passedurl = window.btoa(unescape(encodeURIComponent(w3all_landed_url_clean)));
var w3all_passedurl_push = '".$w3allhomeurl."/".$wp_w3all_forum_folder_wp."/?".$w3all_iframe_custom_w3fancyurl."=' + w3all_passedurl;
history.pushState({w3all_passedurl: w3all_passedurl_push}, \"\", w3all_passedurl_push);
})
the unique thing i note, is that the code that works fine for the first loaded page,
is that this code is NOT inside the callback of the iframe resizer code.
is the iframe resizer code interacting some way with this?
inside it, happen two times
... we'll see