Jump to:

22998 Posts in 11620 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » [Solved] Image Thumbnails in Gridfield

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1 2 3
Go to End
Author Topic: 5167 Views
  • tmkp
    Avatar
    Community Member
    40 Posts

    Re: [Solved] Image Thumbnails in Gridfield Link to this post

    Done.
    I was kind of happy with jak's workaround though : )

  • tmkp
    Avatar
    Community Member
    40 Posts

    Re: [Solved] Image Thumbnails in Gridfield Link to this post

    On a different note.. Toying around with the example I've posted above, I'm finding that every time i add a record or publish the ContactList Page I'm getting taken back to the Content tab instead of my Contact list. Click orgies are surely to ensue.

    Found a corresponding ticket here that was closed 16 months ago.

    While you're on it, can anyone reproduce this behaviour?

  • martimiz
    Avatar
    Forum Moderator
    1035 Posts

    Re: [Solved] Image Thumbnails in Gridfield Link to this post

    I can now confirm that my solution no longer works on any of my installs... (on 3.0.0 stable now)

    Also: I cannot see any uploaded images in the listview of the Files section. Something must have changed after v beta3 (since it worked there, tested it again just now). Looks like StripThumbnail and other functions like it just aren't called any more...

  • UndefinedOffset
    Avatar
    Community Member
    27 Posts

    Re: [Solved] Image Thumbnails in Gridfield Link to this post

    ya something changed in GridFieldDataColumns in RC1 it still doesn't work in 3.0 final. I've managed to diff beta 3 and final but I'm not sure why it would be broken. As far as I can see it shouldn't have worked in beta 3 it should have been entity encoded in beta 3.

    Its kinda too bad that this is broken it was really nice to be able to say Image.CMSThumbnail in your summary fields and it would just work. Maybe it will get addressed in the hackathon tonight, and come in 3.0.1

    Attached Files
  • tmkp
    Avatar
    Community Member
    40 Posts

    Re: [Solved] Image Thumbnails in Gridfield Link to this post

    Confirming for 3.0.0 stable. Thumbnails are broken in gridfields, including the files section. Filing a ticket now.

    Edit: http://open.silverstripe.org/ticket/7590

  • martimiz
    Avatar
    Forum Moderator
    1035 Posts

    Re: [Solved] Image Thumbnails in Gridfield Link to this post

    Looks like the problem is indeed the GridFieldDataColumns->getColumnContent() function: if you replace line 132:

    $value = Convert::raw2xml($gridField->getDataFieldValue($record, $columnName));

    by the beta3 version

    if(strpos($columnName, '.') === false) {
       $value = $record->XML_val($columnName);
    } else {
       $value = $this->getValueFromRelation($record, $columnName);
    }

    It works again. But obviously there is a reason for the code change. I've done some tracing to find out where it goes wrong, but I can't quite grasp the reason, so I guess we'll have to wait a bit...

  • UndefinedOffset
    Avatar
    Community Member
    27 Posts

    Re: [Solved] Image Thumbnails in Gridfield Link to this post

    I'm kinda hoping that this gets fixed during the hackathon today and comes to us in 3.0.1, but we'll have to wait and see. I'd bug Ingo (chillu) about it on the channel but he's probably very busy . At least with the ticket raised hopefully it will get seen and fixed.

  • neilcreagh
    Avatar
    Community Member
    88 Posts

    Re: [Solved] Image Thumbnails in Gridfield Link to this post

    Any updates on this from the hackathon?

    5167 Views
Page: 1 2 3
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.