First intergration with wp_w3all

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: First intergration with wp_w3all

Re: First intergration with wp_w3all

by axew3 » Sat Jun 24, 2023 9:43 pm

Do you speak about a browser reload when login done into the iframed phpBB?
Do you experience the same here on the online example or not?

Re: First intergration with wp_w3all

by Leenaa » Sat Jun 24, 2023 7:23 pm

coute wrote: Mon Apr 17, 2023 11:33 am I have an other question. Is it normal that the forum iframe is loaded twice when i log in ?
Hi guys
It's the same problemfree fire name

Re: First intergration with wp_w3all

by axew3 » Tue Apr 18, 2023 10:32 pm

Hi! Sorry delay on answer in these days.

About login and refresh: yes if you mean that when on the iframed phpBB into WP, you go to login into phpBB, then you get a WP refresh: it is because at this time the phpBB overall_footer js code you added execute the function into the Parent Wp page and since the user result to be with UID > 0 in phpBB, wordpress js (on page-forum or the code of the iframe integration via shortcode) fire a refresh to set the WP user logged in into WP also.
It could be done in different way, but how to set/refresh (for example) the WP admin bar to display Howdy, axew3 after a login into the iframed phpBB?
Possible yes, but this make the long story very short, with a refresh (or in some theme you'll result logged in phpBB.but not in WP until you do not refresh WP in someway, changing page or refreshing the same you are on.
If you do not want a refresh because the WP page that display the phpBB, do not show any user info in wp so it is not useful that the user see he is already logged also in WP, it is very easy to do looking into related files (page-forum(or whatevernamed).php or the shortcode related code.
If in trouble to know how, just let know.

The whole iframe integration will be reviewed possibly yet on next release.

About online users widget, yes i know the code is not perfect, i did not followed on doing it more precise, but it will be maybe improved asap. If any suggestion about in the while, also let know!

Re: First intergration with wp_w3all

by coute » Mon Apr 17, 2023 11:33 am

I have an other question. Is it normal that the forum iframe is loaded twice when i log in ?

Re: First intergration with wp_w3all

by coute » Mon Apr 17, 2023 8:10 am

The number of online online users is wrong. Maybe I missed a set up in PHPBB. But when i'm logged on the forum, the widget display "0 online user".

Re: First intergration with wp_w3all

by axew3 » Fri Apr 14, 2023 11:28 pm

So i tested the thing, and all is working fine about the phpBB extension, except the warning coming out to you due to some setting about user's registration in phpBB. The warning above reported can maybe be just resolved adding an if isset.
But also i note the fact that if the URL setting that point to WP do NOT contain the final slash, WON'T work, so:
https://localhost/wp/ or https://localhost/wp/a-test-page/ --> OK
https://localhost/wp --> NOT Ok, will not work
this is easily solvable also, adjusting the right required URL, adding a slash when lacking.
It will be so improved asap on next coming ext version.


But the main problem about the user that is NOT added in WP, come after when the wordpress with the integration plugin installed, and based on the cURL/request received, go to execute the function

Code: Select all

function w3all_add_phpbb_user() {
into the /wp-content/plugins/wp-w3all-phpbb-integration/wp_w3all.php file.

Inside this function, the very strange thing, that's to me coming from a bug in wordpress, is that passing the email:

Code: Select all

             $userdata = array(
               'user_login'       =>  $phpbb_user[0]->username,
               'user_pass'        =>  md5($phpbb_user[0]->user_password),
               'user_email'       =>  $phpbb_user[0]->user_email,
               'user_registered'  =>  date_i18n( 'Y-m-d H:i:s', $phpbb_user[0]->user_regdate ),
               'role'             =>  $role
               );
DO NOT WORK, while the follow will WORK, that DO NOT PASS the email:

Code: Select all

             $userdata = array(
               'user_login'       =>  $phpbb_user[0]->username,
               'user_pass'        =>  md5($phpbb_user[0]->user_password),
               //'user_email'       =>  $phpbb_user[0]->user_email,
               'user_registered'  =>  date_i18n( 'Y-m-d H:i:s', $phpbb_user[0]->user_regdate ),
               'role'             =>  $role
               );
It can be also easily resolved, updating into the subsequent query the email for the just created user.
Very strange behavior, it has been quite hard to understand the issue.
The bug in WordPress is about the wp_insert_user function that in my tests fail with error not enough data provided when email value provided.

This is the wp_w3all.php file with the function w3all_add_phpbb_user() {
patched to work fine:
wp_w3all.zip
(17.17 KiB) Downloaded 632 times

I will return over this to check if can be resolved in a different way (but it appear to me to be a WP bug, we'll see) , or the next 2.7.1 will come with this same fix applied.
If you want i will surely take a look to your going on, so may link it to me into a pm

Top