Page 1 of 1
Image not showing after UPLOAD in EDIT-Mode
Posted: Fri Aug 30, 2013 7:21 pm
by mn6216
After upload finished or in Edit-Mode images do not show due to following Error (Chrome Console Log):
"Resource interpreted as Image but transferred with MIME type text/html: "<domain>/ewupload10.php?id=x_Logo&file=image.png&version=thumbnail&download=1". ..."
It seems that ewupload10.php has MIME-Type problem !??
How can I solve this!
(we have tried in all different browsers, all the same; it also happens on all kind of webservers, we have tried on different linux-configs).
Thanx for hints.
greats
mario
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Sat Aug 31, 2013 9:22 am
by mobhar
Have you followed the following sections:
- Tutorial - File Upload to Folder
- Tutorial - File Upload to Database
- Field Setup -> Image
- Field Setup -> Edit Tags -> File
from the help file?
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Sat Aug 31, 2013 10:09 am
by danielc
It seems that your image does not upload successfully or not image type file exist. So, in edit mode, there is no image displayed.
Is there any success message show after you upload your image? Do you see the image in list page after upload? Are you using the latest version, 10.0.1?
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Sun Sep 01, 2013 6:38 pm
by mn6216
The image is uploaded because it shows in the List and in View mode of Detail page.
I've taken the image out in ewp10.js for now, since it does not work in edit/upload mode.
Of course I've upgraded to last version and have a clean install of all extensions.
In am a heavy user of PHPMaker since Vers. 4 for a couple of years and believe to be very esperienced in PHP/JS Development in general.
By the way: PHPMaker 9.2 has been de-installed properly.
I upload normal jpg images. The "uploadhandler.php" puts the images into a temporary file structure which obviously does not load properly with ewlookup10.php (using the right properties).
Something is wrong more deeply. CHMOD of uploadfolder to 777
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Mon Sep 02, 2013 12:23 pm
by Webmaster
Have you tried with other browsers such as IE or FF? Is the problem with Chrome only or with all browsers?
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Mon Sep 02, 2013 1:04 pm
by mn6216
Yes, it happens in all browsers, IE, Mozilla, Opera +++
Everything worked ok with PHP Maker 9.2 - same options applied in general, table and field settings/edit tags+++
Changed only the "Set locale" settings in PHP>General options (I use german locale settings with decimal point being comma and thousand seperator set to a point.)
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Mon Sep 02, 2013 5:01 pm
by Webmaster
- Check for any javascript error on the page
- After uploading the image, but before submitting the form, check if temp images are created under: <upload folder>/temp<session id>/x<field>/<image name> and <upload folder>/temp<session id>/x<field>/thumbnail/<image name>
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Wed Sep 04, 2013 1:16 am
by mn6216
Look further up at my previous posts, no javascript errors / yes, temp directory is generated, but no image shown.
I wonder, am I the only one who got this problem !?
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Wed Sep 04, 2013 3:50 pm
by Webmaster
Is there any upload images in the temp folders?
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Wed Sep 04, 2013 10:20 pm
by mn6216
FOUND THE PROBLEM.
Following urls are generated:
http.//www.*.com/admin/ewbv10.php?fn=upload%2Flogo.png&width=0&height=120 works perfectly (view mode)
http.//*.com/admin/ewupload10.php?id=x_Logo&file=logo.png&version=thumbnail&download=1 does NOT work (edit mode)
<td class="preview"><a><img width="200" src="http.//****.com/admin/ewupload10.php?id=x_Logo&file=logo.png&version=thumbnail&download=1"></a></td>
The preceeding www. is not generated in EDIT-Mode, which leads the browser to a false URL on my server (because we are needing the www. in front of the domain-name.TLD
Where can I change this in program code
Re: Image not showing after UPLOAD in EDIT-Mode
Posted: Thu Sep 05, 2013 11:27 am
by Webmaster
The host name is returned via:
isset($SERVER['HTTP_HOST']) ? $SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME']
Check your configuration why $_SERVER['HTTP_HOST'] did not return the proper host header.