Questions tagged [8]

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.

Filter by
Sorted by
Tagged with
7
votes
1answer
329 views

How do I implement routes?

How can I implement the most basic route in Drupal 8? What files do I have to write, and which classes do I need to implement?
0
votes
2answers
3k views

How do I PUT update on a node using services 3

I have a node with field_order_status field(not required) in list(text) type and radio button widget and I want to update a node(nid:95) but my sample JSON PUT content(application/json) throws Status ...
4
votes
1answer
10k views

What is the use of has_js cookie?

I am building an Android app that talks to Services module using REST endpoint. When I post any content without setting the "has_js=1" cookie to the REST endpoint in JSON format, my content is never ...
1
vote
0answers
157 views

How to use services with Drupal 6 on server that does not support CORS

I am using Drupal 6 for my current website. I have confirmed that the server(Pantheon) running my Drupal 6 website on nginx does not support CORS as of now. I want to interact with this site using ...
2
votes
1answer
2k views

REST Service - 500 Internal Server Error

I has been trying to set up a drupal REST Server in my computer (a clean drupal 6 installation). Unfortunately, I could not configure it. When I send a POST message (WITHOUT parameters); ht.p://...
2
votes
1answer
1k views

how to enable CORS in Drupal 6?

I want to use services 3 module to create node of a content type in my Drupal 6 website. I have enabled Services 3 module and configured the Rest Server properly. But when I make a post call to it, ...
5
votes
1answer
725 views

Drupal 8 HTML markup and semantics

When building a bespoke site a pet hate is that you start with a front-end layout that is semantically sound and robust, but when you try and create said layout as a theme in Drupal, by default the ...
1
vote
1answer
558 views

unable to get custom service to return result using services module

I'm learning about web services and implementing it in drupal 6 and am trying to use Services module with its REST server for implementing a web service to add a user. Since there is an existing ...
42
votes
10answers
48k views

Manually disable a module

In Drupal 7, I could manually edit the {system} table in the database to disable a stubbon module. In my Drupal 8 site, this table is gone. How can I manually disable a module in Drupal 8?
0
votes
1answer
451 views

How to rewrite the value of an array element in page.tpl.php

I'm totally new to PHP programming and modifying the values of Drupal output with php customisations, so sorry if this question seems dumb. In Drupal 6 I need to rewrite the value of the array ...
8
votes
3answers
2k views

Is it acceptable to modify Drupal's composer.json file?

Drupal adheres to the best-practice of never modifying core. Drupal 8 has a composer.json file built into core, if you need to add a third-party library, should you modify composer.json, or is there ...
5
votes
2answers
371 views

Will Lime the future test suite?

Now that Drupal 8 is going to be based mostly on Symfony, is the TDD / unit testing going to change too? For Symfony, Lime is the preferred testing suite. Is that true for Drupal 8 too?
2
votes
1answer
1k views

Panels vs theming

Panels versus themes: What is the best way? Since Panels is included in Drupal 8 core, isn't it the way forward? Do we still need to design static HTML pages and then integrate them with Drupal, or ...
7
votes
1answer
2k views

Theme folder in drupal 8

In Drupal 8, the theme folder for contributed themes seemed to have moved. Where do themes go in drupal 8?
0
votes
1answer
296 views

Post-installation PHP crash [closed]

I decided to give a shy try to Drupal 8. Installation went quite smooth, but when everything was ready to hit the home page I was delighted with the following error: CRASH: PHP segmentation ...
3
votes
1answer
679 views

How much of Drupal 8 will rely on or be compatible with Symfony? [closed]

Now that Drupal 8 is being redeveloped with Symfony, and we are just about to go into the code freeze so that early adopters can start playing with it, what will it affect? Will we be able to write ...
3
votes
0answers
2k views

Services Module - Access Denied for User Admin [closed]

I'm trying to get a REST server going with Services, testing locally. It seems like things are running, but I'm denied from using any of the resources, even as an admin! I'm trying to follow the ...
0
votes
3answers
65 views

Allow public to edit content type

I have a content type that users can vote on so I need that content type to keep tally of the votes. I'm assuming I need to allow the public to edit that content type but, unsure how to go about ...
0
votes
1answer
643 views

How do I set the path to a custom view style template? [closed]

I have created a custom view style in a module. It shows up in the list of view styles, but when I try to output the resulting block I get the message: Warning: include(/var/www/core/modules/views/...
2
votes
3answers
2k views

REST won't work

On a Drupal6 installation I have the REST service enabled (6.x-3.3). All seems to setup correctly, but I cannot query any data and get always 404 Not Found. What is the correct URL for retieve node #...
1
vote
1answer
2k views

How do I attach files to nodes?

I need to add files to multiple value file field using drupal rest api (restws module). return format of restws is something like this : "field_files": [ { "file": { "uri": "...
2
votes
1answer
413 views

Is Drupal 8 with views in core stable enough to be used as a simple blog?

I want to start using the new drupal 8 codebase, but I was wondering if I can use it in its state now as a simple blog using views.
2
votes
0answers
54 views

Drupal Services returns javascript after results

I am using Services Views and have a view that returns the json array, plus a script tag (the default jQuery.extend(Drupal obj...). I do not want this jQuery.extend script to be added for a services ...
15
votes
2answers
7k views

How to create a empty module? [closed]

What is the most basic valid module one can create in Drupal? It would be useful to have a simple blueprint available, for anyone just getting started with Drupal.
1
vote
1answer
2k views

POST request trying to make a Session authentication in the REST SERVER return a HTML error 406 Not acceptable

I have a REST server in drupal working. I get data if I go to the server endpoint. In Navigator: http://localhost/drupal-7.19/restserver/user/ Work fine. I have created a PHP to make the Session ...
1
vote
3answers
2k views

Where place spyc library dependencies

I have a issue trying to activate REST SERVER from services. I need to add this library. I'm using drupal 7.19 on Ubuntu. Reading this question, I add the spyc.php in 'servers/rest_server/lib/' But ...
4
votes
2answers
2k views

Creating Drupal 8 route for AJAX requests

How should I implement a callback to a single Drupal class (in my case it's Transliteration). I don't need a full Drupal load/bootstrap, but one independent class. The purpose of the AJAX code would ...
0
votes
2answers
1k views

How do I download a JPG file from the server?

I have written a custom module in which i have a download button like given below. $form['topics_info_graph']['download_graph'] = array( '#type' => 'button', '#value' => t('Download Graph'),...
2
votes
0answers
502 views

using facebook oauth with Rest Server

I'm building an Android app that communicates with Drupal Services 3 through Rest Server module. On Drupal side, I'm using Facebook oAuth module for authentication. so I want to let the app users ...
9
votes
1answer
812 views

How can I install composer packages with drush make?

How does one include composer package in a drush make file? The more general answer, the better. There's already a composer drush module allowing drush dl to handle composer packages, but that ...
2
votes
0answers
634 views

Retrieve site menus using REST API

I have a site where menus are created using Site building -> Menus -> List menus -> Primary links -> Add item option. Some of them have sub-menus under them. I want to retrieve these menus ...
3
votes
1answer
833 views

Using oauth_common in a module to authenticate with a web service?

I'm wanting to use my Drupal 7 site to communicate with an external API that must be authenticated via 3-legged OAuth. It seems there's a lot of documentation around about using Drupal as the OAuth ...
5
votes
2answers
3k views

Services module: What is 'Index' operation?

D7 / Services 3.2 retrieve / create / update / delete are very straightforward, make senses to me that matching 'CRUD', I don't understand what 'index' here does? Thanks.
8
votes
2answers
1k views

Drupal Services OAuth

I have been working on this issue for a couple weeks now, and I can't find a solution for the life of me. The fact that I have found no decent documentation (on Drupal's website, or anywhere else) is ...
3
votes
1answer
3k views

Getting the entire index of nodes from REST API

I'm looking for a way to get all the nodes to be shown on my REST service. When I query the endpoint index http://server/api/node it only returns 20 results. Are there any additional parameters I can ...
5
votes
4answers
2k views

Services 3: Setting taxonomy terms on node creation/update

For a custom node type, I have defined a field that is to hold an unlimited number of values from a taxonomy vocabulary that I defined. This is what it looks like: [field_taxonomy] => Array ( [...
4
votes
1answer
425 views

Failure getting nodes from terms via the rest api

I have added a REST web service in Drupal and all content is tagged with taxonomy. I'm now trying to acquire all related nodes to the terms. First I'm calling taxonomy_vocabulary/getTree along with ...
1
vote
1answer
153 views

Creating SearchAPI searches without using Views

I am using SearchAPI on a website with 20,000 entities indexed. Searching through them with SearchAPI is pretty simple. Its fast. I want to keep it as fast as possible with very low overhead, without ...
2
votes
0answers
121 views

REST/Services: Only able to retrieve index. Everything else result in http error 500

I am pretty new to Drupal, and I'm trying to get a webservice running on my Drupal 7 site. For testing purposes, I made a Rest-service, with NO authentication, and all resource's added to it. I ...
1
vote
1answer
871 views

How can I use REST API to create a node with status/tags/data

Follow the Services module document, I can only create nodes using REST API with type, title and body. But I am not able to create nodes with more parameters such as tags, status and date. Need help.
-4
votes
1answer
3k views

Do we really need Blog module in Drupal 7 (and 8)? [closed]

In Drupal 7, the Blog module do not have any option to change the URL. Because I want a different URL, I build blogs without the Blog module. For blog pages, I make it using Views and theme ...
0
votes
1answer
242 views

What will be the post parameter when specifying vocabulary term?

I am trying to create a drupal node with a iphone app via rest server. I want to send the request to drupal as json. I have added a taxonomy vocabulary for categorizing the nodes. Specifying a ...
3
votes
1answer
4k views

Getting views data as a REST service

I need a way to get the output of a view as a REST service in JSON format. I read about the RestfulWS and the Services modules, but I didn't find enough documentation. Are these straight forward, or ...
5
votes
1answer
596 views

Using Drupal 7 multisite framework for a ReSTful API and Auth Strategy

My Situation I have a small app with a public interface. I'm interested in making an API for this to be used in a mobile environment and even eventually as a public API. I want to keep it simple with ...
5
votes
3answers
13k views

How do I consume REST as a client?

I need to import on node save information from a third party REST server and map that data to an entity that references the node saved. There will be a field in the node that the user can input an id ...
7
votes
2answers
3k views

drupal HTTP POST data

How do i send HTTP POST/GET data to drupal? for example: I've got a html form: <form action="mydrupalcite.com" method="get"> <input type="text" name="title" /> </form> how do ...
2
votes
1answer
2k views

Drupal7 REST webservices API KEY vs OAUTH two-legged authentication for clientside JS consumer library

I'm working on an Drupal7 API, using REST services, and consumer JS library (no server code). I'm not trying to authenticate/authorize the end-users, only to identify and allow access to the '...
3
votes
0answers
3k views

Clear example of Service module authentication and authorization

I've been playing around with Service module, which it seem the best module for exposing web service specificaly I have REST architecture. Nevertheless haven't been able to clear how does the ...
3
votes
2answers
1k views

Getting Parse Error during installation of Drupal 8

I am getting the following error while Installing Drupal 8. Parse error: parse error, expecting T_CONSTANT_ENCAPSED_STRING' or'('' in var\www\html\core\includes\bootstrap.inc on line 3 When I ...
1
vote
1answer
1k views

Allowing authenticated users to create files through Service/Restful (Drupal 7)

I have setup a restful server running with the services module. I have also enabled to file resource. Using this setup I can successfully login from my client application, authenticate the session, ...