All Questions

Filter by
Sorted by
Tagged with
-2
votes
1answer
14 views

How to build drupal 8 eCommerce site

I would like to build my first eCommerce site which will sell products from different categories. Site also going to have affiliate links. I have searched online and see many useful information but I ...
0
votes
0answers
8 views

Automatically Generate PDF from Webform Submission

First off, this is under Drupal 7. I'm looking to have the server save a PDF of the submitted webform when a user submits it or updates it (overwriting the old one on update). So far I've had no ...
0
votes
1answer
9 views

PHP fatal error when attempting to run drush

When attempting to run drush, it gives no output. It just fails. Looking at the error logs how this fatal error: PHP Fatal error: Default value for parameters with a class type hint can only be ...
0
votes
0answers
13 views

Why is wrong ajax callback function called?

I have two buttons $form['button_1'] = [ '#type' => 'button', '#value' => false, '#ajax' => [ 'callback' => '::ajax_submit_1', 'wrapper' => 'wrapper_1', ], '#...
0
votes
0answers
9 views

Entity Reference View fails after update to drupal 8.7.6

Recently I updated my drupal site from 8.6.14 to 8.7.6. A previously-working Entity Reference View display that is connected to a form Autocomplete field stopped working. The spinning circle keeps ...
0
votes
0answers
18 views

How does will() actually test anything?

I'm beginning to learn about writing tests for Drupal 8 via PHPUnit and am unclear on how the will() method actually serves to test anything. Given this code (derived from examples and tutorials on ...
0
votes
0answers
23 views

entity ref shows on node, but not when node is set as home page

I suspect I may just have a simple misunderstanding of how a home page is generated, but... In a Drupal 8.7.5 website, I have a node (basic page) that I've added a paragraph entity reference field to....
0
votes
0answers
8 views

How do I get the upload progress bar activated for image uploads?

I am on the latest version of D8, on a LEMP stack, and have PECL upload progress enabled. I’m also using cloudlare cdn modules for caching and similar, but not yet for any file storage. Looks like I’...
0
votes
0answers
12 views

Serialization of dependencies

I'm using Drupal 8.6 and I'm doing the serialization of a node. This node has related fields, which I also would like to serialize. In my case I have an article which has a photo gallery which has ...
0
votes
0answers
7 views

viewElements Fails To Fire in Custom Field Formatter

Using the code, below, in my_module in the path my_module/src/Plugin/Field/FieldFormatter/DateRangeSpecialFormatter.php the format appears both in the Views field dialog and the content type manage ...
0
votes
0answers
13 views

How to disable form button on ajax callback?

I have a button with ajax callback and I want to disable it on button click without page reload. Preferably inside ajax_function but it's not obligatory. $form['my_button'] = [ '#type' => '...
1
vote
0answers
8 views

Why doesn't Rules Conditional recognize a hidden field value?

I'm using Drupal 7. I have a simple "email confirmation" system set up using rules. The setup is this: "Reservation" Content Type has a boolean check box for "confirmed". "Reservation" Content Type ...
0
votes
0answers
21 views

How to register a custom function for labelCallbacks for an existing entity?

I learned that in EntityBase the label method gets called to determine the label for an entity, for instance when it is rendered via the entity reference module as label. Now, for specific node types ...
1
vote
1answer
36 views

Cache pages/variables in hook_preprocess() for anonymous user

So I am having trouble understanding the caching of variables set in hook_preproccesses for anonymous users. It seems that the entire page is cached, and not rebuilt, even when set to no caching. With ...
-1
votes
0answers
5 views

How to make the overviewTable to be descending

I want to have an overview table with descending id's. It feels like i looked everywhere for the answer but it just feels like nobody cares.
0
votes
0answers
8 views

Migrating into Double field

I am migrating a CSV into D8 node type which has a double field. The CSV has the following structure: I am trying to migrate the year, from the header, into the first double-field subfield (as a ...
-2
votes
0answers
16 views

docker on virtual box running out of memory [on hold]

I'm running docker on an oracle vm and running a drupal instance , where i do migrations from a d7 to d8 database both of which are there . the migrations were running fine but lately i get a memory ...
0
votes
1answer
14 views

How to show a field value instead of the node title for nodes displayed through an entity reference field?

Edit: I think I found the place, just not the method yet. If correct, I will close this question. Sorry. I have no clue which hook or direction to look into. I would like to have a label or title ...
-1
votes
1answer
7 views

How can I import a local database remotely without having a local database copy?

I am working on database security and with using Drupal we have daily backups from a cloud server which we access remotely. What I normally do is grab a daily DB copy from the cloud server, move the ...
-3
votes
1answer
21 views

How do I deploy a site?

I am following this link to set-up a Drupal 8 site, I am installing drupal-composer/drupal-project as a template for my composer install for the first time, as I forced myself into drupal 8 for future ...
0
votes
0answers
11 views

Media field permissions

I have a certain use case. I have an entity that has a "media" reference field. I want users to be able to add/edit/delete media entities without giving them Edit any media or Delete any media ...
1
vote
1answer
31 views

Is there a way to update custom packages with composer?

The project is using Drupal 8 composer template to manage dependencies. Some of the packages are defined locally to look like Drupal modules and be installed in a specific location. An example could ...
0
votes
0answers
18 views

how to submit multiple value in custom entity in drupal 8?

If I submit single value from dropdown of custom entity field then it will save in data in db. below is the code, working fine. $fields['participants'] = BaseFieldDefinition::create('entity_reference'...
0
votes
0answers
18 views

setErrorByName() not highlighting multi-select fields

I have the following HTML code, generated by drupal <div class="multiselect-selected"> <select multiple="multiple" name="field_test_ins[]" data-drupal-selector="edit-field-test-ins" aria-...
-2
votes
0answers
13 views

Show Archived content to anonymous user

I am using the workflow module for content moderation. My states are draft wait for approval ready to publish reject published archived My Transactions are draft -> wait for approval wait for ...
-2
votes
0answers
25 views

Get all the content of a particular content type

I want to list all nodes of particular content type in twig file. I got all data in MYTHEME.theme file but I got null value in twig file I used the following code. /** * Implements ...
0
votes
0answers
25 views

Collaborative of theme function in Javascript [on hold]

Drupal has theme function in PHP Language that register with hook_theme(). Drupal has theme function too in Javascript language but between one module and another can not recognize each other ...
-4
votes
0answers
29 views

Switch language without URL being switched

I want to switch language in my Drupal 8. My language detection is URL. But I don't want users to be able to override the language switch by typing in the address bar. For example www.mysite.com/ (...
-2
votes
0answers
13 views

Does Salesforce Suite supports Per user Authorization? Do we have alternatives? [on hold]

I am trying Salesforce Suite on my Drupal site in order to integrate to Salesforce. I can see from the docs and the actual configurations options that I can only use a dedicated API user integration ...
-1
votes
0answers
20 views

When is the create_function completely removed from PHP? [on hold]

I have a old Drupal 7 site and have views_php modules installed, but I get the error message Deprecated function: Function create_function on my PHP 7.2 server. Since its a deprecated function, from ...
1
vote
2answers
33 views

Is it normal for a database to have 3600 tables?

I recently inherited a Drupal site and while trying to migrate the site and DB I noticed that the DB is 1GB+ and had 1000s of tables. This is the first time i work with Drupal so I'm not sure what ...
-2
votes
0answers
14 views

How do I enable users to submit sessions in “Conference Organizing Distribution”?

I don't see any configuration item or link that would enable logged-in users to submit sessions in the Conference Organizing Distribution module. How can I enable this? What link should I use? I'm ...
0
votes
1answer
25 views

Exposed filter only allowing content types in list

I have a view called (Resources) that displays content filtering by content type. These are the selected options: Expose this filter to visitors, to allow them to change it: ✅ Filter type to expose: ...
1
vote
1answer
18 views

Custom Validator on Custom Form

I see all kinds of examples of how to add a custom validator to an "existing form." Which means, you would use hook_form_alter. I want to add one in the code for my custom form. I'm adding this in ...
1
vote
1answer
19 views

How to load a file located in core/includes?

I'd like to execute PHP code that requires functions available in the includes files of core located in core/includes. I found ModuleHandler()->loadInclude() and module_load_include() but I am ...
0
votes
2answers
34 views

Webform Error Occurs During Configuration Import

Currently we are having some trouble handling webform module configuration on our various environments. When running a configuration import drupal config:import --directory=$SYNC_DIR on our dev ...
0
votes
0answers
7 views

Saving a translated node overwrites the last saved URL aliases

In Drupal 7 I updated the node in english then alias update in english version which is right I updated the same node this time in french then alias updated in french and also updated in english ...
0
votes
1answer
25 views

How to remove a taxonomy vocabulary via database query

To manually remove a taxonomy vocabulary in the database, what tables/columns etcetera do I need to delete or modify? I have a "ghost" taxonomy - it shows up in the list, but doesn't exist anywhere ...
0
votes
0answers
19 views

Custom Commerce Payment Gateway - Order Information Form

I have followed the documentation over at https://docs.drupalcommerce.org/commerce2/developer-guide/payments/create-payment-gateway/getting-started#step-3-create-a-payment-gateway-plugin My ...
0
votes
1answer
13 views

Unresolved dependency updating the module

I'm updating the Views module on a Drupal 7 site, and I'm receiving this message when I update the database. How do I resolve this dependency issue when I need to update the Views module first?
1
vote
1answer
28 views

Composer update still shows an older version of a module

Updating dependencies according to these instructions offers an older version of the module. Composer.json file has the package required as "drupal/h5p": "^1.0@RC", and it used to update just fine. It ...
-3
votes
0answers
13 views

How to create a slide up menu on mouse click [on hold]

Does anybody knows a method or a Drupal module helps in achieving the Slide Up Menu shown in the above image for a online website: 1) The below image show that there is no visible menu to perform an ...
1
vote
1answer
17 views

Patch method sample code REST API

I am working on web services in drupal. I have created a sample module for get method to expose the data using web services. I have not found any sample code for the patch method. code for get method: ...
-1
votes
0answers
12 views

Theme suggestion for commerce-cart-form input--submit buttons [duplicate]

I have a Drupal Commerce cart view (overview of the cart). In the form 3 buttons are rendered. delete-order-item button update list button checkout button I want to create 3 specific theme ...
0
votes
0answers
15 views

Assign a particular permission to a specific user role while installing the module [duplicate]

I have custom permission called Access vm content list in my module's module_name.routing.yml. And I listed the same in the module_name.permission.yml to get it managed via admin panel. While ...
2
votes
0answers
45 views

Webform module loosing language for referenced options

First I have content type "Quiz option" which is translatable. Then I have a view that returns Entity references of that type. For language option I selected "Content language of view row" and also ...
0
votes
0answers
25 views

How to show date as “XX ago” (only two digits) in comments/node/taxonomy/blocks? [duplicate]

This code works for comments but I need to display the date in two digits (XX minutes, XX hours, X year) not as "XX hours XX minutes" for example. And I need to apply this format for the rest of the ...
-4
votes
0answers
37 views

Show different item each render [on hold]

I have a Drupal 8 view that has several items in it, but I've configured it to show just one. What I want to do now is to iterate through the items on each page render, so each item get's equal ...
1
vote
0answers
14 views

Composer update - Your requirements could not be resolved to an installable set of packages

when I run a composer update --with-dependencies, I get the following error message: Problem 1 - don't install drupal/core 8.6.0|remove drupal/drupal dev-master - don't install drupal/core 8....
-1
votes
0answers
24 views

Site HTTPS insecure on some browsers and others are fine [on hold]

I have the following url: https://www.example.com/about It shows that it's insecure on my phone, Edge, and Firefox browser. But on Chrome desktop it works correctly by redirecting it to the https://...

15 30 50 per page