• Resolved Carlos_FRS

    (@carlosfrs)


    Updated last night to version 4.6 from 4.5.1 and had white screens across all my multisites. WP Debug logs showed thousands of \nFatal error: Call to undefined function wp_get_upload_dir() in /wp-content/plugins/contact-form-7/includes/functions.php on line 18.
    `$uploads = wp_get_upload_dir();’
    Checked line 18 on version 4.5.1 and saw different code.
    $uploads = wp_upload_dir();
    Reverted back to 4.5.1 for the time being and works fine. Probably could have changed the line in version 4.6 but didn’t have time.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    What version of WordPress do you use?

    Thread Starter Carlos_FRS

    (@carlosfrs)

    We’re using WP 4.6.1 in a multisite setup. Using a nginx 1.10 and php 5.6.27.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    wp_get_upload_dir() should exist if you use WordPress 4.6.1.

    Thread Starter Carlos_FRS

    (@carlosfrs)

    Ok I will check my core files. Maybe something is off on my end. Thank you and thank you for such a great plugin. I will post back what I find.

    Thread Starter Carlos_FRS

    (@carlosfrs)

    Thank you again for your help. You were correct we found a few sub 4.6 servers. Issue has been resolved.

    Hi,

    Just to add to this discussion, we have 2 mirrored installations of a site on 2 different 1and1 hosting accounts (Europe). One of them works fine with CF7 version 4.6 but the other throws the same error as outlined above.

    Both sites are on WP version 4.6.2.

    We tried both the rollback to 4.5.1 and editing line 18 of includes/functions.php in the 4.6 version of the CF7 plugin’ from wp_get_upload_dir() to wp_upload_dir(). Both these options worked, so I don’t know what it is between our 2 different 1and1 accounts, but thought I would share this info for anyone having problems.

    UPDATE to note above: I updated the non-working version to WordPress 4.7.1, and reinstated the wp_get_upload_dir() and it’s working.

    I can only imagine some problem occurred with the cloning of the site from one server to the other.

    Great plugin – thanks

    M

    Changing wp_get_upload_dir() to wp_upload_dir() worked for me on WordPress 4.7.2. There must be an action that doesn’t call the wp_get_upload_dir() yet. Seems to be a common issue as well.

    Changing wp_get_upload_dir() to wp_upload_dir() worked for me too on WordPress 4.4.5. Thanks for the information. This is a goldmine!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Call to undefined function wp_get_upload_dir()’ is closed to new replies.