• Hi,

    At first, thanks for the great plugin, I’m currently implementing it in a multisite network.
    All images etc should be available over a cdn which works as aspected but:

    The plugin uploads the file 2 times:

    • blobstorage/2016/12/05/my-image.jpg
    • blobstorage/sites/2/2016/12/05/my-image.jpg

    The first path works fine, the second path not. Path 2 is the one used by WordPress. So currently the images do not load. I loggedin to my blobstorage using cyberduck and when I check the files I see the file in the first path has some bytes (which is good) but the once in the second path have 0 bytes, so something is going wrong while uploading them I guess.

    Can you please check this?

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter jorenvh

    (@jorenvh)

    Hi Ritesh,

    Found the bug, the firs time the function is called it has a relative file name like

    2016/12/20/filename.jpg

    second time

    site/2/2016/12/20/filename.jpg which at the end overwrites the url based on the relative file name.

    Now thinking about a patch for it. I can’t seem to find the reason the function is called twice since.

    Steps I take:

    1. Go to wp-admin/media-new.php
    2. Select a file and upload it
    3. Monitor log file where I dumpt the data, no page refreshes or so just waiting and method is called twice

    Hope that guides you to, I will keep digging for a patch

    Joren

    Thread Starter jorenvh

    (@jorenvh)

    Hi Ritesh,

    Usign debug_backtrace() at the beginning of the function that gave me an output, but I don’t get much more info out of it, maybe you see something?

    In the gist the second file is a possible patch for the bug, at least that patch works at my end and makes sure that the second time it’s called it uses the correct path. This doesn’t solve why it’s called twice. But since I’m not doing anything special I think more people will have this issue..

    https://gist.github.com/jorenvh/2e8dd5be53e5e3198f3003d39bd5fa88

    Kind regards,
    Joren

    Plugin Contributor Ritesh Patel

    (@ritteshpatel)

    Hi Joren,

    I can see EWWW Image Optimizer plugin in callback which triggered second call of wp_update_attachment_metadata (at line 548 in gist). Can you check new uploads with that plugin disabled? I was under impression that you were testing with all the plugins disabled. Also, you can check https://github.com/10up/windows-azure-storage/tree/fix/smush-conflict code which fixes a conflict with both Smush and EWWW Image Optimizer plugin.

    Regards,
    Ritesh

    Thread Starter jorenvh

    (@jorenvh)

    Hi Ritech,

    Damnit, network deactivating the EWWW Image Optimizer plugin doens’t disable it on the subsites, you have to do that manually on each sites. That’s why the issue kept happening that plugin wasn’t actually disabled. (my sidebar was clean and that menu item is hidden in a sub tree that’s why I missed that.)

    I tested again with the plugin disabled and it works just fine. Besides that I have download the smush-conflict version of the plugin and that also works as aspected!

    My apologies that I didn’t noticed this earlier.

    And a big thank you for the great support!

    Best regards,
    Joren

    EDIT: Ps. I will keep the plugin on the subtree with the fix for know, any idea when it will be released?

    • This reply was modified 7 years, 11 months ago by jorenvh.
    Plugin Contributor Ritesh Patel

    (@ritteshpatel)

    Hi Joren,

    I am glad to know that Smush fix worked. That Smush conflict fix is originally part of https://www.ads-software.com/support/topic/appears-to-break-with-4-7/ thread. Once we have confirmation that it’s working, we will release it.

    Regards,
    Ritesh

    Plugin Contributor Ritesh Patel

    (@ritteshpatel)

    Hi Joren,

    We have released a new update of the plugin (version 4.0.1) which fixes this issue. Can you check and let us know if you still face the issue?

    Regards,
    Ritesh

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Multisite data BUG’ is closed to new replies.