Support » Plugin: WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage » Rewrite broke on Logo image for X Theme on latest update

  • Not sure if it is new code for your major update or if it is because of something different X Theme is doing in its latest update, but the logo image (and ONLY the logo image) is not doing the proper rewrite for some reason. Instead, it’s leaving off the S3 URL and only listing the bucket name etc as a relative URL, so the image is breaking. I’ve found this on several client websites that I recently updated. I finally stopped updating X Theme to the latest release until this gets resolved. Obviously X Theme is one of the most popular themes out there, so I wanted to bring this up.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor ianmjones

    (@ianmjones)

    Can you give me a concrete example of what the URL is expected to be and what you actually get?

    Thank you for the reply! 🙂 Here is how it is currently showing up:
    MEMBERSHIP MULTIPLIERS

    It SHOULD be: MEMBERSHIP MULTIPLIERS

    It’s leaving off the first portion of the S3 URL. Please note the only place I’ve seen this happen is with the header logo on the sites. Other rewrites are being filtered correctly by your plugin.

    Sorry…

    Here is the proper code:

    It’s showing up this way…
    <img src="/why-people-quit-main-assets/2019/03/MM_Logo_Dark_Blue.png" alt="MEMBERSHIP MULTIPLIERS">

    But it should show up this way:
    <img src="https://s3-us-west-2.amazonaws.com/why-people-quit-main-assets/2019/03/MM_Logo_Dark_Blue.png" alt="MEMBERSHIP MULTIPLIERS" width="544" height="204">

    I heard back from Themeco support and they are thinking it’s something in your plugin and not their update, specifically they state the following:

    X only gets the image URL for the header logo in the WordPress’ options table. I believe the Offload S3 plugin changes the URLs in that table. I’m not exactly sure so please confirm this or ask the Offload S3 support if they have such a feature. If they do, please ask them why the header logo URL’s not updated. Specifically, the option_name of the header logo is x_logo.

    I don’t really think this has anything to do with it because I think your plugin filters the output AFTER it’s retrieved…but it seems something has happened to the priorities perhaps of when the filter gets processed in the header…. Just trying to give you as much info as I can.

    Plugin Contributor ianmjones

    (@ianmjones)

    Hi @geek-goddess, you’re correct, WP Offload Media filters local Media Library URLs to the remote version if it matches an offloaded item.

    The broken link is very telling, it’s a relative URL, which WP Offload Media would never create (it only works with absolute URLs), so something is removing “https://s3-us-west-2.amazonaws.com” from the URL after WP Offload Media has done its filtering.

    Alternatively, maybe after you select the Media Library item for the header and save, the theme processes the S3 URL before WP Offload Media gets a chance to turn it back into a local URL. If the theme is stripping the domain etc. from the selected item’s URL to get it ready to save into its options record, it might be doing it early enough that WP Offload Media can’t then recognize it as an S3 URL and switch it back to local.

    WP Offload Media goes to great pains to switch any S3 URLs back to their local version before any saves to the database. If the theme changes the URL in JavaScript before save, or processes it with a priority of 10 or less via its own filter, then I can see that being an issue.

    Hi @ianmjones , I appreciate your looking into this. I posted your response in the support forum for XTheme and gave them a test site to see what was going on. They were able to see there was an issue and have added it to their issue tracker to get it resolved. I will post an update here when it is resolved and any other comments they might make as to what the issue was/is.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.