gartentechnik
Forum Replies Created
-
Problem is fixed with version 3.7.5. Thanks.
Hi,
the error-message has an error. In the plugin code there are these lines:
// Advanced cache file. $file = $wp_content_dir . 'advanced-cache.php'; if ( ! is_writable( $file ) ) { self::append_permission_error( $file . __( ' file is not writable.', 'breeze' ) ); }
is_writable() is “false” when the file exists and is not writable. Which is fine. But when the file does not exist it is “false” too.
So in this case you simply have to save the breeze-config again, the plugin will create the file and the error-message is gone. So: the error message in this case is not correct. Can you please set a different text for this case?
Hotfix: place in any plugin or theme:
add_filter( ‘feedzy_retrieve_image’, function($the_thumbnail, $item) {
return preg_replace(“/\”.*/”, “”, $the_thumbnail);
}, 10, 3);- This reply was modified 3 years, 2 months ago by gartentechnik.
Its a too greedy regexp in “public function feedzy_scrape_image( $string, $link = ” )”. Here is a test and a fix for it (change “\/\/.*\.” to “\/\/.*?\.”)
<?php $string = '<img width="400" height="300" src="https://blog.seibert-media.net/wp-content/uploads/2020/10/Google-Meet-Beitragsbild.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Google Meet Teaser" loading="lazy" srcset="https://blog.seibert-media.net/wp-content/uploads/2020/10/Google-Meet-Beitragsbild.png 400w, https://blog.seibert-media.net/wp-content/uploads/2020/10/Google-Meet-Beitragsbild-300x225.png 300w" sizes="(max-width: 400px) 100vw, 400px">'; $pattern = '/src=[\'"](.*?:\/\/.*\.(?:jpg|JPG|jpeg|JPEG|jpe|JPE|gif|GIF|png|PNG)+)[\'" >]/'; # BUGFIX: # $pattern = '/src=[\'"](.*?:\/\/.*?\.(?:jpg|JPG|jpeg|JPEG|jpe|JPE|gif|GIF|png|PNG)+)[\'" >]/'; preg_match( $pattern, $string, $hits ); if($hits[1] != 'https://blog.seibert-media.net/wp-content/uploads/2020/10/Google-Meet-Beitragsbild.png') { print "\nERROR!\n\n" . $hits[1] . "\n"; } else { print "All OK"; }