All Questions

Filter by
Sorted by
Tagged with
-1
votes
1answer
28 views

Migrating date into drupal datetime field

i am having the xml selector <starting_date><![CDATA[ 2017-01-01 22:34:56 +0100 ]]></starting_date> this migration process fails : process: field_job_starting_date: plugin: ...
2
votes
0answers
40 views

How to add Rabbit Hole to a custom content entity

We use the module Rabbit Hole for nodes and terms. Now we would like to use it also for our custom content entities. I have tried to find some information, how to add the Rabbit Hole to a custom ...
0
votes
1answer
11 views

Geofield map : add marker on click listener

I've added a google map which I feed thanks to the Geofield module. I'd like to add an onClick event to each marker to have a custom behavior. this is what I've done this far : Drupal.behaviors....
0
votes
0answers
26 views

Modify the allowed options for a list field programmatically

I want to add the titles of another existing type of nodes to a select list field from another content type. I tried to do it altering the form but it gives me an error because the values added are ...
1
vote
1answer
32 views

How to translate the layout builder blocks of a node programmatically?

I am translating the nodes programmatically. Everything works fine except the layout builder blocks. When I try to translate it, it also changes on the source node. I have created a node in language ...
1
vote
1answer
28 views

Import content in nodes with media:image fields using Migrate from csv source

I try to import content from a .csv file into article nodes of a fresh D9 install using Migrate, Migrate Plus, Migrate Tools, Migrate csv source and Migrate File (extended) My article content type has ...
1
vote
0answers
24 views

URL aliases for non-translated content types revert to /es/node/nid in menu

I have Content Translate enabled and enabled translation on only our Projects content type. I've placed the Language switcher block on a Projects view and Project node page. This is working just fine. ...
0
votes
1answer
16 views

How can I create a notification entity with Rules module

I have installed a notification system and I want to create notifications with Rules when a project content is updated to waiting for approval status. The rule looks like this: uuid: 3165768f-15f5-...
1
vote
0answers
22 views

Alter Inline Entity Form before saving

I am using the Inline Entity Form module so that I can create a content type B from content type A. I want to alter a field of content type B before saving the value. I tried to do this: function ...
0
votes
0answers
24 views

Getting 403 randomly on files

I have a react-native app that authenticates with Drupal via oAuth2 (simple_oauth, openidconnect) and do not use cookies. I use my access token for all rest calls, images and other files. Very ...
2
votes
0answers
18 views

How can I retain the destination parameter when a user registers a new account with email verification?

This is for a Drupal 9 website. How can we retain the destination after a user registers a new account that requires email verification? Example workflow: User clicks to create a new node but does not ...
0
votes
0answers
25 views

Need help with AJAX calls within Drupal.behaviors

I'm having some issues getting the following code to work correctly: (function($) { 'use strict'; Drupal.behaviors.mybehavior = { attach: function(context, settings) { // Click on a ...
0
votes
0answers
24 views

Content and content type fields intermittently disappear after cache rebuild

I have an issue on a Drupal 9 website where sometimes (but not every time), if I run drush cr the content of pages disappears (the header and footer are all that remain), and in Structure > Content ...
0
votes
1answer
21 views

Creating twig files for the a view

Hi there I'm new to Drupal. I have made a test project, where I've made a custom content-type called 'persons' it has a couple of values. And I made it able to custom style it by making a twig file ...
1
vote
0answers
27 views

Webform handler to manage number of places available

I want to manage a webform to automatically close it if number of people reached, or to invalid submission if not enough places are available. I have use this : Close a webform when total seats reach ...
0
votes
0answers
11 views

Disable form element depending on media image dimensions

I have paragraph that contains one media image field and one checkbox field. What I need is to disable that checkbox if selected image media is less then X pixels wide. So it should work when ...
0
votes
1answer
22 views

Get all entity reference options from a field name

I would like to create a node programatically and one field field_supervisors has an entity reference field for the node type People. In order to set the correct entity reference information I need to ...
0
votes
0answers
42 views

The "node" parameter was not converted for the path "/node/{node}"

I have the following error in the filters with parameters in view type pages. will there be any solution to this problem? Drupal\Core\ParamConverter\ParamNotConvertedException: The "node" ...
1
vote
0answers
16 views

How to display all data from a paragraph field in views (Drupal 7)

I am currently a caretaker for a Drupal 7 website and I can't figure out how to group paragraph items in views. I have created a content type Products and one of the fields is called product variation ...
0
votes
0answers
7 views

Drupal7 Views relationship multi value custom column

Im using Drupal7 and views, views relationship Im displaying the results in table format with the help of view along with other custom tables as well as by using views relationship. I need a help in ...
0
votes
1answer
19 views

How to get the base URL of a site in Queue API?

I am trying to get the base url of the drupal 8 website in a queue process but I am getting http://default as the base url. What am I missing here? public function testUrl() { global $base_url; ...
-1
votes
1answer
25 views

Webform 6.1.0 help text not showing

I updated my webform Module from 5.3.0 to 6.1.0, I have one the Following Error: the help text isn't displaying its content on any form on my site (Example of help icon in the shared image) It should ...
1
vote
0answers
25 views

Migration away from Open Atrium

We have an intranet site running on Open Atrium (A product which has not been supported or updated in some time) and would like to migrate to a Vanilla Drupal install on either 8 or 9. We do not use ...
1
vote
3answers
50 views

Attempting to return region in theme suggestions for the book module book tree block

Editing question based on information from @NoSssweat The book module uses the same hook for the book tree block and the rendered index view in the book page. I have used the below code to return file ...
0
votes
0answers
28 views

View injecting weird html elements (b element)

I've noticed recently that, in a drupal website I'm maintaining, a view displaying a list of content type called Event, has some weird html elements injected. This messed up the layout and I'm not ...
0
votes
0answers
18 views

Node Access based on User reference field on node

Unable to find a good place to start in Drupal 9 for addressing this issue. I have a content type that is used for temporary access. The node is created and has an expiration date. The node is deleted ...
0
votes
1answer
60 views

How to alter Layout Builder block visiblity?

Is there a hook to alter block access for blocks placed using Layout Builder? I see there is hook_block_access; but sadly this is not triggered when the block is placed using Layout Builder. There is ...
0
votes
0answers
8 views

Bulk assign content to Book

I've decided to reorganize my site to use the book module. How do I bulk move specific content types to be children of a book? Bulk Update Fields doesn't include the Book meta data, so I am unable to ...
0
votes
0answers
19 views

Warning when repeating migrate:import process

I created source and data process plugins for mongo db. And when I run import for the first time it works well. But if I run it again, immediately after that I get warning: [warning] Could not load ...
2
votes
1answer
44 views

How get the view mode\third_party_settings of a field inside hook_preprocess_image_formatter(&$variables)

I'm on D9. I've added a custom option to the image field formatter following Drupal guidelines In the preprocess of the field I can get the settings I've created: function my_module_preprocess_field(&...
-2
votes
1answer
22 views

how to import 3 xml selectors in one drupal field using the migrate plus module?

the migrate_plus migration conf i had so far was process: title: title body: job_description field_job_diffusion: offer_type field_job_statut: statut field_job_domaine: domaine ...
0
votes
1answer
31 views

How can one programmatically get the bundle constraint for an entity reference field?

I'm working in the context of a Views plugin. I have $entity_type and $field, as required in the snippet below. How can I get the bundle constraint for the entity reference field programmatically? /** ...
2
votes
1answer
39 views

How to create a view that lists all taxonomy terms of a vocabulary, filtered by a term id?

I have a lot of different vocabularies. On The taxonomy page (the standard view provided) I would like to add a block (view) that takes the current taxonomy id from the url/page and displays all ...
-2
votes
1answer
43 views

How to create a custom example module?

I want to create a custom module in minimum, i.e. a module which can be installed but generally doesn't do anything just for the sake of understanding how are custom modules get created after some ...
0
votes
1answer
53 views

How do I fix a var-dumper conflict?

My upgrade is failing. I am at 8.9.19 and I used upgrade-status to make sure all my modules are compatible with next major core version. I am following instructions at https://www.drupal.org/docs/...
0
votes
1answer
20 views

Migrate Json data with non-numeric unique identifier (from facebook...)

I am trying to fetch posts form facebook, using migrate. My question is: in my migration conf.yml how should I set the source:ids key to handle non-numeric IDs, like the ones provided by facebook that ...
1
vote
1answer
25 views

Use async with drupal_http_request()

I need to make an asynchronous call with drupal_http_request(). Is it possible?
2
votes
1answer
81 views

In event subscriber, how to redirect if value doesnt exist?

I am trying to check a condition before page load, if value exists to load page if not to redirect. I am following this page I have created a /mymodule/mymodule.services.yml file and a /mymodule/src/...
0
votes
1answer
13 views

Hide pane based on cart state

Can anyone point me to a right direction. I have created a custom Checkout flow and it has payment pane in it. I'm trying to skip payment pane if the Cart state changed (default cart state is draft) I ...
-2
votes
1answer
52 views

Upgrading from 8.9.19 to 9 fails because of root composer.json require (^8.8.0)

My upgrade is failing. I am at 8.9.19 and I used upgrade-status to make sure all my modules are compatible with next major core version. I am following instructions at https://www.drupal.org/docs/...
-2
votes
1answer
26 views

Column isn't responsive [closed]

I have inserted a view and one column refuses to word wrap on mobile display. On normal desktop display it wraps just fine. But as seen in the second image taken on my phone, it puts everything in ...
0
votes
1answer
32 views

Allow user to control access to own content for other authenticated users

I just want a field in a content type, so that when a user creates new content he/she can select whether that content can be viewed by other authenticated users or not. I prefer doing this with a ...
0
votes
0answers
29 views

How to stop the need to flush browser cache AND rebuild Drupal cache after every sub theme CSS change? [duplicate]

How to stop the need to flush browser cache and rebuild Drupal cache after every sub theme CSS change? Doing so would ease my testing of minor CSS changes done online (such as switching a background ...
0
votes
1answer
29 views

SQL Error when trying to remove content type field

I was trying to create a new Content Type for my site and I chose a field name ("description") that already used for other content types. The problem occurred when saving changes as the ...
0
votes
2answers
23 views

How to create a taxonomy term from a webform

New to Webform. What I'm trying to do is build a somewhat simple site content-collecting tool using Webform. So users would 'collect' nodes by submitting forms on them. This appears to be easy to do. ...
0
votes
1answer
23 views

How to pass Paragraph ID from Layout Builder to Views?

This is a bit convoluted; so hopefully it makes sense: I have a parent entity: Event. Event has a Paragraph field on it: Sessions (paragraph type: Session). I use Layout Builder to format the Full ...
0
votes
0answers
31 views

Webform update from 5.3.0 to 6.1.0 results in directory error

After I updated my webform module from 5.3.0 to 6.1.0 I received an error when submitting my form. Apparently it isn't able to copy the pdf file which I added to the form and so it is blocking the ...
1
vote
0answers
12 views

How do I turn off the calendar popup widget on the date field?

noob here, I have a form that requests a birthdate. I have set that field type to a date field. When on a desktop, the user can either enter the date directly into the field--this is great--or use the ...
0
votes
0answers
13 views

How to retrieve the values of a webform submission reference entity?

I created a content type with a reference entity type field. This reference entity is of type Webform Submission. I would like to know how to retrieve the field values to put in a twig file? (To ...
0
votes
1answer
25 views

How to get rendered node according to active theme?

In a hook_entity_postsave() function in my custom D7 module, I'm doing the following when a node is saved: $_ = node_view($entity, 'full'); $html = drupal_render($_); But the renderd HTML ...

15 30 50 per page