Jump to content

Image field functionality not working after copying site from dev server


CliffG
 Share

Recommended Posts

Hello,

I copied my 2.2.14 install from my MAMP server to the web server where it will eventually reveal itself to the world. Everything works except for the image field function. I can select an image to upload and have it recognized by the system, though there is no description field -- probably a vital clue. I click Save, look at the admin page again -- no image.

I've done all the troubleshooting I can think of:

The permissions on the Assets directory and directories within are 755.

The image field type & inputfield type is Image.

The number of rows for the description field is 1.

I deleted the cache from the dev server.

I'm pretty sure there's a simple answer for this. Could someone please provide it?

Many thanks,

Cliff

Link to comment
Share on other sites

Hi cliff,

Can you check the Javascript Console for errors?

Also you can enable $config->debug=true in /site/config.php.

Check the response of ajax requests, maybe there are some server side errors?

Link to comment
Share on other sites

Wanze,

Thank you for your help.

The debugger shows the following:

33. SELECT field_images.data AS `images__data`,field_images.description AS `images__description` FROM `field_images` WHERE field_images.pages_id='1011' ORDER BY sort [0 rows] [0.0001s, 0.0082s, 0.14133191108704s]

 

$_POST

Array

(

)

which I interpret (correctly?) to mean that it gets the request but fails to execute it.
 
The JS console turns up the following (in screenshot), which I think pinpoints the problems. I don't have the technical chops to deal with this without a translation, though:
 
post-648-0-56181300-1362353041_thumb.png
 
I'm guessing that something is munged or missing and it's throwing a syntax error.
 
Cliff
Link to comment
Share on other sites

The "501 Method Not Implemented" concerns me a bit, as that sounds like maybe the server has some firewall, mod_security, or something specifically blocking file uploads. But before we look more at that, I would double check that your /site/assets/files/ really is writable. 755 permission isn't something that's going to work on every server. Also, when you transfer a file from dev to production, it's possible those permissions are lost, or are not consistent with the permission needs of the server. You might want to try installing a fresh copy of ProcessWire (dev branch) on the server in a subdirectory. When it reaches the "file permissions" section (same screen as DB config), see what it recommends as a starting point. You may ultimately have to adjust the permissions of the files that are in /site/assets/. Some FTP clients may provide the option to do this for you, in one shot. If you have SSH access, you can also do it easily with "chmod -R ...". 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...