I thought I was crazy, but on some of the images in my media gallery, there is no “insert into post” button. see the picture:
this is only for some images though, and the button is there, like it’s supposed to be, for the others.
what could be causing this to afflict particular images and not all of them?
If you have a post type that doesn’t have the editor, uploading media in that post type will cause it to not have an “Insert into Post” button. Not sure if that’s your situation, but personal experience says that could be the reason 🙂
I would definitely disable all plugins and switch to a default theme first to see if one of those is causing a conflict. Absolutely do not modify the core.
Had the post been saved before your tried to insert the image? I’m pretty sure to insert an image into a post the post needs to have a valid post_id.
I had the same issue, but in my case it was not on an “image” basis, but rather the “Insert into Post” button failed to generate on certain custom post types. In my case — which I’m not sure it applies — it had to do with adding a modified TinyMCE editor into a custom metabox (I was using WPAlchemy’s MetaBox class), then disabling the default (now redundant) editor, which in turn seemingly told WordPress that the user had no way of inserting images into that post type. Logically, WordPress didn’t feel the need to generate the “Insert” button, since it didn’t expect images to come by.
My fix was simple, and even though the source of the problem can be different, the solution might be the same. All you have to do is tell WordPress that image insertion should always be allowed:
If always is too often, just add the filter conditionally (i.e. detecting post type, like I did).
think i have found it if that can be any help. did not finished it .. but still gonna continu that tomorrow, time to sleep.
here what was my orginal call
that from a button click… jquery. now, i have realize that the wordpress function in media.php (includesmedia.php) look if the post id exists. Before, it was working just find with “
post_id=1
“. but now on we HAVE to pass the post id… so my call gonna look like(whitout the blank space in aronud the ‘?’)
where
xxxxx
is replace by mypost id
… now im new to php so here i am.. going to sleep but hey. it works well when i hardcode it myself with the good post id.other solution possible:
this is the line that make the button appear:
look around it in
includesmedia.php
… maybe it easyer than it appear for a newbe in php like me!peaaaace out
Never had this problem but after looking around a bit I found something. You might wanna try and go to wp-admin/includes/media.php and change
to
however .. don’t see this as a permanent fix because editing core files is a bad thing.
What you could also do is disable all plugins to see if there is something that conflicts with your wordpress installation