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
0
votes
1answer
36 views

How to restrict access to view a block for a certain role? [duplicate]

I have some custom roles such as Premium Membership and I don't want to allow access to this category. The authenticated role is included to Premium Membership or Moderator users because every ...
1
vote
1answer
33 views

Date picker libraries are missing in specific page

I am adding jquery date picker feature using date field in profile edit page it is working fine . But when i am adding same jquery datepicker in custom module, datepicker function is not working. ...
0
votes
1answer
22 views

How do I programmatically “place” an order?

When making a payment through the Commerce admin interface; the Orders do not get completed. I can see a Place Order button when viewing a cart Order; which seems to do the trick. I need to do this in ...
-3
votes
1answer
143 views

How to implement markdown tables in Drupal? [closed]

In my GitHub account, I have this markdown file which is a table of at least two columns in which the first column is of a base language and the second (or later) is of a new language to which I ...
0
votes
0answers
17 views

unknown Ajax call on custom views_exposed_filters while changing dropdown list

I have two exposed filters as select fields (County and District) using Hook_form_ID_alter. I'd like to alter the #options of District base on the County I selected to display related options. But ...
0
votes
0answers
35 views

How can I limit access to the text format drop down in a paragraph? [duplicate]

I'm trying to limit the access for users to change the value of text format dropdown but I can't seem to find the correct dropdown to alter. Here's what I have so far but it seems to disable access to ...
0
votes
0answers
36 views

I cannot configure the site during installation

I have installed MAMP and Drupal 8 into my windows 10 machine. I can successfully setup database and installed modules but while setting up site, i am getting below error. Call to a member ...
0
votes
1answer
34 views

Pre-populate an entity reference field (media image) when creating a node

I am trying to open a node creation form (for example, /node/add/article) and to have an Entity Reference field pre-populated. My field (field_image) is an Entity Reference to a Media of type Image ...
0
votes
0answers
34 views

Is a block render array built with EntityViewBuilderInterface::view supposed to render full block template or only inner fields?

After rendering custom blocks in templates, I got this js error: Quick Edit could not associate the rendered entity field markup. What I've done so far : In order to render repeatedly custom blocks ...
0
votes
0answers
26 views

Getting site ID from module (vs theme)

I have the following code in my custom theme that works well and allows me to test against the multisite_id in my twig files: function mytheme_preprocess_page(&$variables) { $site_path = \...
0
votes
1answer
17 views

Token Filter module to work on Menu URL and Title

menu_token module is working fine to achieve the purpose. Does the module token_filter has this functionality? I can use tokens in wysiwyg using token_filter but cannot make it working for menu title ...
1
vote
0answers
18 views

How to delete content entity type programmatically on uninstall?

I am trying to delete a configuration from a module in hook_uninstall. My module creates a content type bundle which has to be deleted. I tried to use an approach described here: How to delete a ...
0
votes
0answers
11 views

Moved Site Files and Set Up Domain/Apache, Can't Access Login Page

I had a Drupal 8.4 site working fine on my Digital Ocean server, accessed at http://serveripaddress/sitename/ - the site was in maintenance mode. I then set up my domain name on Google Domains, ...
0
votes
0answers
29 views

Paragraph type default value for old content

I created a new paragraph type called Ad and I want to set a default value for already existing articles. At the moment, I am obliged to go to edit each already existing article and to save it ...
-2
votes
0answers
16 views

How to use uploaded pdf file name as a pdf title?

I am using Drupal 8. In a content type I added a file field with .pdf extension.When I am uploading a .pdf file sometimes its take automatic title from pdf, and sometime its use filename as a title.. ...
0
votes
1answer
38 views

Images with applied styles are not being displayed

I have checked every single solution on the internet with no avail. On the same server and using the same Drupal version 8.8.4, I have two completely separated sites. Site A is working as expected ...
0
votes
1answer
37 views

How can I set form values with Ajax?

I want to set the value of a textfield based upon the selection of a field above. You can choose a template and the textfield would have it as a value. This is the select field used to select the ...
0
votes
1answer
13 views

How can I render an image stocked in a custom module with an image style?

I'am learning Drupal 8, and I would like create a custom module who create a block to add share button. The link of this button should be an image who stocked in my custom module. I would like use an ...
-2
votes
0answers
16 views

Use same machine-name from a deleted role/field

I've a big problem and i've searched the Internet with no success. So, I'm trying to implement an Simple SAML Login in Drupal 8 and I must create roles with a unique machine-name that de Identity ...
0
votes
0answers
37 views
+50

How to sort product attribute values in “Add to cart” form

Given a commerce product with variations, how can I order the values within a variation attribute in the "Add to cart" form on the product page? Steps so far: In /admin/commerce/config/product-types/...
0
votes
0answers
32 views

How to call rest api in Drupal8 After form submit

I created one internal api call as '/api/v1/user/promotional-emails' this api calls some external apis and we are updating data there. In postman api is working fine. Now i created a user form as '/...
-2
votes
0answers
60 views

Why, the references to the entities do not disappear?

I have a site with Drupal 8.8.4 I created a type of paragraph with an "Entity reference" field which refers to the products and a "Date range" field : I created a type of store with "Entity ...
0
votes
1answer
22 views

Form Select not rendering as a dropdown

I'm building a form that contains a select but it's not rendering as a dropdown. It's rendering with a scrollbar and a dropdown down arrow $form['my_select'] = [ '#type' => 'select', '#...
0
votes
0answers
12 views

Translations page select all

On a node translations page, for example, /node/1/translations, there is a select all checkbox. Is there a need for this checkbox? I attached a screenshot so you can see what I'm seeing. I looked at ...
0
votes
1answer
27 views

What Commcerce event is fired when a payment is made?

There seem to be a few bugs in Commerce (8.x-2.17) related to admins making payments against a Cart. I am trying to fix some of these in my own custom module (rather than wait for people to agree ...
0
votes
0answers
18 views

Make custom POST REST Resource available on OpenApi

Body section in Custom Rest Post Resource is not shown I've created a custom resource with drupal generate:plugin:rest:resource and the result is <?php namespace Drupal\baxter_rest\Plugin\rest\...
0
votes
0answers
14 views

Confilct with 2 custom authentication providers for REST

I need a custom authentication provider using JWT library for authenticate some REST, but in this Drupal other people using other custom authentication similar to my provider. The problem: If i check ...
0
votes
1answer
22 views

How to add password reset link to user page?

Is there an easy way to add a password reset button to the user page in drupal 8? For user management I need the admin to be able to send password recovery link to users AFTER the user account is ...
0
votes
0answers
11 views

In product displayed the default variation type, but product type referenced to custom variation type

I created several product types with their own variation type for each. But always used default variations. For example Product type Matrress Variation type Feild list is empty for this variation ...
1
vote
0answers
23 views

How to reference a submodule in composer.json file?

I just learned now that you should not include composer.json files in submodules. But can I have a reference to a submodule as a dependency? Imagine I have a module named AAA with a submodule named ...
2
votes
1answer
43 views

What is the difference between renderPlain and renderRoot?

I added a login form to a node with following code : function my_theme_preprocess_node(&$variables) { $node = $variables['node']; $variables['login_form'] = FALSE; $variables['username'] = ...
2
votes
1answer
57 views

Understanding behaviors

I created a custom theme (a sub-theme of Radix base theme). I am loading a custom Javascript file (radix_sub.script.js) using the module libraries.yaml file like below: style: version: VERSION ...
-1
votes
1answer
66 views

XML parser selector skips mixed content in migration

I am trying to migrate and map the source fields of an external rss/xml file into Drupal. I have built a custom module: In config/install folder I have my yml file modules/custom/import_rss/config/...
0
votes
2answers
33 views

Why 'Failed to start the session' when RedirectResponse is sent?

When this code is executed, I have an error message logged. The code is in shared_node_access(NodeInterface $node, $op, AccountInterface $account) if ($node->get('nid')->value == 1) { if ($...
0
votes
1answer
20 views

How can you get the route name/path of groups?

I am new to Drupal 8. I am working on groups module and want to assign different themes to different groups.So i need route name of groups. how to find route name of groups. Thanks in advance. /** ...
0
votes
1answer
30 views

How to restrict taxonomy term reference with certain terms?

In a node edit/add form, I need to show a field with dropdown/select list options (Cardinality unlimited). I do not want all the taxonomy terms of that vocabulary to appear. I want to show certain ...
0
votes
1answer
24 views

How do I conditionally add a class to my page title within page-title.html.twig?

I have a boolean field within my Page content type called Hide Title. I need to conditionally add a class to h1's to visually hide them if this field is checked. I have the following within page-...
0
votes
1answer
26 views

Source entity type and id in webform node

Im looking for a way to set the source entity type and id to a webform that is inside a webform content type (webform_node) I followed the modal convention: the address of the webform is /webform/14?...
0
votes
1answer
23 views

How to disable watchdog table entry?

My drupal 8 watchdog entry running very vastly. I want to stop the watchdog entry for few times immediate basis and resolve the issues. Please suggest.
0
votes
0answers
9 views

How to change librarie's css from xxx.theme or hooks

I want to alter the path of the css of the mmenu library (jquery.mmenu.css and jquery.mmnenu.all.css) which are in (/libraries/mmenu/dist/jquery.mmenu.css and / libraries / mmenu / dist /jquery.mmenu....
0
votes
0answers
13 views

Allowing user to login with their User ID to access webforms

Drupal 8 question... So the way authentication works at my organization is that users typically log in with their organization credentials in order to access Webforms... I'm looking for an ...
0
votes
0answers
23 views

Strange behaviour in twig template

I am trying to render image in custom field.html.twig template but following snippet not working: {% for item in items %} {% if not loop.first %} <div class="image-gallery-image"&...
0
votes
0answers
17 views

How to get an Url object with correct interface language?

I'm trying to get an Url object with correct interface language. use Drupal\Core\Url; $language_manager = \Drupal::service('language_manager'); $url = Url::fromRoute( "entity.node....
0
votes
0answers
12 views

Why are doctrine annotations not loading for Drupal unit tests?

I’m trying to run the Drupal CMS unit tests. It is using doctrine/annotations:1.8.0. I am seeing many errors similar to: Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The ...
0
votes
0answers
28 views

Why my Scheduled Task Action does not run in Business Rule?

I have a business rule (Entity Insert) that is supposed to run a scheduled task action after 3 months when you create a new node of certain type. This action have another action inside that is in ...
0
votes
1answer
8 views

how to create custom template for a product type in drupal 8 commerce

I want to have separate twig templates for each product type in drupal 8 commerce to customize them. is there any way to do that?
0
votes
1answer
15 views

How to get bundle machine name when viewing the creation form?

From the creation form (any bundle), I need to get the content type label/name to use it in a link (in a block, for example) and pre-filter the View opened by this link. Example : The user wants to ...
0
votes
0answers
15 views

How to write the update hook when adding columns to a custom field type?

I have a custom field type that's been in use on several sites for a while now. I have updated this field type to add two additional columns to the schema. I'm struggling to find the correct way to ...
1
vote
1answer
21 views

Splitting exposed form filters amongst several blocks

I have a views search page in D8 where I'm I have exposed filters that are shown in blocks. I'm also using search facet blocks. What I want in the sidebar is the exposed filter text search field, ...
0
votes
0answers
15 views

No results on Solr More Like This Block

I'm looking for help with Solr More Like This block on my Drupal 8 site. I have the view set up and the block is configured. I can see the view title but I never get any results back. All my nodes are ...