Closed (fixed)
Project:
Services Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2012 at 09:00 UTC
Updated:
21 Jul 2016 at 17:29 UTC
Jump to comment: Most recent
Comments
Comment #1
ygerasimov commentedFormatter that returns json simply does json_encode. So you need to make sure that values that are returned by views are integer type and not string. I would try to do this with hook_views_post_execute(&$view) for example.
Comment #3
drupalove commentedSince the module implements
drupal_alter()this works for me:Thanks.
Comment #4
timmay commentedDrupalove,
I'm trying to implement your fix in #3, but haven't gotten it to work yet. Are you inserting the function into services_view.module?
Thanks!
Comment #5
drupalove commentedHi Timmay,
You need to insert it in your own module in the .module file. Then enable the module and clear the cache. To create a module you need to create a my_module.info file and a my_module.module file with the above hook. Place both files inside a directory named my_module.
See creating Drupal modules: https://www.drupal.org/developing/modules/7
Please confirm if this works for you.
Thanks.
Comment #6
timmay commentedThank you,
I haven't had time to try this yet, and in the meantime figured out how to parse the strings into numbers in the framework I'm using. I will try and implement this at some point and confirm with you then.
Thank you!