WordPress.org

Ready to get started?Download WordPress

Forums

Toolbox
Media Uploader broken in debug mode (2 posts)

  1. itinerant
    Member
    Posted 1 year ago #

    Using Toolbox theme with WP_DEBUG set to true causes the new media library to not display anything either for the whole library or the uploaded to this post.

    When trying to upload images, after upload completes and the image is attached to the post, the new media library shows an error message. The images was uploaded and attached as the main media->library shows them.

    Using the old media uploader, gallery tab shows the following:
    PHP Notice: Trying to get property of non-object in .../wp-content/themes/toolbox/functions.php on line 298
    PHP Notice: Trying to get property of non-object in .../wp-content/themes/toolbox/functions.php on line 300

    The enhanced_image_navigation function uses the global post which isn't set in this use case. Changing the function to use the post id passed by the attachment_link filter fixes the issue.

  2. Steve
    Member
    Posted 7 months ago #

    @itinerant Thanks for the clear description and solution.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.