Home>Support>Widget CSS unable to be saved to S3 using Offload Media plugin

Widget CSS unable to be saved to S3 using Offload Media plugin

I’m using Page Builder and the Wigdets plugins to build my pages. In conjuction I am using the Offload Media plugin (https://deliciousbrains.com/wp-offload-media/) to store all items that go to the uploads folder to an S3 bucket. So, when I save a page that uses page builder and/or widgets, I would assume that the CSS for that page or widget should get written to uploads/siteorigin-widgets which is on the S3 bucket. I can see the styling in the widget preview, and when editing the page in Live Edit mode but when I publish my changes and visit the actual page, I get a 401 error when retrieving the CSS file from S3. I have verified that the CSS file is in fact not in the S3 bucket, which I assume contributes the 401 error.

Has anyone else experienced anything like this, or have advice. Thanks in advance!

Jordan

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 5 years, 16 days ago Alex S
    Hi, I Work Here

    Hi Jordan,

    Offload Media replaces the urls on page load, but it does it before SiteOrigin Page Builder is able to alter the page content. This is problematic as we replace the fallback content (which has had the urls replaced by Offline Media) with the generated Page Builder content. You can avoid this issue by delaying when Offline Media runs until after SiteOrigin Page Builder runs. This is possible using PHP.

    Do you have a method of adding PHP to your website? If so, please add the following PHP to your website:

    add_filter( 'the_content', 'as3cf_filter_post_local_to_provider', 20 );

    If you don’t, please install Code Snippets and then navigate to WP AdminSnippetsAdd New. Add the above PHP and click Save Changes & Activate.

  2. 5 years, 5 days ago Jordan Hunter

    Hi Alex,

    Thanks for the quick response. I added the code you provided, but unfortunately no luck. I am still seeing the same issue where when I publish/update a page after modifying a widget’s style-related settings (height, etc), and when I view the page I still get the 401 error from the S3 bucket saying that the widget CSS file is unavailable.

  3. 5 years, 5 days ago Alex S
    Hi, I Work Here

    Hi Jordan,

    I’m sorry to hear that. So, to confirm, your website is correctly pointing to your S3 Bucket but the S3 Bucket doesn’t contain the relevant file, correct? If so, please reach out to offload Media for assistance with this as it appears you’re having issues writing to your S3 Bucket and they should be able to point you in the right direction.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More