Fancy URL Query String not updating document.location during normal navigation

Locked
Pauven
Posts: 1
Joined: Thu Mar 12, 2020 7:12 pm

Fancy URL Query String not updating document.location during normal navigation

Post by Pauven »

I had phpbb wordpress iframe integration working correctly a few weeks ago, but somehow I broke it and need some guidance.

The problem I'm having is that the URL doesn't update as you browse around the forum. For example, if you hit the main forum page, https://chamconsoft.com/cmc/forums/ , and then browse to Announcements, the URL stays https://chamconsoft.com/cmc/forums/.

If instead, you right-click Announcements and Open in New Window, the URL is correct, https://chamconsoft.com/cmc/forums/?w3= ... BocD9mPTU=

As long as you just click around to different forum pages and posts, the URL never changes, which is wrong. But right-clicking and opening in a new window will always have the correct fancy URL query string for that page/post.

I first noticed this issue a week or two ago on 2.1.9. I had noticed the commented out w3all0Normalize_phpBBUrl function and re-enabled it, and everything was working perfectly, just like your forum here. It was a few days later I discovered the fancy URL's were no longer updating. Today I upgraded to the latest, 2.3.1, and reapplied the Header/Footer code, copied the new resizer to the root, and rebuilt the forum template, but the problem remains.

Wordpress lives in https://chamconsoft.com/cmc/wordpress, and I'm using .htaccess rewrite rules to have it show @ https://chamconsoft.com/cmc

The forum lives in https://chamconsoft.com/cmc/phpbb, and I've used w3all to embed it at https://chamconsoft.com/cmc/forums

My guess is that I broke something in the .htaccess, which is what I was tweaking around that time to migrate all my old web pages to wordpress and the new forum location. But today I turned off the rewrites related to the forum, in addition to the 2.3.1 upgrade I mentioned above, hoping that would help. Though it seems weird that it works perfectly with Open in New Window, which makes me doubt that .htaccess is affecting it.

I've tried with Firefox, Edge and Chrome and see the exact same behavior. My WordPress and plugins are fully up to date, and so is PHPBB.

Thanks for any help you can provide,
Paul

User avatar
axew3
w3all User
w3all User
Posts: 1876
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Fancy URL Query String not updating document.location during normal navigation

Post by axew3 »

Hello Paul! Did you activated the lightbox code into javascript of the overall_footer.html?

Code: Select all

/*
if(w3all_onview_attach !== false){
e.preventDefault();
window.open(href,'_blank');
return;
} */
because console return this:
ReferenceError: w3all_onview_attach is not defined

in fact the var lack, and the code, after, fail
the iframe v5 code has been updated about this, to fix the lightbox js code and to update just do this:

where these two lines (overall_footer.html js code you added)

Code: Select all

$(document).on("click", "a", function(e) {
  var href = $(this).attr("href"); 
immediately after, add this line:

Code: Select all

var w3all_onview_attach = (href.indexOf('file.php') > -1);
should fix this bug due to lacking code, missed somewhere ...

V5 iframe code/procedure

User avatar
axew3
w3all User
w3all User
Posts: 1876
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Fancy URL Query String not updating document.location during normal navigation

Post by axew3 »

P.s: but ... the answer to your question is this:
i note that you not changed the value of

Code: Select all

var w3all_custom_wp_w3fancyurl='w3';
into overall_header.html code, to match the name you have setup into fancy url plugin option, as explained on iframe V5 procedure (and into related plugin admin option hint)
be sure to do the same into overall_footer.html code
where:

Code: Select all

var w3all_custom_wp_w3fancyurl = 'w3'; // MANDATORY! If you changed w3 to have 'fancy URL' query string into WP plugin admin, then change this value to match what your choosed fancy URL setting is
change w3 to match your fancy query string
then you should be up and running.

Locked