Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I'm trying to build flash news with text and image, using CCK, Views, Services, AMFPHP and Drupalsite classes in a simple Flash AS3 document.
I succeed to connect and get view datas in my Flash document. The same datas I get when I call the views.get method in the Services Browser :
Array
(
[0] => stdClass Object
(
[nid] => 24
[node_data_field_news2_image_field_news2_image_fid] => 26
[node_data_field_news2_image_field_news2_image_list] => 1
[node_data_field_news2_image_field_news2_image_data] => a:1:{s:11:"description";s:0:"";}
[node_data_field_news2_image_nid] => 24
[node_type] => news2
)
[1] => stdClass Object
(
[nid] => 25
[node_data_field_news2_image_field_news2_image_fid] => 27
[node_data_field_news2_image_field_news2_image_list] => 1
[node_data_field_news2_image_field_news2_image_data] => a:1:{s:11:"description";s:0:"";}
[node_data_field_news2_image_nid] => 25
[node_type] => news2
)
)
But the last problem I hit against is simply to get the file name and path.
I'm sure it might be simple when you have the fid, but I cant' get through for few days.
Thanks in advance
Redmu
Comments
Comment #1
gdoteof CreditAttribution: gdoteof commenteddid this ever get figured out?
I am stuck on exactly the same thing
Comment #2
gdoteof CreditAttribution: gdoteof commentedthis is solved in dev. make sure your views row format is 'node' and not 'fields'
Comment #4
ventoline CreditAttribution: ventoline commentedIam a newby in PHP and using drupal..
So, I have a very basic problem getting the data from a view.get call; i'm connecting but how to get down the array to extract the data?
Here is my code so far:
Thank you
Comment #5
merrick.christensen CreditAttribution: merrick.christensen commentedStill having issues with this problem. I'm not sure where to put the function above. I am using drupal 6. Thanks a ton.
Comment #6
mga CreditAttribution: mga commentedHi
I am at a loss with this:
If I use the "fields" row style, I get all the data I need in from the service except the photo. Similar to this problem (comment #59): http://drupal.org/node/329048#comment-1766626
If, as recommended, I change the style to "node" I get no data similar to: http://drupal.org/node/508388 and in this mode I cannot set fields so I am not sure what comment #2 in that post is talking about.
I am also using ImageCache.
Any help will be appreciated.
Comment #7
mcfilms CreditAttribution: mcfilms commentedHi MGA -- join the club. It appears that Services views.get is badly broken. I had views.get working briefly under a previous version of the Services 6.x-2.x-dev. But it is broken again in the 12-25-2009 version. This is true even when you use a views row format of 'node' and not 'fields'
Also, views.get was not working for me in the 6.x-0.15 release. It seems it is impossible to get text from cck fields and image locations via this method at the moment. I have decided to use XML data document for my project.
Comment #8
carlosg2 CreditAttribution: carlosg2 commentedMy solutions to fix this
Imagefield cck path with views
http://drupal.org/node/585812#comment-2076132
Imagecache service:
http://groups.drupal.org/node/21248
Best regards
Carlos
Comment #9
mga CreditAttribution: mga commented@mcfilms that sucks. I ended up parsing the file URL and from here re-constructing the ImageCache URL (since ImageCache uses the same filename as File but in different folders).
This kind of solves it for me as far as images are concerned but I still cannot get the taxonomy/tags data for the node. Any ideas on this?
Comment #10
voxpelli CreditAttribution: voxpelli commentedThis is kind of a duplicate of #654644: views.get method changed in DEV version - the Views Service is currently, partly due to lack of functionality in Views itself, returning the raw result of the database queries Views makes.
#654644: views.get method changed in DEV version suggests re-adding a specific workaround for the node row style which would run every row through node_load() and as such have all fields correctly populated.
Edit: Just a note - I know it can be frustrating to have an issue marked as a duplicate - I ensure you that I do this to have this issue resolved faster since it will make the discussion more focused.