All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
18 views

Entity Validator failing Integer for not being integer

I have a custom entity with an integer field with the following baseFieldDefinition: $fields['permission_level'] = BaseFieldDefinition::create('integer') ->setLabel(t("Permission Level")) ...
0
votes
1answer
16 views

Need multiple url paths for single node without redirecting

I have the requirement on our Drupal 7 site where if we have a single node we need to be able to have multiple url paths to reach that node. For instance lets say we have a node with id 1234 ...
-1
votes
0answers
9 views

Custom HTML / CSS Block OR import

For a given Drupal installation, how could one go about either 1.Copying and pasting HTML code to a block (while accurately specifying its required CSS). or Adding REAL RAW HTML5 code of EVERY kind ...
0
votes
1answer
18 views

Display view on all page routes

I would like to display a multi value media field and its file type and size in a content type and display it in a table layout. I thought using a view would be the best way to pull the media file ...
0
votes
1answer
15 views

How to copy/clone menu of a node when clone with Entity Clone module?

When cloning a node using Entity Clone module, the menu link are not copied. As menu link item is created and managed on the node form level, there is no reference of the menu link item in the node ...
-1
votes
0answers
8 views

How to display by code an image generated by geoserver's wms request in a webform field?

I need to show in a webform in drupal 8 an image that is generated from a wms request from geoserver, I have been testing with image select but the src is long and does not assume it completely, also ...
0
votes
1answer
26 views

Altering UserPasswordForm redirect with a custom submit

I want to alter the redirect of UserPasswordForm from Drupal’s core, I did this function maubl_user_form_alter(&$form, FormStateInterface $form_state, $form_id){ switch($form_id) { case '...
0
votes
1answer
22 views

Display the URL of where the content is located in my search results

I'm using SOLR search/search API on my Drupal 8 site and I've set the view to display the following two fields: Content datasource: Title (The title & link to the page) Search: Excerpt (...
0
votes
0answers
16 views

Ajax call in form alter of inline entity form

Inline entity form is using in bricks. In that Inline entity form, there is 2 dropdown fields available . i want to form alter in that Inline entity form, so that selection of one dropdown value, ...
0
votes
0answers
29 views

Create a link to a private file from just a file id?

I am building a controller that returns a rendered HTML Response object to an AJAX request in the theme. I need to display a button that contains a link to a private file. I tried to mimic what the ...
0
votes
1answer
34 views

Add specific CSS class to form elements from the address field

I try to add a custom css class to a form element inside my address field for e.g the postal_code field and another class to the given_name and family_name field. I tried it with a ...
0
votes
1answer
51 views

Run code once on each page load

In the past there were some hooks, such as described here: How to run check on each page load? to execute arbitrary code on each page load. Now this has been replaced with an event based approach. I ...
0
votes
0answers
18 views

Location migration not working

I'm trying to convert a d6 location field into a a d8 geolocation field, but when I run it the field does not get updated, and I don't get any messages either. All of the other node data has been ...
0
votes
0answers
32 views

Get a parent Paragraph's field values from hook_preprocess_field_collection_item()?

I'm trying to update the value of a field within a Field Collection item using hook_preprocess_field_collection_item(&$variables) but the value I need to reference is in a parent Paragraph Entity. ...
0
votes
0answers
12 views

Date difference with taxonomy field

I'm using D8 and I have a little problem with calculating age. I have a taxonomy term "Animal". It has a "name" and "date of birth" field. I have a content type "Test Results". It has a "date of ...
0
votes
1answer
43 views

Error while updating

Updated Drupal from 8.7.8 to 8.8.0 with: composer update --with-dependencies That part went well, but when I run: drush updb I get following error: In ProcessBase.php line 188: Unable to ...
0
votes
0answers
14 views

Lost name attribute after recharge select field with ajax callback [duplicate]

I have a great trouble with ajax callback, I need to recharge a select field, the callback goes right, but, the returned field in ajax request goes without name attribute, so, I lost it while submit ...
-5
votes
0answers
14 views

i am unable to view where my webform is submitted to in the results table. Here is below the screenshot [closed]

Here is below the screenshot of my pronlem
0
votes
1answer
11 views

Taxonomy Term View with Expose filter Dropdown of Terms Name

I Have a view of Taxonomy and "not Content". In this View I want a Expose filter of Term Name. But when ever i add Term Name as expose taxonomy's filter it shows text box and not Dropdown. Without ...
0
votes
1answer
24 views

Latest update to 8.7 with Commerce caused Edit buttons to appear in place of shipping/billing information

After updating core to 8.7, the input fields for shipping and billing information are now hidden and Edit buttons are in their place. This has allowed users to checkout without entering shipping and ...
-1
votes
0answers
19 views

I want to be a Chinese poetry class web site, but I don't know what can realize, please help me! [closed]

There are two main requirements: 1.Click the first option, according to Chinese pinyin of each text 2.Click on the second option, the meaning of each sentence My idea is that (1) each text quotes a ...
0
votes
0answers
14 views

Allow unique email field across multiple webforms

I have two web forms with similar data, but with different conditions. One form is filled by an employee and the other is filled by a vendor. I do not want to see duplicates across these forms. ...
0
votes
0answers
17 views

user_login_submit doesn't work when called in an inner function

We have a shared register function that multiple pieces of our app use. When registration is successful, we log the user in. But for some reason, when a user completes this project via browser in the ...
0
votes
1answer
17 views

Entering views result to field through rules

When I create a new OG, I would like the user with the least number of OG subscriptions automatically to be added to this group. So I created a views block where I count and least the user with the ...
0
votes
1answer
16 views

Limit Webform Submission to one per quarter per user

I need to limit one webform submission per quarter. For each quarter, the user can only make one submission. I want to use one webform. Here are some examples of the date period and the due date. How ...
0
votes
1answer
14 views

Show administrative description in Views

I am needing to do a Views report for all webforms on our site (we currently have 27 forms) that can show me the total submission count per form. The issue I am having is that we need the Views ...
0
votes
0answers
11 views

Ensuring a smooth node-add routine

I am building a site in Drupal 8, where users can add training programs. An example of such a program could look something like this: The way I see it, I will need 3 node types: Node type 1: Program (...
0
votes
1answer
29 views

How to display since when the node was created? [duplicate]

How to display since when the node was created with TWIG. Here is the templace of my node : <div class="card mb-5 p-0 overflow-hidden shadow rounded bg-white"> <div class="card-header ...
0
votes
0answers
14 views

Remember and display submitted form values in Ajax Add More example?

I am testing out Drupal's Form API examples and I am stumped. In the Form API's Ajax Add More example you can input names into a textfield. There are also two buttons to add/remove one textfield. ...
0
votes
2answers
40 views

Invalidating Paragraph Cache

I'm working on a paragraph type that will need to display on a very limited number of pages but has some specific functionality where the preprocess function will need to run each time. In my ...
1
vote
1answer
22 views

How to prevent a user from deleting an entity referenced node before deleting the referencing (child) node first?

I have a Content Type called ItemRequest, and another Content Type called ItemOrder. One of the fields in ItemOrder is "Related Item Request" that is an Entity Reference to ItemRequest. Each ItemOrder ...
0
votes
0answers
19 views

Can't remove product attribute field from product

I've created first product type which allows products to have multiple variations. It has product variation and product attribute "flavor" and it works well. Then I've created second product by ...
-2
votes
3answers
58 views

Where is the temporary directory defined in the code?

I wonder where the tmp dir is set in the code of Drupal 8. Indeed the upload_tmp_dir value is not set in the php.ini and I have no access to change it. Where in the code the value is defined and ...
0
votes
0answers
11 views

How to get the node title which is related to file in File usage view?

I am just trying to list out the nodes which are linked to files in the File Usage view. That will show up in this URL: /admin/structure/views/view/files/edit/page_2. In this view I tried to add ...
0
votes
0answers
28 views

How do I programmatically add fields to Paragraph types?

I have one paragraph type of Product. and I have to add one field to paragraph product programmatically, how can I achive this. function my_module_field_widget_paragraphs_form_alter(&$element, ...
-1
votes
0answers
30 views

Trusted host patterns not being recognized in custom settings.php file [closed]

I have created a custom settings.gitlabci.php file for setting trusted host patterns in a gitlab pipeline environment. See code below. <?php // @codingStandardsIgnoreFile if (getenv('GITLAB') ==...
-1
votes
1answer
14 views

Remove Passwords match: text from Registration form

How do I remove/disable "Passwords match:" text in Drupal 8.
-2
votes
2answers
32 views

How to execute login feature on Chrome browser

Just using Behat with drupal 8 and facing problem with login behat script to run. Below are the my code : behat.yml default: suites: default: contexts: - FeatureContext - ...
0
votes
0answers
10 views

How to display field labels in Views lists that show full content or rendered entities?

I have a view that displays multiple content types and for this, I went and created custom displays. It works fine except that Views seem to strip all fields from labels. I did a dump of twig fields ...
0
votes
0answers
9 views

Phpcbf error, Undefined index: scope_closer [closed]

$ phpcbf text.php PHP Fatal error: Uncaught PHP_CodeSniffer\Exceptions\RuntimeException: Undefined index: scope_closer in /pathto/drupal_code_standards/vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/...
0
votes
0answers
21 views

How to solve “Query failed” error in drush sql-sync output 2?

I have the exact same problem as in How to solve "Query failed" error in drush sql-sync output?, exact same output. That user found the answer as the password in settings.php was wrong, but ...
0
votes
1answer
51 views

How to build a simple data comparison rule?

I am working on Drupal 8.7.10 and I have installed a fresh Rules 8.x-3.0-alpha5. Could someone help me to start a very simple rule? I am still struggling with the "new" Rules. All I need is to send ...
0
votes
1answer
30 views

Set new theme setting to default on theme update

Working We have a custom base theme. There are custom theme settings with default values. When the theme is initially installed, the theme settings are correctly set as default. Good. This custom ...
0
votes
1answer
23 views

How to upgrade to Drupal 8 from 7 with clean install? [closed]

I currently have a Drupal 7 site that I want to install Drupal 8, but do a clean install. This means wiping away everything and starting with a new Drupal 8 instance. I have seen many articles on how ...
1
vote
3answers
32 views

I extended some functionality in the slick module, but I am looking to do it in a way that doesn't get erased each time I update slick

I extended some functionality in the slick module, but I am looking to do it in a way that doesn't get erased each time I update slick. I added a css file and edited the slick skin php file to use ...
-2
votes
0answers
22 views

What's the correct naming suggestion for overriding a views template? [duplicate]

I have a view that lists links to all of the pages in a certain content type. How do I create a template override for that view? I've tried: views-view-unformatted--my-view-name-%.twig.html And ...
0
votes
0answers
15 views

db_select with groupBy(CAST(column as DATE))

I am looking to achieve GROUP BY CAST(date_time AS DATE) in a db_select function in Drupal 7 but with no idea how. The function up until now is: foreach ($distinct_users as $user){ $day_record =...
-2
votes
0answers
33 views

Regex pattern to validate a field value [closed]

What is the regular expression for a text field where the value starts with an @ sign and must contain a-Z and numbers to validate form fields with Webform? Example value: @myusername123?ß
0
votes
0answers
20 views

How to select a default “text format”? [duplicate]

I created a "Text (formatted, long, with summary)" field. If I select a "Text Format" in "Default Value" and save it, it does not save and always returns to "Plain Text". The only way to keep the "...
0
votes
1answer
33 views

Add value to a custom composite element in webform via hook_update_N

Testing out some bits with webform. I have created a webform via my module. In it I have a number of elements including a custom composite. Inside the custom composite I have several elements, one is ...

15 30 50 per page