Coming 2.6.9 phpBB WordPress logs/bugs/requests

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

Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

The file
/wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_unotifications_short.php
https://plugins.trac.wordpress.org/expo ... _short.php
at date of this post, has been updated to fix all remaining bugs and to add latest lacking
type.forum
type.disapprove_topic
type.disapprove_post

cases, that were the last remaining to be added.
You can download the file by clicking the link above and replace it into the /wp-content/plugins/wp-w3all-phpbb-integration/views/ folder if you do not want to wait until 2.6.9 release.

All default phpBB notifications types that can be expected to be retrieved:
type.post_in_queue
type.approve_post
type.pm
type.topic
type.group_request
type.approve_topic
type.quote
type.bookmark
type.post
type.admin_activate_user
type.group_request_approved
type.report_pm
type.report_post_closed
type.disapprove_post
type.disapprove_topic
type.forum


See phpBB user's notifications shortcode page
https://www.axew3.com/w3/2022/10/phpbb- ... wordpress/

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

Re: Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

the $w3all_phpbb_unotifications global var will be initialized as array into wp_w3all.php, so that when used count($w3all_phpbb_unotifications) to display notifications count, will be not necessary to check that the var is not empty.

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

Re: Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

Both hints into help page https://www.axew3.com/w3/2022/12/switch ... le-update/
and plugin admin page, were wrong where
Author in WP -> Global moderator in phpBB.

It is NOT this way by default.
It is
Author in WP -> Registered group in phpBB
and
Editor or Shop Manager in WP -> Global moderators group in phpBB

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

Re: Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

The subsequent is: what about if an user change Role based on some action due to memberships subscriptions or because promoted to another Role in WP, based on some code logic and not because an admin changed it manually on WP profile?
The code about this will be added on 2.6.9.
I also hope to find out the way at same, to release the new updated phpBB WordPress extension

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

Re: Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

The Roles/Groups switch about if a WP user changed Role due to to some plugin process and not due to an admin action, has been added.
It is necessary to read the related option hint into plugin admin, the help page, and the included default file inline hints to understand how to correctly use it.

The option that check for front-end registration plugins pages could be removed, since the new introduction of the

Code: Select all

add_filter( 'wp_pre_insert_user_data', 'w3all_wp_pre_insert_user_data', 10, 4 ); // this work for front-end plugins
filter: it will be an unique function that will go to replace several filters and hooks functions on next releases, making the integration code shorter and surely compatible into any scenario with any plugin.

2 (really) not useful functions have been removed.
The public static function ck_phpbb_user( $user_login = '', $user_email = '' ){
has been little improved, and will the unique used to get/check phpBB user's info.

Many other functions will be removed on next releases, and hooks/filters removed/substituted or improved on related functions. It is just a start.

The flow will be smooth, easy to understand, and not confused like it is (even if it is perfectly working right now). The integration plugin 2.6.9 come tested working fine into buddypress, memberpress, woocommerce, and should be quite ready to work fine with any other.

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

Re: Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

Fix: avoid wordpress user registration, if same email exist in phpBB ->
Front end plugins pages: for example memberpress plugin -> memberships registration/subscription page, was bypassing the check.

It is anyway intended that when the integration start, all users have been paired, so that these kind of problems are impossible to happen.

Anyway, may someone forget that may exists some disabled user's emails or some other specific case.

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

Re: Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

As part of logs notes about 2.6.9 and
Woocommerce, Buddypress, Memberpress


Excerpt of another post:

Ok, tested all the required, yes Buddypress go with his own way (and i did not tested it by long time) about many things, overwriting default WP hooks and filters. For example, my inline hint say:

Code: Select all

// since WP 5.8 $userdata added, but with Buddypress installed it return same values for $old_user_data and $userdata
// same goes for $wpu = get_user_by('ID', $user_id), at this execution time, if Buddypress is active it return old data
The profile_update hook, is completely problematic on Buddypress and company.

On 2.6.9 (really coming today!) all has been fixed in the easy way you'll see into wp_w3all.php file

Code: Select all

add_action( 'profile_update', 'wp_w3all_up_phpbb_prof', 10, 2 ); // since WP 5.8 $userdata added
//add_action( 'profile_update', array( 'WP_w3all_phpbb', 'wp_phpbb_update_profile' ), 10, 3 );
inline hints on class.wp.w3all-phpbb.php on public static function phpbb_update_profile($user_id, $old_user_data) { let see how all has been resolved.

One thing not resolved (that can be easily fixed, but require specific code for buddypress or memberpress or woocommerce, or we must see how it can be fixed in different way using native wp hooks/filters). If an user try to update his email that is existent into phpBB, then the email reset to the old one AND: no error message display, and the notification email about email change is sent. If the user try to confirm by clicking into the email confirm link, obviously, will not reset nothing.

It is intended that all users are paired into WP phpBB, if not it will happen (like before) when same email is found into phpBB.
These "problems" do not occurs into an integration with paired users. But could exists for example, deactivated users in phpBB that an admin forget or do not want eliminate in phpBB, but that do not exists into WordPress.

If the email is found duplicated into WP: naturally, the WP error (normal/default WP flow) about duplicate email will be thrown.

The phpBB extension tagged version 2.0 and configurable into ACP and fixed about all bugs is ready and will be published immediately after 2.6.9 release.

Stay tuned it will be (easily) cool!

[EDITED]

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

Re: Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

Fix not congruent behavior (and error) when an user that result to be logged into phpBB, access the WP admin when on class.wp.w3all-phpbb.php
/class.wp.w3all-phpbb.php(673):
do_action('wp_login', 'alessiow3', Object(stdClass))
return error, because the subsequent fired

Code: Select all

 add_action( 'wp_login', 'wp_w3all_phpbb_login', 10, 2);
was failing with a: wp_w3all_phpbb_login NOT FOUND

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

Re: Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

phpBB user notifications

Add option:
Only get the total notifications count, of any type, default phpBB and customs types created by extensions

If selected, then just use echo $w3all_phpbb_unotifications; in this case, to display the number of unread notifications, declaring it as global, into any Php template or (maybe) some other plugin.

2.6.9 is going to be released now!

Code: Select all

= 2.6.9 =
*Release Date - 23 Jan, 2023*
* Fix: /wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_unotifications_short.php about all remaining bugs and add latest lacking cases: type.forum, type.disapprove_topic, type.disapprove_post
* Fix: the $w3all_phpbb_unotifications global var is now initialized as array into wp_w3all.php so that when used count($w3all_phpbb_unotifications) to display notifications count, will be not necessary to check if the var is or not empty before to count().
* Fix: Pm notifications are now retrieved based on $phpbb_user_session[0]->user_unread_privmsg var that replace $phpbb_user_session[0]->user_new_privmsg
* Fix: missing default WP 'author' role added into '/wp-content/plugins/wp-w3all-phpbb-integration/common/wpRoles_phpbbGroups.php'
* Fix: Roles/Groups switches, see related option hints, the linked help page and '/wp-content/plugins/wp-w3all-phpbb-integration/common/wpRoles_phpbbGroups.php'
* Fix: wrong hint about Author/Editor, related to "Switch the WP user to specified Group in phpBB, when Role updated in WordPress or vice versa" option
* Fix: Buddypress, Memberpress and Woocommerce registration, pass update, email change flows.
* Fix: minor fixes all around.
* Note: read this about Buddypress, Memberpress and Woocommerce: https://www.axew3.com/w3/forums/viewtopic.php?p=5939#p5939
* Add: option Only get the total notifications count, of any type, default phpBB and customs types created by extensions. If selected, then just use echo $w3all_phpbb_unotifications; in this case, to display the number of unread notifications, declaring it as global, into any Php template or (maybe) some other plugin.
* Remove: an obsolete function.
* More logs, please read: https://www.axew3.com/w3/forums/viewtopic.php?t=1781

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

Re: Coming 2.6.9 phpBB WordPress logs/bugs/requests

Post by axew3 »

2.6.9 has been released.
Enjoy lovely and cool people!

Post Reply