Patches V3 code: page-forum.php, overall_footer.html and overall_header.html JS code

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: Patches V3 code: page-forum.php, overall_footer.html and overall_header.html JS code

Re: Patches V3 code: page-forum.php, overall_footer.html and overall_header.html JS code

by axew3 » Tue Jan 08, 2019 5:08 pm

the page-forum.php forum (1.9.4) for v3 code has been patched (over last patch):
I’m go to apply something into a site and i see that there is still a little problem on code:
on this actual fix, after applied overall_header.html code, when you right/click/open new tab/window (and only on right click) to open a link like FAQ link, the code will fail because:
the code will append index.php and the url will become something like this:
https://192.168.1.5/forum/app.php/help/faq/index.php
and with index.php appended in this kind of url phpBB will answer page not found.
To avoid this (maybe this code can be better but actually work without big changes) the code should be changed into this:

Code: Select all

if( strlen($w3all_url_to_cms) == strlen(get_option( 'w3all_url_to_cms' )) OR strlen($w3all_url_to_cms) == strlen(get_option( 'w3all_url_to_cms' )) + 1 )
{
// Fix by @tlagren
// bug -> https://wordpress.org/support/topic/problem-using-iframe-feature-with-https/
$w3all_url_to_cms .= (substr($w3all_url_to_cms, -1) == '/' ? '' : '/index.php');
}
now should be any kind of passed url compatible and when FAQ like (app) links passed, or SEO url passed, the result will be fine. The fix has been committed on repo for the file page-forum.php

Re: Patches V3 code: page-forum.php, overall_footer.html and overall_header.html JS code

by axew3 » Sat Jan 05, 2019 7:34 pm

Ok xray after have been noticed about what was going on wrongly and better to report this to be clear on procedure ... he had in
phpBB ACP
under option Security settings
option: Allow "Remember Me" logins:
it was set to NO.
But this option need to be set as YES or when user login no cookie will be released, nor recognized if presented, so logout will fire on both cms: phpBB because not will recognize the eventually released on wp login by the plugin, and WordPress because no valid phpBB found.
It has been added on installation procedure.

except this,
the overall_header.html and overall_footer.html v3 JS code has been patched because it was hard for all to access ACP when iframe activated, and for several other reasons:
now the code has been changed to:
when phpBB admin ACP link clicked, new page will be opened if clicked within iframe.
when acp page, login or ACP admin, accessed via direct url, equally, it will be opened as called, external, no redirect to iframe will fire.
That will make the situation more clear and useful for all.

Re: Patches V3 code: page-forum.php, overall_footer.html and overall_header.html JS code

by axew3 » Sat Jan 05, 2019 8:53 am

No PM! Problems with iframe and PM? let check ...
just sent one to you and no, no problems, but no PM by you

Re: Patches V3 code: page-forum.php, overall_footer.html and overall_header.html JS code

by xray » Sat Jan 05, 2019 6:19 am

It s a localhost install or we can see online?
You take a PM?

Re: Patches V3 code: page-forum.php, overall_footer.html and overall_header.html JS code

by xray » Fri Jan 04, 2019 10:19 pm

Right, the login/logout was still causing intermittent problems. Now I cannot get logged into the forums to even purge the cache. I can login to WP no problems its only when I click on the forum link and try to login there that I have the issue. If I am already logged in with WP and click the forum link (iframe mode) it will automatically logged me out of both.

I am stumped as I put the code back how it was before I added the patch code you suggested and the resulted behavior is redirect/logout

Re: Patches V3 code: page-forum.php, overall_footer.html and overall_header.html JS code

by axew3 » Fri Jan 04, 2019 9:46 pm

but maybe it is related to the fact that you did not resolved the previous problem login/out?
Because activating the line, when the user not result logged in in phpBB, and in wordpress result logged in, then the page will reload and logout also from wordpress.
I assume that it is not working by the way the iframe integration, because still there are login problems with cookies?

Top