All Questions

0
votes
0answers
4 views

Force one config to be imported before another?

Hitting an issue when installing a site from config and I think the order of operations may be the issue. Is there some way to ensure that one config is imported before another one?
0
votes
0answers
2 views

Hook to call a function after menu rebuild?

After a menu rebuild, such as one that occurs automatically when visiting the Modules admin page, some of my Drupal JS behaviors are not in the correct state. I need to re-initialize or attach them ...
0
votes
0answers
9 views

Drupal 8 - Cc is not working in hook_mail() function

High priority requirement, please help. I have written some custom code for sending mail. Mail is working properly for 'To'. But for 'cc', mail is not working. I have set cc in $params also I am ...
0
votes
0answers
2 views

HowTo: webform with multiple instances of group of field

I need to create a webform that has some "header" fields and then 1 or more instances of a group of other fields. In D7 I did this using field_collection module, adding a multi-value version of this ...
0
votes
1answer
6 views

Aggregating JavaScript generates errors and breaks JS functionality

My website is working well but I was required to aggregate CSS/JS by enabling the system.performance.js.preprocess config key. Once the JS code is within one single file I got some errors that doesn't ...
0
votes
0answers
11 views

AJAX in callback function

I'm trying to convert old code written in standard HTML/PHP/Javascript/JQuery into a format (more) consistent with Drupal. The code consists of a form with interactive elements (regulated by ...
0
votes
0answers
5 views

Watchdog in `hook_user_presave` implementation causing unknown error

In my own module, my_user.module, I am trying to implement the hook_user_presave invoked from user.module. Following the examples, I created a function in my module like so: /** * Implements ...
0
votes
0answers
7 views

Instantiating an Entity: ConfigurablePluginInterface is deprecated

I'm migrating a D7 module that creates entities from a CSV file. I'm able to test this in drush core-cli by using: $event = \Drupal::entityTypeManager()->getStorage('node')->create(['title' =&...
0
votes
0answers
7 views

Body Summary field showing literal ampersand character code in view

I have a Drupal 8 site where we've created a view, and decided to use the summary field instead of the trimmed body field, so that we could have more control over it. However, I got a bug report ...
0
votes
0answers
7 views

How do I redirect a user basing on its roles?

I'm having an issue with writing a redirect based on whether or not the current user's role matches the one listed or not I've been trying to find solutions related to getting the current path for ...
-1
votes
0answers
11 views

AJAX not working in views for anonymous users in Drupal 8

I have a view in Drupal 8 with an exposed form with AJAX enabled. It works fine for admin user, but it doesn't for anonymous users. I have included in my theme libraries file: dependencies: - core/...
0
votes
1answer
13 views

Hide fields in Paragraphs conditionally using Form API #states

Because the Conditional Fields module doesn't work with paragraphs for Drupal 8, I've followed the instructions in Conditional Fields in Paragraphs Using the Javascript States API for Drupal 8 to hide ...
-2
votes
0answers
8 views

CKeditor accordion does not install with configuration menu

I have installed the CKEditor accordion using this guide https://www.ostraining.com/blog/drupal/accordion-button-in-ckeditor/ Yesterday it was working, but today when I install it does not add the ...
0
votes
1answer
13 views

Additional old_XXXXXXtaxonomy_term__field_XXX Tables after Upgrade to Drupal 8.7

After Upgrading from Drupal 8.6 to 8.7 I have tons of new (garbage?) tables in the database. The naming schema for the tables is old_XXXXXXtaxonomy_term__field_XXX Is there a drush command to remove ...
0
votes
0answers
12 views

Add paragraphs to a node via jsonapi

Added a paragraph to drupal8 via jsonapi and want this paragraph to be in an articles body. I thought it is as easy as "relationships": { "field_body": { "data": [ ...
0
votes
0answers
34 views

Why Form Api behaves differently in route and in custom block?

I’ve encountered this issue several time and I don’t know why. I know this not so easy to reproduce but maybe someone has an explanation. I’ve built several custom modules which return datas from ...
0
votes
0answers
8 views

I Cant enable the Responsive-Navigation module after installing it

I want to make the Nav menu responsive for my website and I just downloaded the files for Responsive-Navigation and responsive-nav.js plugin and copied them in modules and libraries folders ...
0
votes
0answers
11 views

Custom field validation condition not working

I have created a custom form validation. I am using webform module to build the form. in _achva_tz_validate function there are two fields that have the same validation. The second field, zug_id, is ...
-3
votes
0answers
16 views

How to write RESTful API in Drupal 7? [on hold]

How to write RESTful API in Drupal 7? What modules are good for that?
-4
votes
0answers
11 views

Drush quits on cache rebuild command [on hold]

When I run drush cr on my hosted server, I get this back $ drush cr [warning] Drush command terminated abnormally. Check for an exit() in your Drupal site. Can't find any info on this.
1
vote
1answer
29 views

Is it possible to change the value of the field based on the the browser's language?

On my Drupal 8 website I have a content type "Video" which has an "Embed Code" field. Later the user is able to watch the video inside the platform. The value for this field usually looks like this: ...
-1
votes
1answer
10 views

Is there a way to determine creator of each table on an existing Drupal DB?

I am investigating Data Science stakes for a company and have started by exploring the data they have. They are running their website on Drupal (7.59), which does not make it easy for me to figure out ...
0
votes
0answers
9 views

Commerce 2 onReturn order must stay at it's current state

I'm working on a new type of payment gateway with these steps: 1. The client is redirected to the payment gateway. 2. Client returns from payment gateway with payment information BUT THE PAYMENT CAN ...
-4
votes
0answers
14 views

How can I display a summary page after custom form submission as intermediate step before send post to 3rd party api?

I created a custom form. What I want to achieve is to display a summary page for the user to review and provide a button to continue which send POST information to a 3rd-party API function.
0
votes
0answers
8 views

How to add a file element in webform matrix component

I'm using webform matrix component module of drupal 7. But it doesn't provide support for webform file element. I have no knowledge about code. I need to know how I can use a file element with webform ...
0
votes
0answers
19 views

Attempting to load content into dialog (modal) via URL

I have a page that contains both static and dynamic content. On the static portion, I've attached a link that looks like this: <p> <a id="trigger" class="use-ajax" data-dialog-options="{&...
0
votes
0answers
13 views

How do I make webform submissions available to Rules and loop

I have a webform application: five (5) questions/statements (Select Yes/No) for anonymous user usage. First result: all five (5) questions are answered "Yes" - the webform gets submitted, emails get ...
0
votes
1answer
26 views

Vanilla Javascript Firing Twice

I have some simple dom manipulation I want to make using javascript without jquery. I can't seem to figure out how to prevent this code from firing twice. Almost all examples I find use jQuery, but I ...
0
votes
1answer
23 views

hook_form_alter() on a view exposed filter form

I am trying to add a disable attribute in a field using the hook_form_id_alter function. I created a module and built the function function disableIncentiveform_form_views_exposed_form_alter(&$...
0
votes
0answers
9 views

Email misses fields from form

This is regarding a Drupal 8 site, specifically Drupal 8.7.1 and the "Contact" module (with Contact Emails, Contact Storage enabled). The issue that I'm running into is some of the fields are not ...
-3
votes
1answer
19 views

Today is in list of dates

Trying to check if variable 'today' is in a list of dates in Views Conditional Field. Both values print out nicely. Today (var php): 24/06/2019 List of dates (var field_dates): 24/06/2019, 25/06/...
0
votes
1answer
10 views

View to display content type and media type

Say I have 1 content type and 2 media types users can create Content type: Post Media Type: Picture Media type: Movie How can I create a view that pulls all 3? As far as I can see you can only create ...
0
votes
1answer
21 views

How to make a lock forget?

I understand how locks work, thanks to this post. Very straightforward: function mymodule_long_operation() { if (lock_acquire('mymodule_long_operation')) { // Do the long operation here. //...
-1
votes
0answers
29 views

How to identify vulnerabilities? [on hold]

I work for Global Pepsico IT and we are trying to add CMS vulnerability detection to our arsenal of vulnerability testing. So far, we haven't been able to find a way to do this detection for drupal ...
0
votes
0answers
14 views

ReflectionException: Class \MenuBlockKernelViewSubscriber does not exist

Doing a simple staging to production migration, copied all files, and the database,. Imported the database successfully but now when visiting homepage of the site I get the below error message/...
0
votes
1answer
26 views

How do I allow custom .php files to be accessable?

I have already looked at the How do I call legacy PHP files? answers and they didn't fix my problem. I have a custom php file in my Drupal site (Hosted on Acquia Cloud and I am working on a local ...
0
votes
0answers
14 views

Creating a Product Display Catalog via taxonomy Drupal 8

I need to create a catalog system for a product range from taxonomy in Drupal 8 My taxonomy is structured like this : - Product Category 1 -- Sub Cat 1 -- Product 1 -- Product 2 ...
0
votes
2answers
50 views

How to prevent programmatically created blocks from caching

I've been working with Drupal 7 for a couple of years but am new to Drupal 8, and am just getting into building custom modules. What I have built is a module that alters Drupal Commerce in order to ...
0
votes
1answer
35 views

Can drush 9 be used without composer?

I have a Drupal 7 site that was not built with composer. I have been using Drush 7 with it, but about a week ago, wd-show --tail stopped working, I'm not getting any output. I installed Drush 9, but ...
0
votes
0answers
8 views

Add a FULLTEXT index on specific column

I'm currently implementing a custom search engine in my custom module. In order to optimize my module, I would like to perform SQL queries by using the syntax MATCH....AGAINST in Entity queries. By ...
0
votes
1answer
23 views

After save empty cache of referenced node

I have two content types. For clearer question I will work with the content types event and location. From my location content type I can reference to and event. Then on the event page I show the ...
-4
votes
1answer
25 views

How to have all options of some menu on the same line?

In the mayo theme I use for my site, I have a footer menu. By default, the options of this menu are displayed vertically: I'd like to have the options displayed horizontally. How can I do that?
-2
votes
1answer
28 views

Getting translated version of Menu

I'm trying to get translated variant of Manu, but I can't make it work. This is code of what I'm trying to do, but this is for content node. $entitytype_manager = \Drupal::service('entity_type....
0
votes
0answers
16 views

Launch media browser with file webform component

I have webforms that only authenticated users can fill out and submit. I'd like the file component to launch the Media Browser instead of just the plain find a file and upload it. I've spent many ...
0
votes
0answers
14 views

Method to export each view and all fields at once? [on hold]

In Drupal 7, I'm aware of the method for setting up a view and exporting to CSV using "Data Export." Is there a method to export all views (content) and all relevant fields at the same time (in ...
0
votes
1answer
47 views

Get difference between two dates programatically

In summary: On a Drupal 8 project, i am trying to programatically get the difference between two different times (current time - Node creation time) Use case: I have "nodeabc" already available on ...
-3
votes
1answer
17 views

Insert new content with Postman [on hold]

Ho can I create new content in drupal 8 through Postman? What json structure should I use?
0
votes
1answer
12 views

How do I programmatically close webform by node date field?

Background: I'm adding an events (custom content type) & registrations feature to an existing drupal 8 website. My experience in drupal is pretty minimal. But I can find my ways around code. ...
0
votes
0answers
13 views

Adjust block according to stage in multi-step form

I've build a multi-step form using the following tutorial. Which is quite nice! Can I also change a block based on the step you're in? I'm my case I have an activity registration form, build ...
-1
votes
0answers
22 views

What are all the possibilities for a view export?

I was given credentials to a live Drupal 7 site in order to export key data from views into a CSV. The site is live, it's owned and operated by an unresponsive third party, and I seem to have limited ...

15 30 50 per page