2.8.3 logs

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

2.8.3 logs

Post by axew3 »

Fix the fact, that when the login is done on frontend pages, sometime and some plugin, the user seem to be not logged in even if the session has been released.

To patch this issue, on plugins like Ultimate Members (that answer/display that the password is wrong and login failed, even if the authentication was good: in fact loading a subsequent page, the user would result correctly logged) the simple following code has been added into the file
class.wp.w3all-phpbb.php
on
private static function phpBB_user_session_set($wp_user_data){

Code: Select all

   if ( !defined( 'WP_ADMIN' ) ){
    header("Refresh:0"); exit;
   }
just after the last function line of code

Code: Select all

   define("W3ALL_SESSION_ARELEASED", true);
[EDITED]
User avatar
axew3
w3all User
w3all User
Posts: 2713
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.8.3 logs

Post by axew3 »

Move the add_filter( 'get_avatar' to be executed later,
from

Code: Select all

add_filter( 'get_avatar', array( 'WP_w3all_phpbb', 'wp_w3all_phpbb_custom_avatar' ), 10 , 5  );
to

Code: Select all

add_filter( 'get_avatar', array( 'WP_w3all_phpbb', 'wp_w3all_phpbb_custom_avatar' ), 110000 , 5  );
Maybe there are more plugins using an higher value to be sure that their get_avatar execution is the very last.
Just in case that the get_avatar of this integration plugin still result to be overwritten by some other plugin (like UM) and it is still not working, this value should be so increased.
viewtopic.php?t=1864
User avatar
DavFar
User w
User w
Posts: 11
Joined: Thu Mar 21, 2024 8:03 am
Contact:

Re: 2.8.3 logs

Post by DavFar »

Is it available for upgrade or not yet?
User avatar
axew3
w3all User
w3all User
Posts: 2713
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.8.3 logs

Post by axew3 »

Hello, little delay on all due to Pasqua time!

No because it will be in 2.8.3 but if you wish to update the code yourself, about avatar you can easily patch opening
/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php
file and search for this:

Code: Select all

add_filter( 'get_avatar'
there are two resulting lines,

Code: Select all

   add_filter( 'get_avatar', array( 'WP_w3all_phpbb', 'wp_w3all_phpbb_custom_avatar' ), 10 , 5  );
edit both to be

Code: Select all

   add_filter( 'get_avatar', array( 'WP_w3all_phpbb', 'wp_w3all_phpbb_custom_avatar' ), 110000 , 5  );
About login fix it has been explained above: viewtopic.php?p=6252#p6252

2.8.3 is coming very soon, and also the Short Template integration steps guide as promised!
User avatar
axew3
w3all User
w3all User
Posts: 2713
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.8.3 logs

Post by axew3 »

2.8.3 will add the new
wp_w3all_heartbeat_phpbb_lastopics shortcode
that allow to get last posts/topics from phpBB and update the content, without to have to reload the WP page.
If there are new phpBB posts (and only when/if there are news, the code will be processed) the widget/shortcode post's list will be updated without any user action.

To be very efficient as it is and to not waste server resources (it's also Dos attack safe) it as been coded to get the same content for all users as Guest.
So that into the wp_w3all_heartbeat_phpbb_lastopics widget/shortcode, you cannot expect to see a post that require a privileged Group permission and that's not accessible by a Guest, even if you are a logged user that belong to that privileged phpBB Group.


Posts and topics are retrieved for each user, with proper permissions.

This shortcode to properly work, will require to have installed into phpBB, the new updated phpBB WordPress extension, that will be soon released patched (and also fixed about a bug), just before the 2.8.3 release.

Think would be good to get also phpBB user's notifications, that contrary to the last posts Groups permissions based on user's permissions, can instead be done quite efficiently (if i am not wrong i will check).

User's notifications: It can be easily done, but still will not be added on 2.8.3
User avatar
axew3
w3all User
w3all User
Posts: 2713
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: 2.8.3 logs

Post by axew3 »

Fix shortcode (and page-forum) to always return index.php as Url when the page is the phpBB home index. Example:

Code: Select all

https://www.mysite.com/forums/index.php
and not

Code: Select all

https://www.mysite.com/forums/
or

Code: Select all

https://www.mysite.com/forums
It seem that on many servers the lack of index.php make it fail the iframed phpBB home and the page fall into a loop on some server (the last i've seen was today)
Post Reply