Problem/Motivation
When working with Views and outputting the field Instagram: Caption the unserialized string get printed instead of the actual caption text of the image. Here's an example of the output:
a:4:{s:12:"created_time";s:10:"1342723357";s:4:"text";s:49:"#finnkino #amazingspiderman #movies #movietickets";s:4:"from";a:4:{s:8:"username";s:15:"aleksijohansson";s:15:"profile_picture";s:73:"http://images.instagram.com/profiles/profile_42026258_75sq_1334577814.jpg";s:2:"id";s:8:"42026258";s:9:"full_name";s:16:"Aleksi Johansson";}s:2:"id";s:18:"239103310451420945";}
Proposed resolution
Add a field handler to drupagram_views_field_handlers.inc to output the correct array item instead of the whole unserialized string. Change the handler from drupagram.views.inc to match the newly created field handler.
Remaining tasks
Review by the community.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | drupagram-fix-caption-1696552-6.d6.patch | 2.1 KB | jfraz |
| #3 | Screen Shot 2012-08-12 at 11.54.23 AM.png | 225.18 KB | frichman |
| #1 | drupagram-fix-caption-1696552-0.patch | 1.21 KB | aleksijohansson |
Comments
Comment #1
aleksijohansson commentedFirst version of a patch to fix this issue for review. This adds a new field handler to drupagram_views_field_handlers.inc and changes the drupagram caption handler in drupagram.views.inc to use the new handler.
Comment #2
aleksijohansson commentedChanged the status of the issue to needs review.
Comment #2.0
aleksijohansson commentedChanged the issue to match the Issue Summary Template.
Comment #3
frichman commentedPatch looks good.
Comment #4
rmontero commentedFletcher, can you merge that patch in?
Thanks,
RM.
Comment #5
urlM commentedJust FYI for anyone that runs into the same issue I just had. When I downloaded the patch to the drupagram module directory via curl and tried to git apply, then I was getting the error of "fatal: unrecognized input".
But, if I downloaded the patch directly by right-clicking and "save link as" into the directory then git apply worked. Is there something I'm doing wrong with curl or has something been corrupted?
Comment #6
jfraz commentedDrupal 6.x-1.x git am style patch attached
Comment #7
rmontero commentedFixed, changes will be rolled out in the next release (7.x-1.2).
Comment #7.0
rmontero commentedChanged the remaining tasks.
Comment #8
mburnette commentedUsing Drupagram 7.x-1.2 and Views 7.x-3.8. Still getting an
&in stead of an ampersand (&) in my Instagram captions.https://dl.dropboxusercontent.com/u/41406170/Screen%20Shot%202015-01-22%...
Is there a patch I need to use or should the captions be using full/filtered text?