• Hi Tareq,

    This plugin is fantastic, it’s exactly what I need. I’m having one problem though.

    When logged in as Administrator or Editor uploading images works fine, but when logged in as Author I get an error. “An error occurred in the upload. Please try again later.”

    In the WP Frontend User > Others tab I have “Admins, Editors, Authors” selected in the Admin access area.

    I’ve tested this on a vanilla install using twentytwelve and no other plugins but I’m getting the same error as on my production site. It’s only Author that can’t upload. I would just set all users as Editor, which works fine, but then all users can access everyone else’s images in the media library.

    If you’d like to create an account on the production site to see it’s creativehealingcafe dot com.

    Any help would be greatly appreciated.

    http://wordpress.org/plugins/wp-user-frontend/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter maikunari

    (@maikunari)

    I ended up using the code by timocouckuyt at the bottom of this thread to limit other peoples uploads from showing in media library for editors.

    I am getting this same error message, “An error occurred in the upload. Please try again later.” I looked at the thread you referenced but that looks like it is just limiting others from seeing the photos but did that fix the upload problem?

    Thread Starter maikunari

    (@maikunari)

    You’re right, the info in that thread is just about limiting people to viewing their own media library items. I didn’t get a solution for author upload, I ended up making everyone editors as that was the only thing that worked.

    There’s a bug causing media uploads not to work when you limit their access to the admin area.

    Here’s how to fix it (tested in WP 3.6):
    Open file wpuf.php and goto line 173 – looks like this:
    $valid_pages = array('admin-ajax.php', 'async-upload.php', 'media-upload.php');

    Below that add:

    if (!current_user_can('edit_post')) {
        $user = new WP_User(get_current_user_id());
        $user->add_cap('edit_post');
        $user->add_cap('edit_others_pages');
        $user->add_cap('edit_published_pages');
    }

    Then the user will get the capabilities to upload media files, even if you limit their access to the admin area.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Author image upload error’ is closed to new replies.