• Just a heads up attachments don’t work on multi-site installations I have had to modify your plug-in locally to get it to work. Seems to be down to line #287 in the application-form.php file. I changed this:

    $wpbb_attachments = array( WP_CONTENT_DIR . '/uploads' . $wpbb_wp_upload_dir[ 'subdir' ] . '/' . basename( $wpbb_moved_file[ 'file' ] ) );

    To this:

    $wpbb_attachments = array( $wpbb_wp_upload_dir[ 'path' ] . '/' . basename( $wpbb_moved_file[ 'file' ] ) );

    https://ww.wp.xz.cn/plugins/wpbroadbean/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mark Wilkinson

    (@wpmarkuk)

    Thanks for the heads-up there. Does you code also work on a single WordPress install?

    Thread Starter olo ono

    (@ocouno)

    Haven’t actually tested it… but it should do ‘wp_upload_dir‘ will always return the upload folder path.

    On success, the returned array will have many indices: ‘path’ – base directory and sub directory or full path to upload directory. ‘url’ – base url and sub directory or absolute URL to upload directory. ‘subdir’ – sub directory if uploads use year/month folders option is on. ‘basedir’ – path without subdir. ‘baseurl’ – URL path without subdir. ‘error’ – set to false.

    Plugin Author Mark Wilkinson

    (@wpmarkuk)

    If you could test it that would be great please. If it is a fix, if you could add as an issue on Github I can then action it asap. Thanks.

    https://github.com/highrisedigital/wpbroadbean

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Attachments on multisite installations fix’ is closed to new replies.