WordPress.org

Ready to get started?Download WordPress

Forums

[closed] An error occurred in the upload. Please try again later (6 posts)

  1. bluesky_still
    Member
    Posted 1 year ago #

    reproduce the error:
    1.new install of wp 3.5.1
    2.use register role: contributor
    3.hack the default theme twentytwelve function.php to add upload files:

    //http://www.wprecipes.com/wordpress-tip-allow-contributors-to-upload-files
    //http://wordpress.org/support/topic/allow-contributor-to-upload-media#post-1438467
    if ( current_user_can('contributor') && !current_user_can('upload_files') )
    	add_action('admin_init', 'allow_contributor_uploads');
    
    function allow_contributor_uploads() {
    	$contributor = get_role('contributor');
    	$contributor->add_cap('upload_files');
    }

    4.download and enable the http://wordpress.org/extend/plugins/post-from-frontend http://downloads.wordpress.org/plugin/post-from-frontend.zip
    5.add page with post-from-frontend short-code [wpeden_post_from_frontend]
    6.errors occur when contributor add post in front-page while upload media.

    7.and no js console.log ,no php error , no mysql error,no agache error.

    and the same like Question link: http://wordpress.org/support/topic/an-error-occurred-in-the-upload-please-try-again-later-4?replies=18

  2. bluesky_still
    Member
    Posted 1 year ago #

    usefull msgs of the same question.

    But, it's only spitting out the error for non-admins. If I'm logged in as an admin, I can upload image just fine from the front-end.

    I have tried disabling all plugins. No help. I am using a modified twenty eleven theme. Still doesn't work.

    It seems like it's a user-permission-based problem, but I don't know what user-permission (besides upload-files) would help me here.

  3. R Lee
    Member
    Posted 1 year ago #

    I am using customized theme, and have the same problem, i think the problem is not come from the theme.

  4. R Lee
    Member
    Posted 1 year ago #

    read here, it's work for me

  5. iversoncru
    Member
    Posted 11 months ago #

    it did not work for me R Lee, but thank you anyway :)

  6. iversoncru
    Member
    Posted 11 months ago #

    I have fixed it! i cannot believe it!
    Before got it solved i tried everything i could read on this forum, such us deactivating plugins, reinstalling wordpress, changing permalinks, permissions, changing the hosting...
    Then i decided to isolate the problem.
    First i realized that the problem was in my custom theme.
    Then i checked the templates and javascripts files.
    Then i found the file which was causing the problem.

    my problem was in functions.php!
    One of the functions, which was communicating directly with the server, was the problem. Once i removed it, i got it to work.

    I hope this can be helpful to anyone anyhow.

Topic Closed

This topic has been closed to new replies.

About this Topic