• Resolved Krasen Slavov

    (@krasenslavov)


    I moved a bunch of sites to Multisite, the plugin was both activated on the sub-site and the network. The Cache-Busting select option field was both disabled on both the network and a single site, and even the original site that was transferred to the WPMU had Cache-Bustingit didn’t work on the multisite.

    I needed to manually remove the “disabled” select attr on the network level, select Don’t Override, and then save. This allowed me to go to all sub-sites change and select Enable for Cache-Busting (they weren’t disabled anymore). Saved and it worked as before.

    The network option still showing disabled but I guess the db option was added. So, underneath everything works as it should, maybe a simple check when displaying the form was messed up.

    This is more like a bug to me, and I should’ve reported it on the GitHub repo.

    Thanks,
    Krasen

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Oleksii Bolhunovskyi

    (@obolgun)

    Hello Krasen,

    Thank you for using our product and we are happy to know that it is helpful for your projects.

    We will investigate the issue and fix as soon an possible.

    Another way to enable Cache Busting is to use WP_STATELESS_MEDIA_CACHE_BUSTING constant.

    Best regards and have a nice day.

    Plugin Author Oleksii Bolhunovskyi

    (@obolgun)

    Hello Krasen,

    We released the new version 4.0.0 and have some update for you.

    We investigated the issue and found that this behavior is intended and thought-out. The reasons are:

    • It is possible to set different WP-Stateless modes for any single site in the network, but Ephemeral and Stateless modes require Cache-Busting turned On
    • It is possible to set up the same Google Storage folder for several sites in the network and the files with the same names uploaded from different sites will mess up.

    So to prevent these issues we enforce Cache-Busting setting in multisite environment and disable the ability to change it.

    But from the other hand we understand the complexity of the issue so we decided to provide the filter that can override any setting in WP-Stateless on the highest level. So if you want to?enable?Cache-Busting for particular site you can use the following code:

    add_filter( 'wp_stateless_get_setting_hashify_file_name', function( $value, $default ) { return 'true'; }, 10, 2);

    For disabling Cache-Busting:

    add_filter( 'wp_stateless_get_setting_hashify_file_name', function( $value, $default ) { return 'false'; }, 10, 2);

    Please note that this overrides every other setting, config constant and so on. So even if you see the setting in Admin Panel – the exact behavior is ruled by this code top-most.

    Please let us know if this works for you.

    Thread Starter Krasen Slavov

    (@krasenslavov)

    Thank you, this seems like a very nice additional option for developers and since it is something done on purpose in the first place it makes sense not to include it in the UI.

    Krasen

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multisite + Cache-Busting’ is closed to new replies.