WordPress.org

Ready to get started?Download WordPress

Forums

Download Attachments
Problem after update to WP 3.9 (6 posts)

  1. trawp
    Member
    Posted 4 months ago #

    DA plugin works fine on posts and pages, but problem on Custom Post Types (Types Version 1.5.5)

    Don't know which plugin has problem. Deactivated all other plugins, same problem:

    DA recognizes the CPT's in settings and loads the metabox correctly on the CPT.

    Add New Attachment on CPT always get's;
    Unexpected error occured. Please refresh the page and try again.

    Thank you in advance

    https://wordpress.org/plugins/download-attachments/

  2. dFactory
    Member
    Plugin Author

    Posted 4 months ago #

    It looks ok on our installs. But more compatibility tests are on the way.

  3. trawp
    Member
    Posted 4 months ago #

    Hi dFactory

    Also have issue submitted with Types plugin

    Thanks

  4. badpat
    Member
    Posted 3 months ago #

    I too got the "Unexpected error occured. Please refresh the page and try again." message while trying to add additional attachments to a page.

    I backtraced it to the "public function update_attachments()" in metabox.php

    The problem seems to be that "$_POST['post_id']" equals zero.

    Getting further back into "admin-post.js" the object "wp.media.view.settings.post" seems to be empty. At least the id is zero in there.

    I don't know where this is normally set, so just take it as a hint.

    As I am only having one page with attachments I hardcoded the post_id of said page into the plugin in metabox.php . Works for me at the moment.

  5. dFactory
    Member
    Plugin Author

    Posted 3 months ago #

    @badpat, are you sure you did not change anything else? If not we'll probably need to dive into your site's admin. (you'll need to post a topic on our dedicated forum)

    We tested the plugin on our installs and it worked as expected.

  6. trawp
    Member
    Posted 3 months ago #

    I finally traced it down to neither of the plugins having a problem.

    The problem was in the Custom Post Types settings:
    Display Sections
    Thumbnail
    must be activated.

    It must be in the new way attachments are called in 3.9. Although I was only using audio attachments, after activating Thumbnails for the CPT all was well.

    Thanks

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.