markus9312
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Forms for ACF] Issues with Litespeed Cache?Hi again. So the support helped me find a potential solution to this.
https://docs.litespeedtech.com/lscache/lscwp/admin/#turning-wordpress-shortcodes-into-esi-blocks
Currently I’m using the advanced form block. Do you reckon if I change this to a esi shortcode it would work better? They mention some potential issues TTL but I don’t really understand the issue at hand so I don’t know if it would be of any concern..
Forum: Plugins
In reply to: [Admin and Site Enhancements (ASE)] Plugin locking me out of the adminThanks for your quick response! I’m using Local by flywheel. I can view the frontend of the site but I can’t access the admin-panel as I get the error. So I can’t really log in even.
It also happens when migrating to my server. But only sometimes.. I will try recreating it ?? Will let you know if I succeed.
This function seemed to solve it
function delete_original_image_after_upload($metadata) { $upload_dir = wp_upload_dir(); // Construct the path for the real original image $original_file_path = $upload_dir['basedir'] . '/' . $metadata['file']; // Remove sizes suffixes, including the 'scaled' version foreach ($metadata['sizes'] as $size => $size_data) { $suffix = '-' . $size_data['width'] . 'x' . $size_data['height']; $original_file_path = str_replace($suffix, '', $original_file_path); } // Remove the -scaled suffix just in case $original_file_path = str_replace('-scaled', '', $original_file_path); // Check if the remaining file path exists (which should be the real original) if (file_exists($original_file_path)) { unlink($original_file_path); // Delete the original file } return $metadata; } add_filter('wp_generate_attachment_metadata', 'delete_original_image_after_upload');
I have the same issue :/ Bought imagify infinite because I thought this would solve it.
I have a bbPress installation that receives around 50 images per day, which can be well over 100mb. Imagify solves the problem of showing optimized versions to the visitor, but it doesn’t solve the issue of them filling up my server. What can I do to prevent that?Thank you so much @satollo ! Could you tell me if I’m on the right path?
To get all current users in the correct role (not just ones that are updated), I did a a dry run of all the current users & looped through them, with a conditional for each one of the roles I want added?
//With proper args so that all users are queried, currently missing this $user_query = new WP_User_Query( $args ); foreach ($user_query as $user){ $subscriber = Newsletter::instance()->get_user_by_wp_user_id($user->id)) //Role query from https://wordpress.stackexchange.com/a/5048 if ( in_array( 'custom-role1', (array) $user->roles ) ){ $subscriber->custom_list1 = 1; } if ( in_array( 'custom-role2', (array) $user->roles ) ){ $subscriber->custom_list2 = 1; } Newsletter::instance()->save($subscriber); return; }
And when checking if an user is changed adjust the query and instead just do a check for when the profile is updated?
//From https://developer.www.ads-software.com/reference/hooks/profile_update/#comment-4988 function wpdocs_check_user_email_updated( $user_id ) { $subscriber = Newsletter::instance()->get_user_by_wp_user_id($user_id)) //Role query from https://wordpress.stackexchange.com/a/5048 if ( in_array( 'custom-role1', (array) $user->roles ) ){ $subscriber->custom_list1 = 1; } if ( in_array( 'custom-role2', (array) $user->roles ) ){ $subscriber->custom_list2 = 1; } Newsletter::instance()->save($subscriber); return; } add_action( 'profile_update', 'wpdocs_check_user_email_updated', 10, 2 );
Forum: Plugins
In reply to: [Advanced Query Loop] Many errors on siteAwesome, now it’s working =D cheers @welcher
Forum: Plugins
In reply to: [Advanced Query Loop] Many errors on siteNo problem!
Forum: Plugins
In reply to: [Advanced Query Loop] Many errors on siteThanks for the quick response @welcher! Yes it’s still an issue. This is how it looks on the live site running PHP 8.0
Forum: Plugins
In reply to: [Advanced Forms for ACF] How to include files in the notification?Oh, awesome! Thanks for helping out so quickly ?? Changing it to an array worked out.
Forum: Plugins
In reply to: [Advanced Forms for ACF] How to include files in the notification?Hej Fabian! Thanks for helping out ??
The error I get says “Det har uppst?tt ett kritiskt fel p? webbplatsen.”, which – I take is the english error message “There Has Been a Critical Error on Your Website”, for anyone who happens too google upon this thread.. ??
I’m using file fields, and the files are stored like this: https://i.gyazo.com/957bff3f3d00afccbaa965fe4ce98b94.png
Even though this error occurs, the submisison, along with files gets stored in the “Inl?gg” (Submissions?) tab.
Forum: Themes and Templates
In reply to: [OceanWP] How do I implement rich markup FAQ?So I tried removing one of the questions, and then it suddenly worked. It was the most important question though.. I could get it to stay on the page by changing “GPS watch to “GPS-watch”… that’s kinda wierd, but hey.. ??
Now it’s working again.. I’ll send you an e-mail if the issue persists as I add more links. Thanks for your quick response!