Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » DOM and Uploadify image not attaching

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3 4
Go to End
Author Topic: 4814 Views
  • aarono
    Avatar
    Community Member
    34 Posts

    DOM and Uploadify image not attaching Link to this post

    Hi guys

    I have got SS 2.4.5 and the latest build of DOM and Uploadify as at 21st Feb.

    Whenever I try to upload a new image into the DataObject using Uploadify, it gets to 100% but then doesn't refresh and attach the "Attached files". However it does actually upload the image and transfer it into the correct folder, as well as adding it to the File table in the database with the correct ClassName, but not into my DataObject table.

    If I copy the request URL into the browser (EditForm/field/MediaItems/UploadifyForm/field/UploadedFiles/refresh?ctf[MediaItems][start]=0&ctf[MediaItems][per_page]=10&ctf[MediaItems][showall]=0&ctf[MediaItems][sort]=SortOrder&ctf[MediaItems][sort_dir]=&ctf[MediaItems][search]=&ctf[MediaItems][filter]=&ctf[MediaItems][view]=grid&ctf[MediaItems][imagesize]=100&FileIDs=131) then i just get a blank page, even though the FileID 131 does exist in the database. I cant seem to find the correct refresh function to be able to start debugging. I found one inside FileUploadField.php in the Uploadify module, but it wont send any info the browser?

    Can anyone point me in the right direction? I need to get this sorted ASAP as client needs website to be live, so any help would be greatly appreciated

    UPDATE: ok so i have just tried to upload a much smaller image, and it worked fine. The smaller file is 30kb as apposed to 400kb, but 400kb is still quite small, so I'm guess there is a very low timeout setting somewhere? I have checked my upload limit and its 24M so its not that.

    Cheers,
    Aaron

  • aarono
    Avatar
    Community Member
    34 Posts

    Re: DOM and Uploadify image not attaching Link to this post

    Anyone? Need this to go live tomorrow

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM and Uploadify image not attaching Link to this post

    Can you check the response from the server? If the upload is completing, you should see an ajax request that is supposed to return the ID of the new file. It may be returning a server error.

    Otherwise, use Charles to packet sniff the request, and you should see some sort of error coming back, provided you have your error reporting cranked up.

  • aarono
    Avatar
    Community Member
    34 Posts

    Re: DOM and Uploadify image not attaching Link to this post

    Hi UncleCheese,

    Thats what confuses me the most - it doesn't throw any errors at all. The upload returns a 200 complete response and the refresh does as well. The upload request also returns the new file ID

    Im viewing the requests in Charles

    Thanks for your help with this

  • aarono
    Avatar
    Community Member
    34 Posts
  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM and Uploadify image not attaching Link to this post

    It's not making a whole lot of sense to me. Everything is coming back 200. Do you have the content of the response for the /refresh/ request?

  • aarono
    Avatar
    Community Member
    34 Posts

    Re: DOM and Uploadify image not attaching Link to this post

    No it doesn't make any sense to me either. This is the raw response from the refresh request:

    HTTP/1.1 200 OK
    Date: Wed, 23 Feb 2011 01:49:48 GMT
    Server: Apache/1.3.41 (Unix) FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.8g PHP/5.2.17 with Suhosin-Patch
    X-Powered-By: PHP/5.2.17
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Set-Cookie: PastMember=1; expires=Tue, 24-May-2011 01:49:49 GMT; path=/new/; httponly
    Transfer-Encoding: chunked
    Content-Type: text/html

    This is the responses from the upload request, for what its worth:

    HTTP/1.1 200 OK
    Date: Wed, 23 Feb 2011 01:49:35 GMT
    Server: Apache/1.3.41 (Unix) FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.8g PHP/5.2.17 with Suhosin-Patch
    X-Powered-By: PHP/5.2.17
    Set-Cookie: PHPSESSID=aecdspi9tclkm0b2rpm5p0bi56; path=/new/; HttpOnly
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Set-Cookie: PastMember=1; expires=Tue, 24-May-2011 01:49:45 GMT; path=/new/; httponly
    Transfer-Encoding: chunked
    Content-Type: text/html; charset="utf-8"

    186

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM and Uploadify image not attaching Link to this post

    Ah, I just remembered. I've seen this problem before. Try adding:

    ContentNegotiator::disable();

    to your _config.php.

    4814 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.