All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
37 views

Route access checks for REST/JSONAPI requests

I'm currently trying to fully decouple an existing Drupal8 site. As much as I've read about JSONAPI and REST (both in core) there's one thing I'm still puzzled about. A custom route that calls a ...
0
votes
0answers
27 views

How to check “_custom_access” for whole website and not module/path?

example: path: '/example' defaults: _controller: '\Drupal\example\Controller\ExampleController::content' requirements: _custom_access: '\Drupal\example\Controller\ExampleController::...
-1
votes
1answer
33 views

Show a content type's subfield instead of the default title in Drupal 7 when using an Entity Reference field

I am editing a large Drupal 7 website. In a part of this site, decisions are shown. Each decision can contain related decisions. There is a custom content type decision, in which there is a field that ...
-1
votes
1answer
40 views

What is the logic of create method in ContainerInterface class & its argument when being used and how its related to argument of the construct method?

<?php namespace Drupal\custom_changes\Plugin\Block; use Drupal\Core\Block\BlockBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Symfony\...
0
votes
1answer
28 views

Inject a theme setting form into a block

Is there a way to inject the theme settings form into a block so it could fix to the left-hand side of the page when admin logins? The url that would be injected into the block would be admin/...
-1
votes
1answer
40 views

Site keeps redirecting to core/install.php

I keep having this problem of drupal redirecting to core/install.php as shown below: I already set the max_allowed_packet to 64MB on AWS RDS. I am not sure what else I am missing. Please help The ...
0
votes
1answer
30 views

How to get the form field label of a multi-value field

In hook_form_user_form_alter I need to get the title of each field. When I dump a normal (single-value) field #title is an array value, like this: array (size=13) '#title' => string 'Name' (...
0
votes
0answers
10 views

Only import Feeds item if EITHER of two fields have values

I am using the Feeds module on D7 to import some jobs into my Drupal instance. I also have the Feeds Tamper module installed to clean up the data and make sure certain fields have data in them before ...
0
votes
2answers
28 views

Defaulting a value for a new boolean field added to an existing content type with content?

We have a Drupal 8 site. For one of our features, I added a boolean field called 'Pinned' to a our Blog Post content type. As I added the filed as a filter criteria to views, I noticed that, no ...
0
votes
0answers
53 views

Call to a member function access() on null in …BlockAccessControlHandler.php

I am getting two errors on my local Drupal 8 site. First error: "The website encountered an unexpected error. Please try again later." Second error: "Fatal error: Call to a member function access() ...
-1
votes
1answer
20 views

User password reset link leads to access denied page

Command: drush uli Output: http://default/user/reset/uid/..../...hash.../login The output URL normally logs you in automatically, but it gets takes to access denied error instead.
0
votes
1answer
30 views

Fatal error: Declaration of … must be compatible with [closed]

/** * {@inheritdoc} */ public function blockForm($form, FormStateInterface $form_state) { return []; } in BlockBase.php vs /** * @inheritdoc */ public function ...
0
votes
1answer
21 views

Why is my migration status table empty?

I wanted to delete all migration modules because of that I use drush config-delete migrate_plus.migration.ID After that, I create a new migration module and enable it with drush en migrate_NAME ...
0
votes
1answer
24 views

Restrict access to ECK full page, but allow embedded

Following the Lullabot article on how to embed anything in a wysiwyg with Entity Embed and friends we're using this to embed a custom entity type created with ECK (Entity Construction Kit). The ...
0
votes
2answers
48 views

Ajax validation only works when I am logged in as an administrator

I have created a custom contact form and I have set up an ajax inline validation. My form works very well. But Ajax validation only works when I am connected. When I am not logged in as an ...
2
votes
1answer
23 views

User register endpoint showing notifications

I'm trying to setup an endpoint for a 3rd party app to allow users to be created on my site through a REST endpoint, which is mostly working so far, although, I've just navigated to my site through ...
0
votes
2answers
20 views

delete scheduled tasks fails when task identifier is account:uid

I have an action set as a scheduled task that deletes a user, that seems to be working fine: { "rules_delete_unregistered_user" : { "LABEL" : "Delete unregistered user", "PLUGIN" : "action ...
-2
votes
1answer
29 views

Default moderated content view has an error message

The following error appears in the default state at Home>Administration>Structure>Views>Moderated content>Edit. No valid values found on filter: Content revision: Moderation state. What is wrong?
-2
votes
1answer
19 views

What is the use of page_cache_fastpath ? When and how should we implement it?

When I am debugging drupal, I came across the concept page_cache_fastpath. I want to know the use of it.
-3
votes
0answers
26 views

ccs and Less: how does it work together

I need some help to understand how works theming within Drupal. I have a Drupal 7.67 on a shared hosting and I don't have nodeJs so I can't work with the command line. I use the CorporateClean theme ...
0
votes
1answer
49 views

Should we document AJAX-callback parameters?

Considering the PHPCS warning: phpcs: Hook implementations should not duplicate @param documentation Is there any way to tell PHPCS that the function is an AJAX-callback (so that such warnings are ...
0
votes
0answers
30 views

How to make inline-files private based on role/permission by term

I am using permissions by term (https://www.drupal.org/project/permissions_by_term/) to manage a member-only area on my site. That works out easily and as it should. However, files uploaded in ...
0
votes
0answers
15 views

Change the order of line items on checkout

How can I change the order of the line items on the checkout? What I have now is Subtotal (excl. VAT) VAT Shipping cost (excl. VAT) Order total (Incl. VAT) Though the calculation is correct, this is ...
1
vote
0answers
40 views

How to preload generated styles and scripts?

I'm trying to preload my main css and js files - these files are generated using the AdvAgg module. I've tried using the hook_preprocess_html in a theme and in a module, but in the $variables['page'][...
0
votes
0answers
66 views

How to do batch process of larger CSV files? [closed]

I have a CSV file with more than 10K records. From the Admin user able to upload, then via batch_set we need to process 1K records at the time. ( so it will be not timeout on server). I already made ...
-4
votes
1answer
26 views

node access permission [closed]

i have created a custom block where i retrieve few fields value from a content of specific content-type(called project)and display it as a card in the site. but i don't want users who have logged into ...
-3
votes
1answer
30 views

Required fields [closed]

I'm doing a migration from csv to Drupal 8 and I'm not sure how to handle the required fields. My content type "Department" has 8 required fields, should I use the plugin "skip_on_empty" in every ...
-2
votes
0answers
23 views

Advance PDF template

The latest dev version of Webform 8 now offers the ability to format the attachment pdf via twig. I would like to be able to add css or to attach a css file to the twig but it does not seem to be ...
-2
votes
0answers
14 views

Is there a way for users to follow a taxonomy term?

I know there are RSS feeds for each taxonomy page. But I’m wondering if there’s a way for users to follow each taxonomy term, then I could display a view of content with taxonomy terms the user has ...
-2
votes
1answer
23 views

Module or method for handling my scheduling needs?

I'm using Drupal 8 to build a website that I will use to manage a D&D Campaign. I'm looking for a way to set up session planning. I would like something where I can create time slots where I am ...
1
vote
1answer
32 views

Drupal::entityQuery

This is the official Drupal::entityQuery function definition I found public static function entityQuery($entity_type, $conjunction = 'AND') { return static::getContainer() ->get('entity....
0
votes
0answers
10 views

Saving download settings as a template

I've just created my webform which I want to use as a template. I check the Allow this webform to be used as a template mark but upon checking the template I saw that my Results-Download settings have ...
0
votes
1answer
12 views

Translation server suggests translation with old date

in admin/config/regional/translate/settings page, i had Check for updates set to never and translation server to Drupal translation server and local files. i recently updated my site drupal version ...
0
votes
1answer
31 views

How do we set required for new & optional for existing fields - when adding basic field to content type?

How do we set required for new & optional for existing fields - when adding basic field to content type? When using Drupal 8 following this how to article shows the steps to take to add a basic ...
-1
votes
0answers
20 views

ArchiveTar addModify fails when the passed file_uri has a white space in the filename

I trying to build an export function for a node in Drupal 8. This function needs to export a node's data as an Excel file and attached files as a tar.gz file. Like the webform module's download ...
1
vote
1answer
25 views

hook or similiar to automatically send any webform submissions to an email address, without manually adding a handler to each existing webform?

We have a Drupal 8 site running Webform 8.x-5.2. We have a special role, "Webform Editor", who is not a developer, but they are trained to create the webforms that we need for our organization. We'...
1
vote
1answer
63 views

How do I instantiate a custom class with dependency injection?

I am relatively fresh to the DI party and am struggling to get my head around how exactly to use Dependency Injection. I understand that I can pass requirements as part of a service, but what about in ...
-1
votes
0answers
12 views

Ajax_command_replace a form, old form errors persists

I have a form made with 3 checkbox and one of them have a value that change in function of precedent forms choices. So I use the ajax_command_replace command to refresh my form like this : $...
0
votes
1answer
38 views

Add separate div after a form

All I want to do is add a new <div>, ideally just after a <form> element. I have a self-written module that generates a payment form, using some routing, like this: mymodule.applications....
1
vote
1answer
38 views

How to make Shipping services available in Rules tokens (data selectors)? [closed]

I am using D7 and Drupal commerce, with a flat rate shipping service. In my country the VAT for both products and shipping costs must be included in the total VAT amount. But the only line items ...
-2
votes
1answer
29 views

How can I create a new Paragraph item programmatically in an Ajax form handler?

I need to add Paragraph fields programmatically to an entity in an AJAX handler. This is my AJAX callback and how it's added: function mymodule_form_alter(&$form, \Drupal\Core\Form\...
0
votes
1answer
11 views

Is it possible in a PATCH call to restrict edition by field?

I am using RESTful Web Services in Drupal 8. I have successfully made a PATCH to edit some fields of a content. What I want to do now is to restrict the edition to only some fields of the content. ...
2
votes
0answers
36 views

What does this allowed_html setting mean?

allowed_html: <a href hreflang title id target rel class=""> I copied this from the settings of the filter_html plugin in a filter format config entity. I am intrigued by the class="" part. I ...
0
votes
0answers
18 views

Field collection required field is not working

We have a set of field collection with required and non-required fields. The actual requirement is the form should be submitted only if all the required fields were filled. But it fails to work on ...
-1
votes
0answers
13 views

SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)

SMTP Authentication Support module(1.7) suddenly stopped working in Drupal 7. I played with different configurations in SMTP Authentication Support with no success, opened inbound and outbound port ...
1
vote
1answer
56 views

Invalidate Internal Page Cache at certain times in a day for anonymous users

Let say I have a webshop open from 9am to 11am (data coming from config). When the shop is closed, I would like to display a message (shop closed) and when the shop is open, my commerce product should ...
0
votes
1answer
34 views

Drush cannot find your database connection details

I try to install open social using drush-8.3.0 and drupal-8.7.5. The first step is to run composer create-project goalgorilla/social_template:dev-master public_html/peer/opensocial --no-interaction. ...
-3
votes
0answers
21 views

Webform submission plugin for voting - internet competition

I have question about webform submission plugin for voting - internet competition. I want use Webform submission plugin to collect votes from users on my page. There will be put names , email, country ...
0
votes
0answers
16 views

Drush isn't connecting to my database

I have a Drupal install on a CentOS development server. Running drush from outside my web directory returns as you'd expect (a list of Drush commands). Running drush from inside my web directory ...
0
votes
0answers
36 views

How to bypass “allowed values” validation for a select field (list_string)?

At the user account form, I've created two select fields (of type list_string) for state and city. The state field has a list of states for its allowed values config, and the city field has no values ...

15 30 50 per page