Offloaded media URLs may be broken.
-
Hi,
I’ve followed all getting started docs and created S3 with Cloudfront. Files are being offloaded and show that they are connected to correct url. But I’m getting this message from the delivery settings page on the Wp Offload Media Lite page for Cloudfront.
Offloaded media URLs may be broken. An error was encountered while testing the domain:?
Received 403 from endpoint
What can I do to fix this issue?
Thanks
-
Have you installed the “amazon-s3-and-cloudfront-tweaks” plugin, and have you enabled the “as3cf_cloudfront_path_parts” filter within that plugin’s .php file?
Note that if you have implemented a “prefix” with your bucket path, and if your defined Cloudfront “distribution” also includes the same “prefix,” the “403 error” may result from Cloudfront attempting to access/serve files from <bucket><prefix><prefix> location, which does not exist.
The “as3cf_cloudfront_path_parts” filter fixes the issue, allowing Cloudfront to serve files from <bucket><prefix>.
Hi Harry and thanks for the prompt response. I activated the as3cf_cloudfront_path_parts but I’m still getting the same error.
Hi @renico
WP Offload Media Support Team here, Thanks for reaching out with your query we would be happy to assist.
Would you please try editing your wp-config.php file and replace this line –
define( ‘WP_DEBUG’, false );
With these lines –
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, false);This means that any errors are logged to /wp-content/debug.log, because some errors are not visible on screen. More details about that at https://www.ads-software.com/support/article/editing-wp-config-php/#wp_debug
Can you try the process again (click ‘Check Again’ in the Delivery settings) and then attach the debug.log file with your reply.
Thank you.
Hi thanks for the reply. Is there another way to do the debug.log? When I insert the lines into wp.config I get the white screen of death. The log is also not showing any information.
Thanks
Hi @renico,
Thanks for the response.
This seems to be the first time we’ve heard of debug.log causing white screen of death. Usually enabling debug mode is used to identify what’s causing the white screen of death.
I recommend reaching out to your hosting provider for assistance on this. Alternatively, you can instead ask them for an error log which some hosting providers already have in place.
We look forward to hearing back!
I have found an error_log in my Wp folder and this is what I got.
[06-Feb-2024 07:29:35 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:88
Stack trace: 0 /home/tjg4lva5pvw5/public_html/wp-load.php(50): require_once() 1 /home/tjg4lva5pvw5/public_html/wp-blog-header.php(13): require_once('/home/tjg4lva5p…') 2 /home/tjg4lva5pvw5/public_html/index.php(17): require('/home/tjg4lva5p…') 3 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 88
[06-Feb-2024 07:30:42 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:88
Stack trace: 0 /home/tjg4lva5pvw5/public_html/wp-load.php(50): require_once() 1 /home/tjg4lva5pvw5/public_html/wp-blog-header.php(13): require_once('/home/tjg4lva5p…') 2 /home/tjg4lva5pvw5/public_html/index.php(17): require('/home/tjg4lva5p…') 3 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 88
[06-Feb-2024 07:39:34 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:89
Stack trace: 0 /home/tjg4lva5pvw5/public_html/deleteme.wprhxbjq.php(22): include_once() 1 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 89
[06-Feb-2024 07:39:34 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:89
Stack trace: 0 /home/tjg4lva5pvw5/public_html/deleteme.wpujp9ej.php(22): include_once() 1 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 89
[06-Feb-2024 07:39:34 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:89
Stack trace: 0 /home/tjg4lva5pvw5/public_html/deleteme.wpyspnmb.php(22): include_once() 1 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 89
[06-Feb-2024 10:33:57 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:88
Stack trace: 0 /home/tjg4lva5pvw5/public_html/wp-load.php(50): require_once() 1 /home/tjg4lva5pvw5/public_html/wp-blog-header.php(13): require_once('/home/tjg4lva5p…') 2 /home/tjg4lva5pvw5/public_html/index.php(17): require('/home/tjg4lva5p…') 3 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 88
[06-Feb-2024 10:33:59 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:88
Stack trace: 0 /home/tjg4lva5pvw5/public_html/wp-load.php(50): require_once() 1 /home/tjg4lva5pvw5/public_html/wp-blog-header.php(13): require_once('/home/tjg4lva5p…') 2 /home/tjg4lva5pvw5/public_html/index.php(17): require('/home/tjg4lva5p…') 3 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 88
[06-Feb-2024 10:34:01 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:88
Stack trace: 0 /home/tjg4lva5pvw5/public_html/wp-load.php(50): require_once() 1 /home/tjg4lva5pvw5/public_html/wp-blog-header.php(13): require_once('/home/tjg4lva5p…') 2 /home/tjg4lva5pvw5/public_html/index.php(17): require('/home/tjg4lva5p…') 3 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 88
[06-Feb-2024 10:34:06 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:88
Stack trace: 0 /home/tjg4lva5pvw5/public_html/wp-load.php(50): require_once() 1 /home/tjg4lva5pvw5/public_html/wp-blog-header.php(13): require_once('/home/tjg4lva5p…') 2 /home/tjg4lva5pvw5/public_html/index.php(17): require('/home/tjg4lva5p…') 3 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 88
[06-Feb-2024 10:36:38 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:88
Stack trace: 0 /home/tjg4lva5pvw5/public_html/deleteme.wptwcas2.php(22): include_once() 1 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 88
[06-Feb-2024 10:36:38 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:88
Stack trace: 0 /home/tjg4lva5pvw5/public_html/deleteme.wpzpjt3o.php(22): include_once() 1 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 88
[06-Feb-2024 10:36:38 UTC] PHP Fatal error: Uncaught Error: Undefined constant "‘WP_DEBUG’" in /home/tjg4lva5pvw5/public_html/wp-config.php:88
Stack trace: 0 /home/tjg4lva5pvw5/public_html/deleteme.wpddafha.php(22): include_once() 1 {main} thrown in /home/tjg4lva5pvw5/public_html/wp-config.php on line 88-
This reply was modified 1 year, 1 month ago by
renico.
Hi @renico,
Thanks for sending that in. I think there was some issue when you copied the WP_DEBUG constants. The single quotes might have been treated as something else.
Could you try the code below to see if this works?
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, false);Basically, please ensure that the single quotes are real single quotes. You may have to re-type them to ensure this.
Also, are the images showing up using the CDN domain? Could you give us a sample image that uses the CDN domain?
-
This reply was modified 1 year, 1 month ago by
- The topic ‘Offloaded media URLs may be broken.’ is closed to new replies.