Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there
    I have exactly the same problem.
    Did you manage to find out the reason or did you find a solution?

    Greetings and thanks in advance

    Bump. Same issue here.

    • This reply was modified 4 years, 1 month ago by MrGregWaugh.

    The issue seems to be in \Windows_Azure_Helper::wp_upload_dir() which returns the current YYYY/MM instead of the one matching the post. As a quick hack (because this was causing us a big issue with a large content import) this works:

    In the function windows_azure_storage_wp_generate_attachment_metadata(), before line 389, add the following:

    $upload_dir['subdir'] = pathinfo( $upload_file_name, PATHINFO_DIRNAME );

    Or just apply this patch:

    --- a/html/wp-content/plugins/windows-azure-storage/windows-azure-storage.php
    +++ b/html/wp-content/plugins/windows-azure-storage/windows-azure-storage.php
    @@ -385,6 +385,9 @@ function windows_azure_storage_wp_generate_attachment_metadata( $data, $post_id
            $upload_path = trailingslashit( ltrim( $upload_dir['reldir'], '/' ) );
            $file_path = ltrim( $upload_path, '/' ) . $upload_file_name;
    
    +       // HACK to fix not-current-month bug
    +       $upload_dir['subdir'] = pathinfo( $upload_file_name, PATHINFO_DIRNAME );
    +
            // Upload path for remaining files
            $upload_folder_path = trailingslashit( ltrim( $upload_dir['reldir'] . $upload_dir['subdir'], '/' ) );

    This doesn’t address the root cause of the problem, but should workaround the issue until a better fix can be applied.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The images thumbnails are not generated in Media folder’ is closed to new replies.