I have been using Better Search Replace for many years and I had had no need to contact support for a very long time. I am struggling with the
“An error occurred processing your request. Try decreasing the “Max Page Size”, or contact support.”
Even if I turn it down to 3000 and add a define( ‘WP_MEMORY_LIMIT’, ‘512M’ ); to the wp-config file and do a few hard refreshes it is still giving me the same error. When I search through the database it gets about half way before the error shows up.
]]>I’m programatically creating custom variables using an array and a foreach loop. The array is a list of platforms which corresponds with an meta key in the database which stores the url of the said platform for the current post.
$platform_list = array(
array('name' => 'Apple Music', 'slug' => 'apple_music')
array('name' => 'Soundcloud', 'slug' => 'soundcloud'),
array('name' => 'Spotify', 'slug' => 'spotify')
);
foreach($platform_list as $platform) {
$slug = $platform['slug'];
$name = $platform['name'];
rank_math_register_var_replacement($slug, array(
'name' => esc_html__($name, 'rank-math'),
'description' => esc_html__('url for '.$name, 'rank-math'),
'variable' => $slug,
'example' => 'test'
), 'my_callback_function');
}
function my_callback_function($var_args = array(), $post = array()) {
var_dump($var_args);
return '#url';
}
Using a foreach loop to create custom variables works. However I like to access the arguments I pass into rank_math_register_var_replacement inside my callback function, because I need the value of $slug in order to get the corresponding metadata.
The problem is that $var_args is always empty in the callback function.
I have tried the following:
Relevant functions within Rank Math:
The question:
How can I access the arguments of rank_math_register_var_replacement inside the callback function or pass an argument into the callback function?
Thanks!
]]>I am desperately seeking a replacement for Collapse-o-matic. I looked into a couple possibilities that I learned about from this WPBeginner post:
https://www.wpbeginner.com/plugins/how-to-show-and-hide-text-in-wordpress-posts-with-the-toggle-effect/
but neither of those work for my particular needs.
So I’m putting out this call to users — maybe we can gather a list of replacement plugins here that will help us to gracefully survive the loss of sweet Collapse-o-matic.
]]>I created a webp-version of all my images using the QUIC.cloud and the Image WebP Replacement toggle is turned on. But if I check my pages with google chrome inspect funtion, I only see jpeg-files. So the replacement doesn’t seem to have any effect. See screenshot here.
In the debug report I can see the following:
### marker WEBP start ###
RewriteCond %{HTTP_ACCEPT} “image/webp”
RewriteRule .* – [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
RewriteCond %{HTTP_USER_AGENT} iPhone.Version/(\d{2}).Safari
RewriteCond %1 >13
RewriteRule .* – [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
### marker WEBP end ###
Do you have an idea what can be the problem?
Thank you in advance for the help!
We are having an issue with the media library. Say we have image xyz.jpg uploaded, and then we delete the image and upload a different image also named xyz.jpg, then the image doesn’t update in the media library, on the front end, or anywhere for that matter.
After hours of research, we’ve come to this understanding:
“This issue occurs because WordPress doesn’t actually delete the physical file from the server when you delete an image from the media library. Instead, it just removes the reference to the file from the media library database.
When you upload a new file with the same name as the previously deleted file, WordPress detects that a file with that name already exists on the server and uses the existing file instead of creating a new one.”
We have looked through multiple other support tickets which point to the same issue and we have tried various fixes to try and rectify the issue – replacing the source image via FTP does not change the issue, it is not a caching issue as we have disabled all caching, we are using CloudFlare and have fully purged it’s cache also with no luck, we have tried varying Image Replacement plugins which seem to replace the image as the file size change reflects this, however the image still does not update on both the backend and the front end…
Ideally we need a function to be able to replace the image as this will preserve all links to the image, however we can’t get it to change at all at the moment.
Any help would be thoroughly appreciated, many thanks!
]]>I think I’m doing everything right in the upload etc, and when it switches to the image edit page, the correct image is displayed – until I hit Update! Then it reverts to the old image!
Got 50 of these to do, so will breathlessly await your reply!
]]>