I have seen multiple reports of problems with Image Media Field from about six months ago. I have been trying to get a handle on this problem since then. I have not been able to duplicate this problem on my system. However, from all the problem descriptions I suspect that the Javascript code used to implement the setting of the image field from Media Library is not working for some environments.
I am highly motivated to solve this problem as Magic Fields 2 is a prerequisite plugin for my plugin and this has caused a problem for one of my users. Since, I cannot duplicate the problem myself I really need the help of a user which has this problem and is willing to provide me with detailed feedback. If you can help me I will do my best to help you solve this problem.
Can you give me the broken URL. (The URL may look strange to you since a raw image is not used but a processed – reduced to thumbnail size – image is used so the URL is the name of a script that would resize the raw image)
When you encountered this problem were you trying to use a pre-existing image in the Media Library or did you upload a new image and try to use that. Can you try the other case and see if makes any difference?
Magic Fields writes to the Javascript console every time you attach an image to an Image Media field. Is there a message like the following in your Javascript console.
mf_use_new_image_gallery():attachment= alien_trespass.jpg
Is there any error message in the Javascript console?
Can you look at your browser network log for a request like the following:
http://localhost:8080/wp/wp-content/plugins/magic-fields-2/thirdparty/phpthumb/phpThumb.php?&w=150&h=120&src=http://localhost:8080/wp/wp-content/uploads/2014/12/alien_trespass.jpg
This is the HTTP request that the Javascript code would generate to load the thumbnail image. Can you check if the src parameter is correct. Is there a 403 Forbidden response?
If you are not a developer and don’t know how to do these things I can teach how as long as you are using either Firefox or Chrome. I apologize if you are a developer and know how to do these things but several previous users have reported this problem and never responded back and it occurs to me that maybe they did not know how to do these things.
Regards,
mc
Plugin Author
hunk
(@hunk)
Hi, which type of field uses? which browser uses and SO? this happen with all type images o only for special format?
Regards
Edgar
Although it may not be the problem here one problem I have found is that in order to display the thumbnail the server has to directly execute …/wp-content/plugins/magic-fields-2/admin/MF_ImageMedia.php. Unfortunately, some servers are configured not to execute code from …/wp-content. One way to avoid this problem is do this as a WordPress AJAX request, i.e. have …/wp-admin/admin-ajax.php invoke …/wp-content/plugins/magic-fields-2/admin/MF_ImageMedia.php so that PHP runs the code indirectly and not the server directly. I don’t think it is the problem here as the strange (to the user) image URL appears to be the output of this script so the script apparently has run.
Plugin Author
hunk
(@hunk)
Hi katrinaglover, the fix, can you download the version of development https://github.com/magic-fields-team/Magic-Fields-2 and test.
Hi Magenta Cuda, ok, i see the problem, in this week a user contact me, she have the problem with upload image for configuration of server. server have a htaccess for no access direct to PHP inside wp-content. i work yesterday a image field alternative (image upload using ajax and admin-ajax.php) and works fine. i’m using FormData , but checking the compatibility work >= IE10. i review in chrome and safari and everything woks fine. do you know some ajax upload with good support in browser?
Plugin Author
hunk
(@hunk)
hi again, the experimental field is called image alt, if someone want test this field can download for github https://github.com/magic-fields-team/Magic-Fields-2.
this field work exactly image field.
So sorry, I’ve been away at a convention and just now getting back in to these messages. Thank you so much for the support. I will download the development version, test and let you know.
I don’t think my issue is the same as what Magenta reported. I have no server/errors/etc displayed. Everything front end shows up just fine.
Thanks! Update shortly!
Hi there,
That worked perfectly! Thank you so much. It was driving me nuts. Much appreciated.
Hi Hunk,
I tested your fix for the server access problem and it worked for me.
Thanks,
mc