All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
462 views

How do I install a 3rd party PHP library in sites/all/libraries - can I just plonk it in there?

For example, according to the Drupal module s3fs, I can -- to quote their README.txt :- 2b) If you don't have drush, go to to http://aws.amazon.com/sdk-for-php and click the orange "AWS SDK for ...
0
votes
2answers
6 views

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

To be completely honest, I found a way, but it feels off. Here is my code: function walk_handler_entity_presave (EntityInterface $entity) { if (method_exists($entity, 'getType') && $entity-...
0
votes
3answers
394 views

Contextual links for node blocks

I have the Nodeblock and the Contextual links modules installed. They work fine, but I want to add the "Edit node" link in the contextual links for node blocks. For views, there is a "Edit view" link, ...
0
votes
0answers
19 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 ...
1
vote
1answer
402 views

Create a view block on a node reference field (using Node Reference)

Creating a related content block on a node reference field. I have two content types: Article and Author. The content type Article has the field Label: Por 'field_autor' which is a node reference to ...
0
votes
2answers
327 views

How can I refresh the adjustment tax after changing the line-item price?

I create orders programmatically, and I have a tax problem: the order, after changing the line item price, always has the tax cost with the old product price. How can I refresh the adjustment tax ...
0
votes
1answer
381 views

How can I alter (theme) the default content feed?

How can I alter (theme) the default content feed on the front page (the list of node teasers) so that my 'thumbnail' image style is used instead of my 'medium' style for the images contained in the ...
7
votes
1answer
1k views

How do I enable and use a view mode for a product type?

In default commerce2 (drupal 8) I want to add second product-type view mode, to show in views - like teaser version, including add-to-cart btn with variations. I have additional field in Product type ...
0
votes
0answers
6 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 ...
1
vote
1answer
704 views

Migrate media with alternative text

I'm trying to import image with new media module on core 8.5. I've a json source and on my .yml I've: field_media_image: target_id: plugin: migration migration: immagini ...
0
votes
1answer
15 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
3answers
1k views

User list view showing total nodes created for each user

I have a view which displays a list of particular users. For each user displayed I would like to also display the total number of nodes that user has created. I was wondering if there was an easy and/...
0
votes
1answer
420 views

Accordion display for views inside panel

I have a panel page which contains 2 views. I only want 1 view to display as an accordion. My problems are - If I set the style setting of the view to accordion - nothing happens. If I set the style ...
3
votes
2answers
558 views

How have multiple instances of a Custom Block?

So I have a custom block that has been created within the module. I have used the drupal API to generate the brand new fields - which works perfectly. However, I am having an issue regarding multiple ...
0
votes
3answers
354 views

Problem creating redirect from page with %20 [on hold]

I've been researching the issue for hours and can't seem to find a working solution to this problem. I've created a redirect from /sites/default/files/OLB%20Registration%20Guide.pdf to /sites/default/...
2
votes
1answer
333 views

Is it possible to create a hierarchical exposed filter in views using the Data module?

I'm using Data module to adopt tables from the same DB as 'native' Drupal tables and Views module to present the data. I added two dropdown exposed filters with Selective filter module. It takes all ...
1
vote
2answers
46 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?
3
votes
2answers
539 views

Overriding permissions selectively via settings.php/settings.local.php

The use case is a development module that you would only have installed on a local environment. My thought was to use $config in settings.php to do this: $config['user.role.anonymous']['permissions']...
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 ...
-2
votes
0answers
24 views

How does mapping (OL/Leaflet) actually work nowadays?

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 ...
0
votes
0answers
17 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
1answer
335 views

Disqus comments without extra login?

I have a Drupal site that utilizes Disqus commenting, but want users to be able to use commenting function, without having to login to Disqus. Is there a way to make Disqus automatically inherit the ...
0
votes
0answers
21 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 ...
0
votes
0answers
6 views

How to enable click-sorting for view 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 ...
1
vote
1answer
393 views

How to change the SID of webforms to increment from a new starting number

We launched a new website that uses webforms but need to make sure our webforms are using an SID for results larger than the last number used on the old site. Please note that I am not referring to ...
1
vote
1answer
439 views

Update commerce cart block when product added through ajax

Hii How can I update commerce_cart_block when my product is added through ajax. Any suggestion will be helpfull.
0
votes
1answer
341 views

Change “Custom Text” field value

In Drupal 8, I created a view containing a Custom Text field. I want to alter/change its content for each row I get after running some code. I tried implementing hook_views_pre_render() and ...
1
vote
1answer
390 views

Pass data to hook_entity_insert

How can I pass data to hook_entity_insert() given that the arguments it takes are fixed? I'm writing to the database during entity save, and need to be able to pass some data in this hook.
0
votes
0answers
17 views

Displaying translated nodes in views

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
14 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. ...
1
vote
1answer
671 views

How to sort the query results?

In my task I need to display the results based on "the newest first". I perform a query: $query = \Drupal::database()->select('node_field_data', 'node'); $query->innerJoin('...
0
votes
1answer
340 views

Checkboxes in a simple form are not displayed

I have a simple form in a custom module that works well and is displaying my select as it should. $form = \Drupal::formBuilder()->getForm('Drupal\efq\Form\FilterForm'); $form["container"] = array(...
0
votes
1answer
55 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 ...
1
vote
1answer
338 views

How to set node creation limit by user type in Drupal

I'm trying to set the limit on authenticated user for creating particular type of content(adding user limit on content type). Node limit module has same functionality in Drupal 7 but i'm looking for ...
0
votes
1answer
526 views

Twig Tokens in Views not Rendering Inside an HTML Element

I'm using views to create a custom block of shortcut icons and need the images to link to the corresponding content. Using Rewrite Results I can overwrite the output of the view and have an anchor tag ...
1
vote
1answer
34 views

Different CSS file when in development mode

Using Gulp I create two css files. One style.css and one style.min.css. Is it possible to load the style.css when developing (locally) and the style.min.css when in production (remote)?
1
vote
1answer
830 views

REST GET ResourceResponse returns encoded json

I have a decoupled drupal project with an angular 5 front end that is utilizing a restful api to store data. Because this API needed a key that we didn't want to expose we have created a restful ...
1
vote
1answer
396 views

Changing user register/login pages into secure sub domain

I need to change my user registration and login pages into a secure sub domain of my site, how is it possible ? In detail, When user logon to http://www.mysite.com/admin that must be redirected to ...
2
votes
1answer
184 views

How can I check the status code of a page?

I want to check the status code of a page. I have tried with the following code in hook_preprocess_page(), but it doesn't work. $status = \Drupal::requestStack()->getCurrentRequest()->...
0
votes
1answer
30 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
1answer
40 views

How do I make my site with pre-loaded content and pre-loaded config available to others without creating a distribution? [on hold]

I want to be able to provide a simple way for users to install a Drupal website that contains a certain set of content, contributed modules and custom content types. I also want to keep the process of ...
0
votes
1answer
151 views

How can I avoid getting “This route can only be accessed by anonymous users”?

I'm trying to use REST login from a React native app. When the user tries to log in, the app calls: var data_node = {name:this.state.username,pass:this.state.password}; axios.post('http://IP/user/...
0
votes
1answer
343 views

Drupal7 REST Basic Authentication not working (Postman)

I configured my rest with services and installed the Basic authentication module. I used Postman and selected basic authentication gave username and password, I got "Missing required argument ...
1
vote
2answers
2k views

How to expose paging data in REST export views

How to allow views to export paging data along with entities? I can set pager, and it works of course, for example my_view?page=1 displays something like [ {...}, {...} ] but I only get list ...
0
votes
2answers
336 views

Search page : display pager on top

I have used the core Search Page functionality in Drupal 8 to built a search engine on my site. The pager is displayed at the bottom by default. How can i display the pager on the top also? Note: I ...
62
votes
6answers
63k views

Print the query which is built using db_select()

I want to print the query which is built using db_select() in a programmatical way. Is there any API function provided by Drupal Abstraction Layer? It is similar to query output in Views, but I want ...
2
votes
1answer
405 views

How can I moderate user's edits of user profile?

I need to create approval for editing a user's profile - I want all revisions to a profile to be subject to moderation. I have found module called User Revision, but that is not a solution for me as ...
0
votes
0answers
30 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' => [ '...
1
vote
1answer
770 views

How do you override the add or edit node for a particular content type

I want to format the editing or adding form for the article content type. i.e. node/add/article path and editing the same article. I copied over the node-edit-form.html.twig template from core/modules/...
1
vote
1answer
459 views

Custom view for Entityform submission

I have a simple Entityform where the user selects from a list of Profile2 user profiles (internal staff and external staff). In simpler terms, the user selects from a list of entities (ie. pick 3 from ...

15 30 50 per page