Conflict between Image Uploader and CAC Featured Content Plugin
As I've been trying to upload images for the Hero widget and for the Image Credits page on the Commons, I've run into a few strange issues. The flash image uploader appears to be a bit wonky; sometimes, I hit "select photo" and navigate to the photo I want to upload, but the uploader doesn't seem to upload the photo to the site. At another time, I was able to upload the photo using the Browser uploader, but then, when I tried to insert the photo into a post, it inserted it as a thumbnail rather than as a full-sized image (it was roughly 500 pixels wide).
#1 Updated by Matt Gold over 8 years ago
- Subject changed from Issues With Image Uploading to Conflict between Image Uploader and CAC Featured Content Plugin
Update: I tried this again, and I made sure that before I inserted the photo into a post, I had the "medium" size selected. But, from the shortcode that the uploader entered into the post itself, it looks like it entered it as a thumbnail. Here is that code:
[caption id="attachment_314" align="alignnone" width="50" caption="CC-licensed photo \"Confetti Hands\" by M3Li55@"]<img src="http://commons.gc.cuny.edu/wp-content/plugins/cac-featured-content/timthumb.php?src=/blogs.dir/1/files/confetti-300x225.jpg" &h=50&w=50&q=100&a=l" class="avatar" width="50" hight="50"/>[/caption]
Looks like the CAC featured content plugin is messing with the image uploader.
#2 Updated by Boone Gorges over 8 years ago
- Assignee changed from Boone Gorges to CIC Michael
Michael - I noticed that your plugin filters the img tag as it's sent to the editor cac_featured_image_send_to_editor(). Why does it do this? When is the editor used in the workflow of your plugin?
If the filter is needed, we can probably just do a few checks at the beginning of the method (against post type or something like that).
Matt - From what I understand, the use of the Post Gallery Widget does not require you to actually insert the uploaded image into the post - only that you upload it as an attachment to the post.
#4 Updated by CIC Michael over 8 years ago
Boone, the widget uses that filter for the resource type, which hooks into the media browser, which uses the filter in question to insert a preview of the image back into the widget.
I moved some things around and so the filter in the widget should only run if the media browser is called by the widget.
The change is on cdev now, have a look and let me know if this resolves the conflict.
#6 Updated by Matt Gold over 8 years ago
Tried to upload an image an cdev (using teststudent account on the cunypie blog) and ran into an error while uploading the image. Please see attached screenshot.
Should I try another user account/blog? This might be a permissions/authentication issue -- even though I had logged in to the home page, I was asked for my cdev password again when I tried to go to the dashboard of the cunypie blog.