Title: Multisite data BUG
Last modified: December 5, 2016

---

# Multisite data BUG

 *  [jorenvh](https://wordpress.org/support/users/jorenvh/)
 * (@jorenvh)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/multisite-data-bug/)
 * 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)

[←](https://wordpress.org/support/topic/multisite-data-bug/?output_format=md) [1](https://wordpress.org/support/topic/multisite-data-bug/?output_format=md)
2

 *  Thread Starter [jorenvh](https://wordpress.org/support/users/jorenvh/)
 * (@jorenvh)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/multisite-data-bug/page/2/#post-8573030)
 * 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](https://wordpress.org/support/users/jorenvh/)
 * (@jorenvh)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/multisite-data-bug/page/2/#post-8575439)
 * Hi Ritesh,
 * Usign [debug_backtrace()](http://php.net/manual/en/function.debug-backtrace.php)
   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](https://gist.github.com/jorenvh/2e8dd5be53e5e3198f3003d39bd5fa88)
 * Kind regards,
    Joren
 *  Plugin Contributor [Ritesh Patel](https://wordpress.org/support/users/ritteshpatel/)
 * (@ritteshpatel)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/multisite-data-bug/page/2/#post-8575980)
 * 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](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](https://wordpress.org/support/users/jorenvh/)
 * (@jorenvh)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/multisite-data-bug/page/2/#post-8576075)
 * 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 9 years, 5 months ago by [jorenvh](https://wordpress.org/support/users/jorenvh/).
 *  Plugin Contributor [Ritesh Patel](https://wordpress.org/support/users/ritteshpatel/)
 * (@ritteshpatel)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/multisite-data-bug/page/2/#post-8576730)
 * Hi Joren,
 * I am glad to know that Smush fix worked. That Smush conflict fix is originally
   part of [https://wordpress.org/support/topic/appears-to-break-with-4-7/](https://wordpress.org/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](https://wordpress.org/support/users/ritteshpatel/)
 * (@ritteshpatel)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/multisite-data-bug/page/2/#post-8614870)
 * 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)

[←](https://wordpress.org/support/topic/multisite-data-bug/?output_format=md) [1](https://wordpress.org/support/topic/multisite-data-bug/?output_format=md)
2

The topic ‘Multisite data BUG’ is closed to new replies.

 * ![](https://ps.w.org/windows-azure-storage/assets/icon-256x256.png?rev=2486101)
 * [Microsoft Azure Storage for WordPress](https://wordpress.org/plugins/windows-azure-storage/)
 * [Support Threads](https://wordpress.org/support/plugin/windows-azure-storage/)
 * [Active Topics](https://wordpress.org/support/plugin/windows-azure-storage/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/windows-azure-storage/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/windows-azure-storage/reviews/)

 * 21 replies
 * 2 participants
 * Last reply from: [Ritesh Patel](https://wordpress.org/support/users/ritteshpatel/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/multisite-data-bug/page/2/#post-8614870)
 * Status: not resolved