Questions tagged [services]
The Services module provides a standardized solution for integrating external applications with Drupal.
690 questions
0 votes
0 answers
184 views
Updating to 10.2.6 fails "autoconfigure" on core
https://stackoverflow.com/questions/78548043/drupal-updating-to-10-2-6-fails-autoconfigure-on-core Link to stackoverflow i opened. I still have the issue, while trying to upgrade to 10.2 or 10.3 . I ...
2 votes
1 answer
360 views
Change Priority of ServiceProvider class
I have a module, pod. I am attempting to alter another service (group.relation_handler.access_control.group_content_menu), by implementing Drupal\pod\PodServiceProvider::alter(). This is working ...
1 vote
0 answers
119 views
Contrib module service overriding not working
I am using the ‘Path Redirect Import module along with the Redirect module. I am trying to override its service ‘path_redirect_import.importer’ To do this, I have added a service provider and a custom ...
2 votes
1 answer
107 views
Using Drupal's Core classes as services
I have rather a general question that would help me to undestand using services in Drupal 8+ and when it is worth to do so. I have found a useful method createFromRoute which is part of namespace ...
1 vote
1 answer
269 views
Using REST API services to create content with field entity references that do not yet exist
I'm using Drupal 9.4 and trying to create content via the REST API web services where one of the field's in this content is a reference to a taxonomy term that doesn't exists until the current node is ...
0 votes
1 answer
355 views
Creating taxonomy terms via REST API using POST: proper formatting of json?
On Drupal 9.4 here and I want to create taxonomy terms via the api. Is there a good example of what I need to POST to an API end point?
1 vote
0 answers
44 views
How to give ability to create custom NID numbers via API REST post when creating content?
I'm using Drupal 9.4 and I tried to pass in a nid value in my POST via the Drupal api. I'm getting the error: Response: {"message":"Access denied on creating field \u0027nid\u0027."...
0 votes
1 answer
515 views
Creating content on via REST API using POST: proper formatting of json?
I'm trying to do a POST to create content on my site, but I get an Access Denied for creating field: changed even though I am an administrator role. When I remove the "changed" field in the ...
0 votes
1 answer
225 views
How to disable the option time_restriction that honeypot add to the forms
In the README file for the Honeypot module, it says: If you want to add honeypot to your own forms, or to any form through your own module's hook_form_alter's, you can simply place the following ...
1 vote
0 answers
42 views
Which hook is invoked after an endpoint creates a node?
I am using Services 7.3x with Drupal 7. I have setup an endpoint that creates nodes. After a node is created by the endpoint, I would like to retrieve some data from the new node and update a third-...
0 votes
0 answers
389 views
Title field returning ' where apostrophe should be?
I have a series of fields on a View. For some reason, any node title field with an apostrophe in it is being returned to my endpoint as Jen's Cupcake Store instead of Jenn's Cupcake Store. ...
2 votes
1 answer
1k views
Return AccessDenied for custom page
I've setup a custom page in my system which is expecting 2 parameters that will be used to generate part of the content on that page, I'm able to retrieve the information from my page, but I'm ...
2 votes
1 answer
2k views
Which is better way of injecting service to controller with __construct or $instance = parent::create($container)
I'm always using this way of injecting service to controller: <?php namespace Drupal\TestModule\Controller; use Drupal\Core\Controller\ControllerBase; use Symfony\Component\...
2 votes
2 answers
300 views
Retrieving nodes tagged by multiple terms
Let's say I have an articles content type, and a field_tags reference field (with multiple values referencing a "tag" vocabulary) To retrieve articles referencing, say, "tag1" or &...
0 votes
0 answers
68 views
Post Data to D7 from D9
How do I post data from Drupal 9 when a content is created, post data to Drupal 7 hosted in a different server to create node content. In Drupal7, I have enabled services module and created a resource ...