There must be a solution for this. I am using this solution for chooosing images from media library. http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/
I am using two meta boxes for custom post type “products”.
First consists of two metafields what is for adding two addition product pictures The second one is for creating a simple gallery for this product.
Each of them has their own tb_show and window.send_to_editor stuff.
The thing is that everything works fine when there are registered only one metabox – the first or the second. If there are registered both of them, the last registered via add_meta_box , brings the error in firebug “too much recursion” when pressing “Insert into post” button.
How to solve this?
This is very mission critical, to have two of the metaboxes in post, to add different type of images? Also, the default Insert image in to post should work.
Maybe someone has a class for this because I see, the problem is if there are two original_send_to_editor functions registered in one post page.