All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

Organic group member can access content from another group that she doesnot belong to

i have set up a drupal site with the help of Organic groups module. Every user that belongs to a certain group sees only related content. But, i noticed that if someone from group A has or guesses the ...
0
votes
0answers
8 views

No route found that matches "Content-Type: multipart/form-data; | webform_rest Send/Upload files?

I want to upload a file using webform_rest API as described here. #2899902. But it gives me 415 Unsupported Media Type error as you can see in the screenshot. Here is my code methods: { ...
0
votes
1answer
9 views

Execute a custom shell script before the aegir verify

Every actions in aegir trigger a verify. I would like to automatically execute a shell script before that verify ( rsync of plateforms ) How could i proceed ?
0
votes
0answers
10 views

How can I access webform submission values from webform-confirmation.html.twig

I have a webform with Inline confirmation, AJAX enabled and saving of submissions disabled. Is it possible to access the submitted values from the webform-confirmation.html.twig template? I know ...
0
votes
0answers
14 views

How to dump $form in twig template of custom form?

I am trying to debug $form values on twig template, created for rendering user edit form in my own way but when I am trying to use {{ dump(form) }} or {{ dump($form) }} browser hangs and then system. ...
0
votes
0answers
10 views

Entity print css not working

I followed the guide to configure the Entity print module, I used the bartik theme, when I go to the debug page: "http://partymanagement.dd:8083/print/pdf/node/222/debug" I see everything correctly ...
0
votes
0answers
7 views

How to use migration to update field content ant not replacing if it already exists?

In a custom module (assoc), I have a custom Content Entity (Member). I migrated Member content from a Drupal 6 site using Migrate Source CSV, Migrate Plus, Migrate Tools and this migration file: id:...
0
votes
0answers
18 views

How to let users remove a specific field or fieldset on a custom form using the form api?

I followed this Drupal example: https://git.drupalcode.org/project/examples/blob/8.x-1.x/form_api_example/src/Form/AjaxAddMore.php I've edited the code a bit to use fieldsets instead of just one ...
0
votes
0answers
14 views

“Warning (table id = 'datatable'): Cannot reinitialise DataTable” [closed]

I use the DataTables module with Drupal 8 I always get the following error. DataTables wanring (table id = 'datatable'): Cannot reinitialise DataTable To retrieve the DataTables object for this ...
-3
votes
1answer
21 views

Add navigation to a view? [closed]

A drupal 8 backend has a view created. I can't seem to find a way to include the primary navigation to the page. Any help would be very good. Thanks
0
votes
1answer
26 views

Get field value and label for a content type using REST API

I need to create a REST API endpoint with GET operation in Drupal 8. The API should return all fields of a given content type. Right now I am only able to fetch the title. Also, I am not supposed to ...
-2
votes
1answer
26 views

How to disable admin approval for user registration?

I've two different register forms: a_register and b_register. To achieve this I've use multiple registration module which is working perfectly fine. Now my question was if any user register on any of ...
1
vote
1answer
15 views

How to send HTML email using Rules?

Does anyone know how to send HTML email using Rules? This was a pretty common task in D7 and I think the rule was included with the mimemail module. The D8 version of mimemail doesn't appear to have ...
2
votes
2answers
40 views

What good is the create() method? [closed]

Most classes are instantiated using create($container) and __construct(...$services) in conjunction, it seems that the more efficient workflow would be to simply pass the container to the constructor ...
0
votes
0answers
8 views

Using Language selection page

I have a D8 site with 3 languages, everything is working fine, with the different languages in their own url path /es etc. I now want to add a splash page for users to select their choice of language. ...
1
vote
2answers
120 views

How to use custom class methods in the .theme preprocess functions?

In a try to get code cleaner, I thought I could write a service in a custom module and use its methods within mytheme.theme, but obviously the preprocess functions signatures don't accept extra ...
1
vote
0answers
14 views

Start migration via rest or from a button within a view

I have a bunch of migrations that update a bunch of nodes. I want to automate the process and also be able to rollback / add / update specific nodes for specific migrations. Basically I need a ...
0
votes
1answer
30 views

Connection issues

New to Drupal 8 and tripped up on this one. It seems something wrong with database but if anyone has tips please let me know! Here is my code: and here is error: And my drupal site isn't working at ...
-2
votes
0answers
12 views

How do I add a separate cost to the price? [closed]

I have the latest Kickstart 2. A product needs to have "extra options", each adding a separate cost to the price. I use this module: the https://www.drupal.org/project/commerce_pricing_attributes/ ...
-1
votes
0answers
24 views

Adding custom image of search item

How we can pass the custom image on search page in d8. I have created custom_theme_preprocess_item_list__search_results function in .theme file but I am not getting node details here, I am getting ...
1
vote
1answer
28 views

How to suppress “page not found” messages in watchdog

The issue Add an option to suppress page not found watchdog messages at https://www.drupal.org/node/2836458 indicates that a setting was added to Drupal 8 to suppress page not found errors in watchdog....
1
vote
1answer
22 views

Render media url in node--page.html.twig

I have an Entity reference field field_video. It's a core Media field with a Reference type of Remote video. Because I use this field_video in my Hero section I need some additional markup here. ...
4
votes
2answers
128 views

What is the correct way to update my cached block when a node of a given type is saved or updated?

I have a custom module with a block plugin: SliderBlock.php class SliderBlock extends BlockBase { public function build() { $build = []; $build['#theme'] = 'slider_block'; return $...
0
votes
0answers
24 views

robots.txt encoding issue

I'm in charge of a website for my company, which runs Drupal 7.66 (PHP 5.3.3), for a few years now. Since a few months, I discovered a strange behavior regarding the robots.txt file. In some case, the ...
1
vote
0answers
18 views

Update field properties defined by hook_schema()

I'm probably a bit confused by documentation. Got a custom field with some properties defines in hook_schema() : /** * Some field type. * * @FieldType( * id = "field_selector", * label = @...
0
votes
0answers
12 views

How to change the 'target type' of an entity reference field?

I have an entity reference field that has existing data, which is populated by custom code. I now want to create a view of this data, but upon doing so have realised that the 'target type' of the ...
-2
votes
0answers
12 views

Commenting or replying a specific node without the possibility of commenting others

I built a website sort of like an online directory for restaurants in my home town, and i am letting the users to leave their reviews about a specific retaurant, and what i need is to give access to ...
0
votes
0answers
17 views

Lets’ encrypt redirection problems

Desperately seeking help, I am hosting multiple Drupal 7 sites on one Ubuntu 16 on AWS using apache. I have domain1.com and new.domain2.com In the DNS level, I am pointing to this computer IP for ...
1
vote
1answer
17 views

composer require error: can't delete default.services.yml

using Drupal 8.8.1 composer require drupal/{{ any package }} returns Installation failed, reverting ./composer.json to its original content. [RuntimeException] ...
0
votes
0answers
25 views

Migrate into paragraphs without parent import

If I have a data source with some values, can I process those into a paragraph attached to a node in Drupal 8 without having to run a prior migration to create the paragraphs first (and then relying ...
0
votes
0answers
7 views

Search API File search missing filter operators

D8 Webiste Probably missing something obvious here but... I am trying to create a view that can search an index generated by Search API. I want to include files in the search. Ideally with an ...
1
vote
1answer
28 views

How to create content type “News”

A site user needs to be able to add news to Drupal 8 site. Some news might be own contents and some news might be from external sources. If the site user is adding a news which is from an external ...
1
vote
0answers
40 views

Why can't I remove the %20 from a URL evaluated by a contextual filter?

I created a view with contextual filters with taxonomy terms that have two words, so that space creates a %20 on the URL. I found out that the solution is to checked the "Transform spaces to dashes in ...
1
vote
0answers
13 views

Customizing the checkout form

I need to fill Billing Info form with data that the user has filled in another page of my commerce site. I've made a hook_form_alter with the following weird code (with the help of kint): function ...
0
votes
0answers
22 views

Fix problem in off-canvas menu module for Barrio Sub-theme [duplicate]

I need help with changing a Barrio(v 8.x-4.22) sub-theme of Drupal 8 This is what I've done until now: I installed the Barrio sub-theme I installed the Responsive and off-canvas menu Drupal 8 ...
1
vote
1answer
29 views

adding new validation method using HookEventDispatcherInterface::FORM_ALTER event

I'm trying to add a new validation method for 'user_login_form' using HookEventDispatcher module and events: class MyFormEventsSubscriber implements EventSubscriberInterface { public static function ...
-1
votes
0answers
18 views

Customization of sub-theme with left hand-side menu [closed]

I need help with changing a Barrio(v 8.x-4.22) sub-theme of Drupal 8 This is what I've done until now: I installed the Barrio sub-theme I installed the Responsive and off-canvas menu Drupal 8 ...
0
votes
1answer
60 views

Update Symfony components

There are many posts and articles that make vague references to upgrading Symfony 3 to Symfony 4 in Drupal 8. But nothing specific. For example this one by Ryan Weaver "Symfony 4 and Drupal" I've ...
-2
votes
0answers
16 views

How to get multivalued reference field value in drupal 8 while using computed field [closed]

I am using computed field module in drupal 8. I have a problem getting values of a Reference field of multivalued in drupal 8. Thanks
0
votes
0answers
11 views

Custom views filter plugin: cachetags invalidation does not effect option list

I described a custom views filter plugin extending InOperator. The aim is to offer a select list where the user can choose from a list of fractions of a legislature. Legislature and fractions are ...
2
votes
1answer
36 views

How to get total number of rows on a block of a view

On hook_block_view_alter() I need to get a total number of rows that this block displays. For example, I have a view with the following block: On hook_block_view_alter() I do the appropriate checks ...
-1
votes
0answers
17 views

getting error on setup drupal 8.1.1 [closed]

Notice: Trying to access array offset on value of type null in Drupal\Component\Annotation\Doctrine\DocParser->Identifier() (line 969 of core\lib\Drupal\Component\Annotation\Doctrine\DocParser.php)....
0
votes
1answer
49 views

How do I troubleshoot PrivateTempStore for session data?

I am updated one of my Drupal 7 modules for Drupal 8 and I discovered that I need to use PrivateTempStore rather than $_SESSION variables. I followed some great examples online, but it does not seem ...
1
vote
1answer
19 views

What is the proper way to show a visitor an error?

I'm using a custom submit handler for a Webform, which POSTs important form data to another API. That part works, but on occasion there may be random network errors that prevent a successful ...
1
vote
0answers
25 views

Hook form alter not working for node edit form

I have a content type called landing_page. If I edit an existing node in the admin /node/31/edit and I inspect the form I see id="node-landing-page-edit-form". I can't get it to work to use ...
1
vote
1answer
34 views

Need to add a JS file into <head> using a custom module with custom twig template

I have created a custom module and created a config page which we need to input the url on that page. Created a twig template within my custom module: <script src={{ js_file_url }}>test</...
0
votes
0answers
19 views

Field gets unset and fails validation in user edit form

We have a special date field that we set upon user creation when our custom user form is submitted. The user does not have to set this field themselves. We have a separate form, which is a user edit ...
0
votes
0answers
8 views

Views Grouped filters using Relationships and Allow Multiple Selection

I have a View with Grouped filters using a Relationship and allow multiple selection options, however, it does not render multiple selections results
0
votes
1answer
65 views

Cache a block by a custom entity rendered within

I struggle with getting a custom block cached correctly: we have a custom entity "Politician" For that entity we have several routes where we want to render a "politician header" with some basic ...
0
votes
0answers
13 views

Views contextual filter allow multiple values not available

I'm building a view to see some webform results. I'm trying to add a contextual filter to limit results to certain values entered in a field, but the option to allow multiple values is not allowed. ...

15 30 50 per page