michaelrich
Forum Replies Created
-
I think I found the cause and fixed it:
Theget_submissions()method in the filemain/admin/admin-pages/submissions/crud.phpdoesn’t correctly use the page number. It tries to get the page number from$_REQUEST['current_page'], but WordPress list tables use a URL parameter calledpaged. Because$_REQUEST['current_page']isn’t set, the code always defaults to showing page 1. The correct page number is actually passed to the function as an argument, but the function overwrites it.The Fix:
To fix this, the
get_submissions()method inmain/admin/admin-pages/submissions/crud.phpneeds to be changed to use the arguments passed to it, especiallycurrent_page.Code Change:
Inside the
public static function get_submissions( $args = array() )method inmain/admin/admin-pages/submissions/crud.php:1. Remove this block of code (which incorrectly resets
$args):// This part is causing the problem by overwriting $args $args = [ 'orderby' => isset( $_REQUEST['orderby'] ) ? sanitize_key( $_REQUEST['orderby'] ) : '', 'order' => isset( $_REQUEST['order'] ) ? strtoupper( sanitize_text_field( $_REQUEST['order'] ) ) : '', 'per_page' => isset( $_REQUEST['per_page'] ) ? (int) $_REQUEST['per_page'] : 10, 'current_page' => isset( $_REQUEST['current_page'] ) ? max( 1, (int) $_REQUEST['current_page'] ) : 1, ];2. Add this code in its place (to correctly use passed arguments and set defaults):
// Define default values $defaults = [ 'orderby' => 'created_at', 'order' => 'DESC', 'per_page' => 20, // Or use the screen option default 'current_page' => 1, ]; // Merge incoming $args with $defaults. // This ensures that if 'current_page' is passed in $args, it's used. $args = wp_parse_args( $args, $defaults ); // Keep the existing sanitization for the now correctly populated $args $args['orderby'] = sanitize_key( $args['orderby'] ); $args['order'] = strtoupper( sanitize_text_field( $args['order'] ) ); $args['per_page'] = (int) $args['per_page']; $args['current_page'] = max( 1, (int) $args['current_page'] );This change ensures the function uses the correct page number provided by WordPress’s list table system, fixing the pagination.
BTW: I think 20 is way better as a default then 10.
Hi Nick,
Thanks for your quick response. I understand that the free version doesn’t offer database encryption. However, I’m a paid user of UpdraftPlus, and I’m still very interested in exploring options to anonymize email addresses in backups for GDPR compliance. It doesn’t help to encrypt the database when the clone is running on a server.
While I appreciate the concern that searching and replacing emails could cause problems, I believe a simple checkbox option during backup – to replace email addresses with placeholders – could be implemented safely with a well-defined logic. This would be incredibly valuable for GDPR compliance.
To illustrate what I mean, here’s a simplified PHP snippet that demonstrates the basic idea of replacing email addresses in a database dump before the backup is created. This is just a conceptual example, of course, but it shows the potential:
// Anonymize email addresses (example)
$sql = "UPDATE users SET user_email = CONCAT('user', ID, '@example.invalid') WHERE user_email NOT LIKE '%@yourdomain.com%'"; //Excluding main domain
if ($conn->query($sql) === TRUE) {
echo "Email addresses anonymized successfully";
} else {
echo "Error anonymizing email addresses: " . $conn->error;
}
$conn->close();Given the increasing importance of GDPR and data privacy, I believe this feature would be a significant selling point for UpdraftPlus, especially for users in the EU.
Thanks again for your time and consideration.
Michael
For some reason I cannot reactivate a user with:
UM()->common()->users()->approve($user_id, true);I also do not get any error in my error logs if I try it.
Is this even the right way to re-enable a user after I deactivated him?
I also tried:UM()->common()->users()->set_status('approved', $user_id);what did also not work.
For reference, I used the following code before the Ultimate Member update:um_fetch_user($user_id);
UM()->user()->approve();And replaced it with:
UM()->common()->users()->approve($user_id, true);That is how it was mentioned in the release notes. But it does not work…
As a sanity check I also tried:UM()->common()->users()->set_as_pending($user_id, true);An that worked. Are you sure the other functions are working properly? Did I do anything wrong?
- This reply was modified 1 year, 1 month ago by michaelrich.
Thank you very much, at first glance, it seems to have fixed the issue!
Isn’t Ultimate Member using normal WordPress roles?
If yes, why should they get removed?Forum: Plugins
In reply to: [Frontend Admin by DynamiApps] Bug: Cannot approve posts with Version 3.21.0Unfortunately, the bug has not been fixed in Version 3.21.1.
Now, after approving a post, I no longer land on the start page, but the post is not created either.
The backend shows ‘approved’ in the submissions, but it doesn’t appear …
Forum: Plugins
In reply to: [Frontend Admin by DynamiApps] Cannot approve posts issueUpdate: The latest version, 3.20.12, appears to be functioning well again.
It would have been nice to receive a response from support here…
Forum: Plugins
In reply to: [User Activity Log] security vulnerabilityIt seems like you can only exploit it if you are an administrator anyway… But it is very concerning for me that the developer is not reacting here.
Forum: Plugins
In reply to: [Frontend Admin by DynamiApps] Cannot approve posts issueI also now updated from version 3.19.7 to version 3.20.7, and I cannot approve posts anymore. As soon as I press the approval button, I land on the start page, but the post is not approved/does not appear on my start page. Version 3.19.7 seems to work fine.
I also hope for a fix, otherwise we cannot update. Everything above version 3.19.7 should not get installed at the moment.
I had the same problem and added the following code to my functions.php
function my_um_member_directory_core_search_fields( $core_search_fields ) { $core_search_fields = array_flip( $core_search_fields ); unset( $core_search_fields['user_email'] ); $core_search_fields = array_flip( $core_search_fields ); return $core_search_fields; } add_filter( 'um_member_directory_core_search_fields', 'my_um_member_directory_core_search_fields' );But it has no effect, the mail-addresses are still searched for. Should this still work?
Thank you very much, your code is working and restores the functionality. 🙂
I installed version 2.6.11 from the github repository and it seems to fix the issue!
I am having a very similar problem with version 2.6.10
It would need a restructuring of my whole page if this isn’t possible anymore, therefore I hope for a fix.
Here is another thread describing also a very similar problem with version 2.6.10:
- This reply was modified 2 years, 5 months ago by michaelrich.
I added the code to my functions.php and it unfortunately did not change the behavior.