• I created a custom post type and 3 metaboxes for it in the admin section.

    It looks great and the admin panel for that custom post has, indeed, the 3 boxes.

    These boxes have all the same code (with a simple change of indentation in the functions names in order to avoid any conflict) and they each are supposed to allow the user to upload a picture.

    My problem is that, the first metabox always freezes on the upload while the two others work just fine.

    When I try to upload a picture through the fist metabox, the media-uploader popup (the old version) shows up, the drag n’ drop and preview features are ok (the picture is loaded) but when I try to validate the upload, the tb_close() event never happens. Basically, it freezes…

    First I thought that my first metabox was badly coded which is weird as it is a clone of the two others but after some tests, I realized that if I swap the order of the metaboxes in the admin panel, the first metabox is always failing while the two others are working just fine.

    This means that any of the three metaboxes will work or not, depending on its position in the admin panel.

    This is strange as it tends to prove that it is not related to the code of the metaboxes themselves so I’m stuck as I don’t know where to look to debug the issue.

    Any help would be appreciated.

    PS: I don’t plan to use an existing plugin for the metaboxes as this website is 90% done and already uses about 25 hand-made custom metaboxes that work very well.

    FYI: the metaboxes here above are already used in other custom post types with success. The only difference is that this is the first custom post type with more than 2 uploaders at once whithin the same admin panel.

  • The topic ‘Media upload freezes according to metabox order’ is closed to new replies.