All Questions

Filter by
Sorted by
Tagged with
-3
votes
0answers
9 views

How to get value of checked tableselect row

Please help with tableselect element i want to get data from one of the checked rows. Here source: $options = array(); $nodes = db_query("SELECT order_id, order_number, created, status FROM {...
0
votes
3answers
13 views

How do I programmatically create a webform from a newly created node?

This is the code I am using. function walk_handler_entity_presave(EntityInterface $entity) { if (method_exists($entity, 'getType') && $entity->getType() === 'walk') { $elements = []; ...
0
votes
0answers
10 views

Migrate one to many relationship

My D8 site has two entities: resource author The resource entity has a field_authors entity reference field with unlimited cardinality. My source data is coming from 3 tables resource author ...
0
votes
1answer
16 views

Drag and drop between categories functionality for users

I have a content type where user selects a certain status and data is sorted for each status through views. I want to build a drop and drop functionality where users could move the box of each content ...
0
votes
0answers
13 views

How to enable click-sorting for views table display based on Search API index?

I'm trying to create a view with table display based on Search API (database search) index, with column-sorting (column set as Sortable in the display settings). However, this option isn't available ...
0
votes
1answer
29 views

Create new node and assign it to user after they have been registered

I have one user role on d8 and have few additional fields on user account so when people are registering they can leave additional data. What I would like to achieve is that when user registers - new ...
1
vote
2answers
54 views

What is the correct way to use a Symfony bundle?

I want to use https://github.com/KnpLabs/KnpSnappyBundle in a Drupal 8 project. How do I correctly use it?
0
votes
0answers
22 views

Displaying translated nodes in views [duplicate]

I am facing a challenge in displaying views for translated contents. Consider a general scenario: Multilingual site with English(site default), German languages. A content type Article has 100 ...
0
votes
0answers
15 views

How to get a second private files directory?

is it possible to create a second private files directory in addition to the existing private files directory? For a better file structure diversity I would like to set a different second location. ...
0
votes
0answers
21 views

CKEditor is grayed out after updating

CKEditor was working fine on my website. But, after updating the core to the minor version of Drupal 8.7.10, the CKEditor was grayed out. I had updated some of the modules as well. I checked for the ...
0
votes
0answers
21 views

Cannot update modules, get a 403 error

An AJAX HTTP error occurred. HTTP Result Code: 403 Debugging information follows. Path: /core/authorize.php/core/authorize.php?batch=1&id=31&op=do_nojs&op=do StatusText: Forbidden ...
0
votes
1answer
33 views

How do I Install an earlier version of Drupal 8 with composer because install fails on server with PHP 5.6?

My server is using PHP version 5, therefore, I need to install Drupal 8 version 8.6.18. But when I try, composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --no-interaction ...
0
votes
0answers
14 views

webform ajax callback response not updating text, is something missing?

The code below works inside hook_form_alter. The description and price update from database as desired when in form_alter. I moved the code to the callback and now it wont return/update the values. ...
0
votes
0answers
33 views

How to load html using jquery

In my controller, I create function call displaypage() which return below param return [ '#theme' => 'page_test', '#attached' => [ 'drupalSettings' => [ 'test' => [ '...
2
votes
1answer
15 views

drush migrate-upgrade “[debug] key_value table not found. Database may be empty.”

I am trying to migrate a D7 site to D8 following the steps found here . Once I can manage it and make sure I have all the PHP components, Drupal modules and etc. I have 4 sites to update, and one ...
1
vote
1answer
14 views

Display alternate content after webform submission

Is there a way to display an alternate content once user submits a webform? For example user submits "Email Sign Up" form on the homepage, and the next time they visit the page containing that form ...
0
votes
1answer
17 views

views_get_current_view performance

Does this function views_get_current_view inside views header or footer (to count rows number for example) means running the same view twice? Or is it somewhat simplified version of running full view?...
0
votes
1answer
9 views

Fill the “Unpublish on” date field of the Scheduler module depending on list field

I have a content type, where I want to give the user only three possibilities to unpublish content: in 1, 3 or 6 months. For the selection of the three options I use a list field. How can I transfer ...
4
votes
1answer
49 views

Is there a way to partially rebuild the router or invalidate a route cache?

I'm using the Groups module (http://dgo.to/group) to set up groups on a SaaS project I'm working on. I've set up a domain field on the groups, allowing groups to have vanity domain. As such, groups ...
-2
votes
0answers
26 views

How does mapping (OL/Leaflet) actually work nowadays? [on hold]

After struggling for 9 months with OL2 on D7 then removing all 6 months work to try both OL3 and now leaflet (some 6 hours today and 5 hours last night) I'm coming to the conclusion that nothing on D7 ...
1
vote
1answer
20 views

How do I include a twig file in a custom block type module?

I've created a custom module that creates a jumbotron custom block type. The module has an empty .module file and a dir config/install with many .yml files. This works great when I install and create ...
0
votes
0answers
28 views

Get the url of aggregated CSS and JS

I am looking to programmatically get the aggregated url that I can use to pre-load on a different page. Is there a method I can use in Drupal 8 to do this? this url usually looks like: /sites/...
0
votes
0answers
18 views

Flags are only temporary?

I have a feed that imports content items and a view that selects three of them for a block on the site front page (links are on the node to set flags). But when I turn off my localhost test site and ...
0
votes
0answers
23 views

Make a new Entity browser for PDF uploads?

Client has a custom Content Type for for downloadable PDF document detail pages, which contains an entity reference to the File media type. They want Full and Teaser view modes to display a thumbnail ...
2
votes
2answers
34 views

After changing a webform multi-select field to single-select, submissions made pre-change show only the first selection

I've created a webform in Drupal 7 with a component drop-down list. I selected 'multiple' for multiple selections. Now, I need to unselect 'multiple' giving users just one choice of the drop-down ...
0
votes
1answer
27 views

Why does my Views PDF Display output display differently in different software?

Using Drupal 7 and Views PDF module, I have created an output pdf that looks perfect when opened in a browser, but is inconsistent everywhere else. This pdf displays as follows: Chrome, Firefox, Edge ...
0
votes
0answers
23 views

I get error message ErrorException when trying to install module [on hold]

I try to run a module install with composer require 'drupal/calendar:1.x-dev' then I get the error message ErrorException /_files directory not empty. I tried to remove the directory but same error ...
1
vote
0answers
50 views

Invalidate cache of views block for anonymous users

I have a view display block that needs to be updated every 8 hours. I tried Views Custom Cache Tag module https://www.drupal.org/project/views_custom_cache_tag but I could not make it work. I set my ...
2
votes
2answers
199 views

Where is the node created timestamp stored in the database?

I need to create an SQL query that finds all nodes of a certain type created X days ago, so I can get their IDs. Due to the massive number of nodes in the database, I would prefer to use a direct SQL ...
0
votes
0answers
27 views

hook_default_rules_configuration can't debug it or force it to load

I am trying to debug a hook from title, here it says http://api.drupalhelp.net/api/rules/rules.api.php/function/hook_default_rules_configuration/7.2 "This hook is invoked when rules configurations ...
0
votes
0answers
118 views

Best Development Environment for Drupal 8? [on hold]

I'me coming from Drupal 7 and finally decided to hop onto Drupal 8. What is the best Drupal 8 development environment to work on? I am comfortable with command line and mostly do everything there with ...
1
vote
1answer
40 views

How to get the alt tag from an image field in twig?

I have a page of field images which are coming out quite weirdly when I kint their values. I can't seem to get the image url and the alt tag. The code in the twig file looks like this: field--field-...
0
votes
0answers
25 views

Ckeditor pasted url links become hyperlinks

We have disabled 'Convert URLs into links'. When you copy a url link from a browser url field like: drupal.org. Your clipboard contains the FQDN: https://www.drupal.org/. When you past this into ...
-4
votes
0answers
21 views

Need help on dialogflow chatbot integration [on hold]

I need your help to integrate the Dialogflow chatbot integration with Drupal 8. I followed some guides, but I failed. Getting one by one issues while integration. Please help me to get the proper ...
0
votes
0answers
30 views

How to create paragraph of particular type using JSONAPI?

I am able to GET the data using endpoint "site_url/jsonapi/paragraph/text". But I am not able to create a new paragraph of type text. Its always giving me error "403 forbidden". I have tried all ...
3
votes
1answer
49 views

Saving a webform programmatically in a custom webform handler throws “Entity validation was skipped.”

I am trying to save a webform submission inside the postSave in a CustomWebformHandler class. class CustomWebformHandler extends WebformHandlerBase { [..] public function postSave(...
0
votes
0answers
32 views

How to expose reverse entity references with GraphQL 8.x-4.x module?

Since Drupal 8 doesn't support bidirectional relationship, we need to query manually the reverse entity. Let's say we have 2 entities with a many to many relationship: We can add a field resolver to ...
2
votes
1answer
60 views

Redirect from route when the controller has been changed [duplicate]

I'm trying to redirect to an external URL in a custom controller whenever I land on the 404 page. Right now I alter the controller destination in a route subscriber like this: public function ...
0
votes
1answer
56 views

How do I use hook_preprocess_page_title()?

I've just discovered that Drupal 8 Bootstrap theme doesn't implement all existent hooks. So, for example, hook_theme_suggestions_page_alter() works, but hook_theme_suggestions_node_alter() doesn't ...
0
votes
3answers
43 views

How do you deploy a change to a main menu?

We have a small D7 site. We want to deactivate a main menu item. On dev server I was able to deactivate it in /admin/structure/menu/manage/main-menu I believe The menu is stored in the DB, right. ...
0
votes
1answer
36 views

Array not displaying in twig template

Custom twig template is just this: <ul id="rows"> {% for product in products %} <li>{{ product.title }} <a href="{{ product.image }}">Image</a> {{ product.description }}&...
-3
votes
0answers
34 views

Views fields depended on published status. with AND/OR [on hold]

I am trying to build a view where specific fields are shown dependent on the publishing status. Field "image" should always be shown, but field "link to content" only if the content is published. How ...
1
vote
1answer
54 views

How can I pass an array from a controller to a template?

I want to render array to twig file I am able to render variables but not array. My php file : public function build() { $vid = 'Sectors'; $terms =\Drupal::entityTypeManager()->...
1
vote
1answer
61 views

Cache-Control response header includes “private”

Why does a vanilla Drupal 8 site add cache-control: must-revalidate, no-cache, private to all the pages? A Drupal 7 site adds cache-control: must-revalidate, no-cache. Is that addition of private ...
0
votes
0answers
29 views

Why Authenticated user not able to submit webform and only admin can submit?

I am creating a webform with just two fields and displaying it on modal popup with Ajax submit. But the issue I am facing is, this webform can only be submitted by Administer role user not by ...
0
votes
1answer
20 views

How can I change the items order in a pulldown list of filter in views?

Hello Drupal community. I have a question about Views. I have a “People” view with a role filter and the pulldown list for this filter look like this: Administrator Editor Approver I would like ...
-1
votes
1answer
25 views

How do I show multiple values from an entity reference?

I have a content A that uses reference from users. Users, basically, have more than a content A. I have view that shows users and adds a relationship from the field used in content A. I added a field ...
1
vote
2answers
35 views

Filter on boolean with NULL (unset) value

Client wants to hide some published content from specific Views displays. Unpublishing the content is not an option: it needs to remain accessible. I added a boolean exclude_from_view field to ...
0
votes
1answer
12 views

MiniOrange SAML SSO Drupal Module – Multilanguage Support

This is my first post at Drupal StackExchange. Please feel free to redirect it to the proper forum if this is the incorrect one. How do I configure Apache Server so that MiniOrange SAML SSO Drupal ...
3
votes
1answer
175 views

Is there any convention about the form IDs?

Is there a convention for the form IDs? I see that core sometimes uses module_name.form_name and sometimes module_name_form_name. In my case, I'm using module_name.form_name.

15 30 50 per page