Loop fetching default-point-type.png every second
-
Hello,
I’ve set a error_log inside the wp_get_attachment_url filter to find out that it’s almost every second getting attachment url for the default-point-type.png image.
function wp_get_attachment_url_cdn($url, $post_id){ error_log('wp_get_attachment_url_cdn: ' . $url); throw new Exception('looping'); return $url; } add_filter( 'wp_get_attachment_url', 'wp_get_attachment_url_cdn', 10, 2 );
Here’s the stack trace once I’ve set the “throw new Exception”:
[08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:11 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:15 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:16 UTC] wp_get_attachment_url_cdn: https://www.redacted.com/wp-content/uploads/2022/05/default-point-type.png [08-Jan-2023 12:10:16 UTC] PHP Fatal error: Uncaught Exception: looping in /bitnami/wordpress/wp-content/mu-plugins/cdn-custom.php:67 Stack trace: #0 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(308): wp_get_attachment_url_cdn() #1 /opt/bitnami/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters() #2 /opt/bitnami/wordpress/wp-includes/post.php(6705): apply_filters() #3 /bitnami/wordpress/wp-content/plugins/mycred/includes/mycred-functions.php(1720): wp_get_attachment_url() #4 /bitnami/wordpress/wp-content/plugins/mycred/includes/mycred-functions.php(106): myCRED_Settings->get_type_image() #5 /bitnami/wordpress/wp-content/plugins/mycred/includes/mycred-functions.php(1782): myCRED_Settings->__construct() #6 /bitnami/wordpress/wp-content/plugins/mycred/includes/mycred-functions.php(2607): mycred() #7 /bitnami/wordpress/wp-content/plugins/mycred/includes/mycred-functions.php(2452): mycred_get_point_type_name() #8 /bitnami/wordpress/wp-content/plugins/mycred/includes/mycred-tools-import-export.php(9): mycred_get_types() #9 /bitnami/wordpress/wp-content/plugins/mycred/includes/mycred-tools-import-export.php(1402): myCRED_Tools_Import_Export->__construct() #10 /bitnami/wordpress/wp-content/plugins/mycred/mycred.php(95): require_once('...') #11 /bitnami/wordpress/wp-content/plugins/mycred/mycred.php(256): myCRED_Core->file() #12 /bitnami/wordpress/wp-content/plugins/mycred/mycred.php(108): myCRED_Core->includes() #13 /bitnami/wordpress/wp-content/plugins/mycred/mycred.php(47): myCRED_Core->__construct() #14 /bitnami/wordpress/wp-content/plugins/mycred/mycred.php(1143): myCRED_Core::instance() #15 /bitnami/wordpress/wp-content/plugins/mycred/mycred.php(1145): mycred_core() #16 /opt/bitnami/wordpress/wp-settings.php(447): include_once('...') #17 /bitnami/wordpress/wp-config.php(203): require_once('...') #18 /opt/bitnami/wordpress/wp-load.php(50): require_once('...') #19 /opt/bitnami/wordpress/wp-blog-header.php(13): require_once('...') #20 /opt/bitnami/wordpress/index.php(17): require('...') #21 {main} thrown in /bitnami/wordpress/wp-content/mu-plugins/cdn-custom.php on line 67
This seems to be an issue with the mycred plugin.
Thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Loop fetching default-point-type.png every second’ is closed to new replies.