All Questions

-1
votes
2answers
26 views

Passing a variable between two hooks [closed]

I'm working on a module that implements hook_entity_presave and hook_entity_update. I need both of these functions to only perform an action if the entity bundle is one of a few types. What's the ...
1
vote
1answer
15 views

How to limit a custom views filter to a certain display type?

I'm creating a views filter, and I would like to limit it by display type. How do I do that? I'm creating a custom filter for the entity_browser view display (entity_browser/src/Plugin/views/display/...
0
votes
1answer
20 views

How to fix drush issue “Could not bootstrap at phase 5”?

I installed drush via Composer. I am using drush 9.5.2 with Drupal 8.6.4. I mention that everything is fine on local. However, in a docker instance in GitLab CI, when I execute vendor/bin/drush ...
0
votes
1answer
35 views

Avoid repetitive API calling in form rebuild while submitting

I am calling external API in form build function. While submitting form gets rebuild and call external API again. How can I avoid repetitive API calls in the form's build function? I used form_state-&...
0
votes
0answers
58 views

How to optimize select option Book outline of Book module

I'm using module Book of Drupal. It's so great. But I have a lot of books about 3000 books. When I create chapters for books that choose books very difficult because select option very large and ...
0
votes
0answers
18 views

How to switch between views displays through ajax

I do have a view with exposed filters and a quite hierarchical architecture of the data which demands multiple grouping and sorting criteria. because of different use cases, users need to change the ...
1
vote
4answers
295 views

How to to redirect a form to a certain node for anonymous users?

In a custom module, I have a form that is triggered by an option in a menu. I'd want this form to be redirected automatically (without action of the user) to a certain node (/node/2) when the user is ...
-2
votes
1answer
16 views

How do I stop the unexpected error with drupal watchdog and variables = i:7;

I am using a watchdog command to log watchdog(self::MODULE_NAME, "Successfully written to %file", array('%file' => $local_file), WATCHDOG_DEBUG); it causes a database row with i:7; in the ...
1
vote
1answer
15 views

Export JSON sitemap of views

I have a Drupal 8 site that is using a bunch of custom views with REST endpoints. These views contain a bunch of content nodes on them which make up a single page. I have been able to generate an XML ...
0
votes
1answer
21 views

Block machine name is in use that is not available

I have a Site Branding block I style in my theme. To do this I give it a specific machine name, in this case: sitelogo On a site using that theme I am trying to create this block but when I try to ...
1
vote
0answers
36 views

Need to remove 'drupal' from html attributes

I've been tasked with removing 'drupal' from front end source code and I've managed to remove most by modifying templates and using theme hooks, but I'm struggling to remove it from a <script> ...
0
votes
0answers
17 views

CKEditor toolbar missing when conditional field becomes visible

I use the D8 Conditional Fields module to make a CKEditor field (author bio) invisible until there is something in another field (author). When I type something in the author field, the author bio ...
1
vote
1answer
29 views

Is there any “block_user” module?

After moving my sites to the new server, and some updates in the mean time. I have found one of the sites displaying the "The following module is missing from the file system: block_user bootstrap....
0
votes
0answers
9 views

Undefined index: scheduled_transition_state BaseFieldOverride.php:167

I'm trying to upgrade from Drupal 8.5 to 8.6 and I keep getting this error: [info] Undefined index: scheduled_transition_state BaseFieldOverride.php:167 TypeError: Argument 2 passed to ...
0
votes
0answers
38 views

drupal_http_request as authenticated user during cron

I have a rule set up that runs during cron. Part of that rule is an action that is supposed to save a PDF (via Entity Print which only authenticated users can access) to my server. It works fine when ...
0
votes
0answers
51 views

Use Drupal's Default Views Filter Handler Plugins on Custom Views field?

How do I use Drupal's core Views filter handler plugins on a custom views field? I have tried some different approaches, and am thinking maybe it's not about the value being returned so much as ...
6
votes
1answer
250 views

“Declaration of <function> must be compatible with <interface>” in Drupal 8.6.10

Up until Saturday I had a functioning Drupal 8.6.x instance. The I did composer update and Drupal 8.6.10 was installed. Since then I get the following in my error logs: Declaration of Drupal\Core\...
0
votes
3answers
36 views

How can I display a list of users who have the same taxonomy term

The setup: A Taxonomy Vocabulary called "Area of work". The vocabulary has the following associated terms: A, B, C, D, E, F, G, etc. During registration users have to choose a department from the ...
0
votes
0answers
50 views

Automatically I am logout when I visit the home page

Any logged in user (including Admin) on my Drupal 8 site is directly logged out when he visit a the home page. Say I am on whatever page (/user/1), If I visit the home page by clicking on my website ...
0
votes
1answer
41 views
+100

Translating a taxonomy term does not populate content into fields

When translating a node into another language it does the following: automatically populates all fields with content from the source node on the edit form ensures the two nodes are linked as ...
1
vote
2answers
27 views

How to remove partricules and apostrophes in url

I'm using drupal 8 and Pathauto. I have title of the type (in French) Personnes d'Allemagne, I would like to delete d' to have like url personnes-allemagne. Pathauto removes the apostrophes well, ...
0
votes
1answer
28 views

How to use a RedirectResponse with a # (hash)?

I have this code: $event->setResponse(new RedirectResponse(base_path().'mypage#actions_clicker')); It redirects to /mypage, but it doesn not include the #actions_clicker part. How do I make ...
0
votes
0answers
11 views

Feed import drupal 7 don't delete Delete non-existent nœuds

I'm a beginner in Drupal. I have Feed import on a drupal installed, the option "delete non existent node" is checked but when the import was triggered, nodes still appear. Is a bug ? or something ...
0
votes
0answers
16 views

Configuration translate Form Access Denied

This questions has repeat several times, but I face similar issues. Here are configuration yml information webform_protected_downloads.configsettings.yml token_text: 'test' langcode: en ...
0
votes
1answer
36 views

How to output multiple files url entities on twig?

I have a file entity field that I can upload multiple files and I'm trying to render or display it inside my node twig template. The code below is what I'm trying to make it display. Tried clearing my ...
-1
votes
1answer
16 views

Product / subscription / membership for places on a physical veg box scheme?

My client can provide max 30 veg boxes at any one time, delivered physically. A purchase buys a weekly delivery for 6 weeks (ie 6 veg boxes). When the 6 week period is over, deliveries stop. So there ...
0
votes
0answers
18 views

Saving a view shows “This display has no path”

I have migrated my website to a new host. Now, the front page logo is missing and dynamic block contents became static. On editing a view block, it shows: All changes are stored temporarily. ...
1
vote
2answers
58 views

How do I give access permission for specific node to anonymous User

I have removed "Access Content " Permission from Anonymous user. Now want to display specific node to the anonymous user. As this is for only 1 or 2 nodes, It's not a good idea to use a contributed ...
0
votes
0answers
22 views

Export Media Type config with Drupal Console [closed]

I need to export media configuration for different Media types in my Custom module using Drupal Console. I was able to export paragraph type with Drupal console
0
votes
0answers
26 views

Tempstore UUID goes to 404 page

I am using JSON API. For the Preview, for the newly created Article storing UUID in tempstore. http://127.0.0.1/project/jsonapi/node/article/f0c7fa28-5289-49b7-9c90-94c81d198d87 But when I run it ...
0
votes
1answer
28 views

“Language neutral” is not available for content

On a standard multilingual Drupal installation (Drupal 8.6.10), when editing existing content or creating new content the option language neutral isn't available; only the enabled languages and some ...
0
votes
0answers
15 views

How to upgrade a site that uses node_gallery for galleries and images?

I have a Drupal 7 site that uses node_gallery to publish several image galleries. This has been working well for several years. I'm looking at upgrading that site to run on Drupal 8 instead. ...
0
votes
1answer
14 views

Location Contextual Filter: Distance/Proximity works for all nodes but one

Drupal 7 site with Location and Location CCK modules. Client has custom content type with Location field provided by Location CCK module. Each Location node has a Views block display of Nearby ...
0
votes
2answers
39 views

Options form with FieldPluginBase?

I tried some variations on the code below, but I have not been able to pass my custom form options to render(). class CustomField extends FieldPluginBase { public function query() { // This is ...
0
votes
1answer
26 views

Cannot edit new View

Since I updated to 8.6.10, I can no longer edit a new view. I can create a view but when I go to the main interface after clicking Save & Edit, nothings works. No matter what I click on, aside ...
0
votes
1answer
14 views

Pass argument when overriding controller in RouteSubscriber

I am having the issue of overriding the default taxonomy controller /taxonomy/term/{tid}. I have created my own controller which takes {tid} as a parameter and I want to use it instead, so I overrode ...
1
vote
1answer
35 views

How to create a “Make this Sticky” link or tab

I need faster way to promote a node I'm looking at. I usually go for: "Open node view page" (IE: https://example.com/node/123) "Click Edit" (IE: https://example.com/node/123/edit) Scroll down ...
0
votes
1answer
19 views

Admin Access for Webform Entries

The following problem has occurred: A client fills in a reservation form, but the time requested is already fully booked. The clerk and the client negotiate a different time, and the clerk wants to ...
1
vote
1answer
217 views

What was the motivation for developing the plugin API?

I am trying to wrap around my head as to what was the need for the Plugin API when the module system extends the Drupal core.
0
votes
1answer
15 views

Relate Content to a Group feature when creating a node outside a group

In my drupal site, I'm using the Group module. My problem: I created a regular Drupal node type, let's call it userpost I created a group type called "usergroup" The content type "userpost" is ...
0
votes
1answer
13 views

Replacing Private message module with nodes

I was looking for a quick answer to the problem of allowing members to write each other messages. The Private message module looked like the most complete solution. However, it has some significant ...
3
votes
1answer
71 views

applyUpdates() is deprecated. Is it really needed in hook_install() anyway?

I maintain a contrib module which defines two base fields, but these are not added to any content type on installation, as this is done during admin config. The module has // Add our base fields to ...
0
votes
1answer
19 views

How do I correctly implement hook_bootstrap_colorize_text() to alter button colors in a Bootstrap sub-theme?

I have read similar questions on here, but I'm still struggling for an answer for this. I'm trying to implement hook_bootstrap_colorize_text() to alter button colors in a Bootstrap sub-theme. I ...
0
votes
1answer
26 views

When should I use the private file system instead of public file system?

I try to build a social network on Drupal 8 currently. And now I have to decide, which files (e.g. user pictures, uploaded user files) should be handled as private files and which as public files. ...
0
votes
0answers
17 views

Media & Media Entity Browser upload problems

I am using the following: Drupal 8.6 Media Media Library Media Entity Browser 8.x-2.0-alpha1 Inline Entity Form 8.x-1.0-rc1 Entity Browser 8.x-2.1 Entity Embed 8.x-1.0-beta2 Mainly to upload ...
0
votes
0answers
12 views

Add a custom condition in payment gateway configuration

In drupal commerce, while adding a new payment gateway [ Home >> Administration >> Commerce >> Configuration ], there's a section called Conditions where you can specify a certain ...
0
votes
2answers
51 views

looking for equivalent webform select view module on Drupal 8 [closed]

I am a new to Drupal 8 I am trying to make select options with webform submission. What module do I need? and How can I make this select options with that module? Thank you very much! implement
0
votes
0answers
30 views

Do we need any init steps in this scenario?

In Order to install Drupal Core using Code deploy, I follow these steps. Download drupal-7.x.zip /usr/bin/unzip -o /tmp/drupal.zip /bin/mv /var/www/drupal-7.x /var/www/drupal Similar steps to ...
0
votes
1answer
31 views

Create migration stubs of entities for a multiple value reference field?

I need to import a set of authors as part of a content entity. It is an array in a JSON object of id/name. I have a field in Drupal on the content type to be a user reference that accepts unlimited ...
0
votes
1answer
22 views

Where files are used if path entered by hand

I am brining a 100 or so static pages into my drupal install here. We are pasting the content from the static site into the body of a content type. I am using ICME to upload the images and documents. ...

15 30 50 per page