No permission for views_service module
I encountered another problem that I am assuming has to do with the lack of permissions for views_service.
First, my setup is completely up-to-date.
The problem is that from Flash on my desktop Services doesn't return any results from Views, ie the returned object is blank. When I change to a get a node, it works. The returned object contains all the pertinent information.
The strange thing is that under user permissions there is no mention of permissions for "views_service module." I am thinking the problem is that I cannot allow an "anonymous user" the option to "load any views data."
Any ideas as to what to do?
BTW - here is the code that I am using (save for appropriately commenting and uncommenting myService.call, and changes to the url and view name.)
package
{
import flash.display.MovieClip
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
import flash.net.Responder;
public class mainPromo extends MovieClip
{
private var myService:NetConnection;
private var myServiceURL:String;
private var connectResponder:Responder;
private var viewResponder:Responder;
private var sessionID:String;
/
* Contructor
*/
public function mainPromo()
{
trace("in mainPromo");
myService = new NetConnection();
myService.objectEncoding = flash.net.ObjectEncoding.AMF3;
myServiceURL = "URL TO AMFPHP";
connectResponder = new Responder(getSessID, onError);
myService.connect(myServiceURL);
myService.call('system.connect', connectResponder);
}
/
* getSessID
*/
private function getSessID(returnObject:*)
{
trace("in getSessID " + returnObject.sessid);
viewResponder = new Responder(getViewInfo, onError);
sessionID = returnObject.sessid;
myService.call('views.get', viewResponder, sessionID, 'VIEW NAME');
// myService.call('node.get', viewResponder, sessionID, NODEID);
}
/
* getViewInfo
/
private function getViewInfo(returnObject:)
{
trace("in getViewInfo " + returnObject);
for (var item:* in returnObject) {
trace(item + ": " + returnObject[item]);
}
}
/
* onError
*/
private function onError(f:*)
{
trace("Error" + f);
for (var item:* in f)
{
trace(item + ": " + f[item]);
}
}
}
}
Similar Issue?
Hi,
i am trying to work with the views service and get access denied even when I try executing the request from Drupal Admin. I have every permission granted for the user role so to remove any question of access privileges and am logged in as user 1.
I have Use Keys and use sessionID selected. The service works if I turn this off.
Does anyone have any idea how to make requests to this service?
Patched?
Is your setup fully patched? I had a similar issue as reported here http://groups.drupal.org/node/22706.
Everything else works but this...
I've tried other services like user.login and it works. Views.get even works from within Drupal just not from Flash. Can anyone provide some insight?
function views_service_get()
I dove into the function views_service_get() to see if I could figure out what is going on. My findings so far are that the view itself is being called, but the property $view->result is empty when called from Flash. It is correct when called from within Drupal.
Anyone?
Has anyone successfully used Views2 with Services1? I am starting to believe that it is currently not possible.
Have you tried this patch
Have you tried this patch http://drupal.org/node/329048#comment-1677800 ?
Patch doesn't solve this problem
I hadn't tried that patch. It doesn't solve my problem. I get an empty div tag with this patch in place.
<div class="view view-nhm-main-page-promo view-id-nhm_main_page_promo view-display-id-default view-dom-id-1"></div>Thanks for the thought though. I appreciate it.
You applied the patch - and
You applied the patch - and set $format_output = TRUE? With the above patch only when $format_output is TRUE you should get your HTML, otherwise you should get the $view->result as an array.
Have you tried it on a different clean drupal installation?
[Solved] Clean install
It turns out that something is awry with my original Drupal install. I started a clean install and this appears to be working.
Cool. Have you apllied the
Cool. Have you apllied the above patch?