All Questions

Filter by
Sorted by
Tagged with
3
votes
0answers
44 views

How to achieve layout nesting in layout builder?

We have a content type (Page) and a vocabulary (Sections). The content type has a reference field to the vocabulary, and the vocabulary has a reference to a menu. Also, we are interested in being able ...
3
votes
1answer
804 views

How to change the View Mode based on theme?

I am using the ThemeKey module to change the theme for mobile users. I have a custom View Mode called Mobile to display different content. I would like to have when my mobile theme is loaded for the ...
2
votes
2answers
1k views

Related Content View with multiple Entity Reference Fields

I am trying to create a View to display related content based on shared taxonomy terms from multiple vocabularies. For example: I have two content types called Car and Parts. I have two ...
1
vote
3answers
1k views

Feeds unlock tab

I had one of my feeds freeze up and I can't unlock it. I did some searching and found a function for adding an unlock tab form this page: http://drupalcontrib.org/api/drupal/contributions!feeds!feeds....
-2
votes
0answers
22 views

Bootstrap subthemes won't render blocks with embedded forms [on hold]

In a bootstrap subtheme, my blocks with embedded forms do not render. I verified that even if I enable only the base theme, the problems still persists. Any thoughts on why blocks with embedded forms ...
0
votes
2answers
404 views

Change HTML output of a view

I have a view which displays products. The fields shown are altered via hook, and I want to add <div> and <h3>, when I find an appropriate field value. (I tried with adding style to the ...
0
votes
1answer
824 views

Error: Syntax error, unrecognized expression: <div id=“ctools-modal”>

I want to display a form in CTool modal dialog, but failing badly. When I click link to show modal form, ajax request is started: POST http://drupal.dev/my_mod/arg1/ajax/arg3 and returns: Error: ...
2
votes
3answers
461 views

Syncing content between stage and prod [on hold]

Drupal 8, two versions of a site - dev and production. How to move changes, especially changes in content from dev to production without destroying DB on production? I know we have Features for ...
0
votes
1answer
363 views

Update order status with administrator comment

I need a way to be able to allow an admin user post an order comment when they update the order status that the owner of the order would then get posted on their order. This would both be viewable ...
0
votes
1answer
361 views

Get file extensions in drupal exposed filter

I had a content type with a file upload field. The user is restricted to upload files with specified extension in Allowed file extensions settings. I created a view for listing all files. Now i need ...
1
vote
2answers
1k views

Add property to existing field type

I have troubles adding a simple additional properties (like alt or title) to the image field type. In the .module file I defined an alternative class for the image field. function ...
2
votes
1answer
56 views

Remove the cache for a particular Twig file

I'm showing the name of the currently logged-in user in header, using \Drupal::currentUser()->getUsername(), but it's showing an already cached page. I know I can disable the cache for a ...
0
votes
0answers
35 views

Caching user profile image? [duplicate]

If I log in as User 1, i see user 1's profile picture. If I log in as User 2, I see user 2's profile picture. As expected. But after browsing a bit, User 2 would suddenly see User 1's profile picture. ...
0
votes
1answer
2k views

Trying to get fullPage.js implemented, but how to add data-attributes?

This is such a great script called fullPage.js I managed to load the js file and css file and even with the Void Menu Module, managed to call anchor links, but I'm struggling with the data ...
1
vote
2answers
58 views

Deployment using Composer replacing old style install but issues with legacy Drush

I took a Drupal project that was created awhile back via downloading a tar file and recreated it on a local via composer with drupal-project. The recommended files were committed to git (i.e. no ...
4
votes
1answer
1k views

Adding elements to a field widget

What I need to accomplish is adding a link to a node to field widgets (the node contains the formatted instructions to properly compile the field). The goal is something like this: "What is this?" is ...
2
votes
2answers
1k views

Updating a module field schema

I'm currently working on a project created by someone else. I have a textfield called "city". Currently the maximum limit is 255 characters. I want to update the maximum character to be 100. Looking ...
0
votes
1answer
349 views

How to make uploaded file permanent to node without node submit

My module automatically save new empty node when user create new node and redirect to edit this node. Now, is it possible to make uploaded file on _node_edit form without submitting form? edit: When ...
2
votes
1answer
969 views

How to send an email using a field key?

I am attempting to send an email to a field selected value using the Rules module. The user selects a faculty member and saves the node. The rule should fire off and email based on the field's key. I ...
-2
votes
0answers
22 views

Why would a custom block with a form not render in a Bootstrap theme? [on hold]

In a bootstrap subtheme, my blocks with embedded forms do not render. I verified that even if I enable only the base theme, the problems still persists. Any thoughts on why blocks with embedded ...
4
votes
2answers
3k views

How to trigger a form and pass variables to $form_state with jQuery?

What is the way to trigger a Drupal form via JavaScript, and pass new values to $form_state while doing so? I have a main form, which has an element that triggers a jQuery UI dialog with a form in it....
1
vote
2answers
2k views

Entity form with pre-populated entity reference from URL

I have two entities which are in a parent/child relationship. Now I want to add a operations link in the parent's list view so that I can show the child's entity form with the reference to the parent ...
1
vote
4answers
2k views

customize login error message

I'm using Omega's sub-theme 'creativpink' and ajax_register module. When user enters wrong user name or wrong password I want show *'The password entered is wrong. Please retry.' instead of Drupal's ...
1
vote
1answer
781 views

How to customize profile2 module profile edit form using template method?

How to customize the profile edit form of the Profile2 module using a template? Profile2 has the main profile (admin/structure/profiles/manage/main), and it is set to provide a separate page for ...
4
votes
1answer
648 views

Restrict Profile2 Profile Type on Role

I would like to do a few things: Limit the profile type a user has based on their role. When/if they change roles, their profile type would change and any fields that were the same are brought ...
0
votes
1answer
485 views

How can I copy block placements and settings between themes?

How to copy blocks placement and settings between themes? suggests that, in Drupal 7, I could run the following two SQL queries to copy block placements and settings between themes. DELETE FROM block ...
0
votes
1answer
677 views

Not showing clickable links in search results

I'm fairly new to Drupal but have gotten a hang of installing modules and setting up there configuration pages. The company site i'm working on is running on Drupal 7.1.4 and is using Node Search to ...
1
vote
1answer
2k views

Entity Reference View Widget problem with add selective

I am using a content type which uses a field as "Views" Entity Reference View Widget. When I click "add selective" or "add .. and close" in form of this widget, it's just redirect to http://localhost/...
1
vote
0answers
2k views

Quicktabs Module Direct Links [on hold]

Site 1: http://bit.ly/qrMXdg - Drupal 6 + Quicktabs Site 2: http://bit.ly/pQMTRf - Drupal 7 + Quicktabs Brief: In Site 1 if I hover on the TABS and copy URL I can get a direct link to that TAB. I can ...
1
vote
1answer
23 views

Table in custom form + empty values in form_state

In a custom form I created a table element: // Table results. $form['table'] = [ '#type' => 'table', '#header' => $header, '#rows' => $rows, '#attributes' => ['id' =&...
0
votes
1answer
1k views

Skipping form validation with a custom action button

Related to my previous question -- I've got the button added to the form properly (thanks googletorp!), but now I'm having separate validation issues beyond just adding the button. I have added a "...
1
vote
1answer
966 views

How to add a line break between each components in Email template in Webforms

I have the Webform 7.x-4.13 version module enabled. I have a Webform node with more than 30 form components. In Email Settings, I have created a custom email template where I used the token: [...
1
vote
1answer
48 views

How to write test(s) with specific config to test custom access checks?

I have built a custom module that alters some of the User routes (view, edit, delete) to do 3 things: Forbid account editing, except a user who has 'administer users' permission Forbid account ...
1
vote
1answer
487 views

Custom sort with search api

I have created a ViewsSort plugin that works on a normal view (like taxonomy_term) but not on a view based on Search API : it is not present when I click on "Add sort" in BO. This sort is used to ...
2
votes
1answer
369 views

how to include globals.php in template.php file

I need the variables from the globals.php and I can't seem to call/register them in theme's template.php file. These variables are needed for my custom hook function for the template. Am i missing ...
0
votes
2answers
817 views

How do I remove the ellipsis button in the pager?

I have a view with video and have replaced the links to different pages with a button. However, when there are many videos, an ellipsis (...) appears floating, and I want to remove it. I have the View ...
8
votes
3answers
4k views

How to solve the “The following module is missing from the file system” error?

I am getting the following error in a Drupal 8 site. The following module is missing from the file system It looks as if a custom module was installed and deleted without uninstalling it. How ...
0
votes
0answers
18 views

Follow symlinks inside of default/files

I am running Drupal 8.7.6. The default/files directory is a symlinked to a read only mount (/mnt/files_ro). Drupal needs to write inside a few folders as it aggregates and caches assets, so I created ...
1
vote
1answer
1k views

How do I prevent delimiters in a URL from being URL encoded?

I need to know how to get a +-delimited string to be appended to the end of the URL path without the + character being URL encoded. Why: I'm trying to pass arguments to a View. I'm working on a ...
-3
votes
1answer
29 views

Required fields [on hold]

I'm doing a migration from csv to Drupal 8 and I'm not sure how to handle the required fields. My content type "Department" has 8 required fields, should I use the plugin "skip_on_empty" in every ...
0
votes
0answers
38 views

How can I replace static file and media links in content with their equivalent entity references?

I imported content from another system. So, for example, the body has typical html, like this: <img src="/images/image.jpg /> All of the media assets that are referenced as static html, those ...
0
votes
0answers
15 views

Setting default upload paths for media

I really want to have an organised files folder in my d8 project. I have two main media fields: field_banner AND field_image They appear in all my content types. I would like that all the the media ...
8
votes
5answers
19k views

Adding a Image Upload Button in CKEditor

I have installed CKEditor in Wysiwyg profiles. While publishing any node if i click on the image upload button it shows options to add images by a image link, but what is the way to add a dynamic ...
1
vote
1answer
422 views

#states on exposed filter form

I have a #states on the exposed filter form as follow: If field_a == 'b' then field_b show, field_c hidden; else if field_a == 'c' then field_c show, field_b hidden; All fields here are Select ...
0
votes
1answer
797 views

How do I get a URL variable in a template?

I am trying to include a certain .html file if the URL has ?work=1. So far I have this, which I got from Check URL for string in a Twig file. {% if 'work' in url %} {{ include('work/index.html'...
2
votes
1answer
743 views

Commerce Attribute price is not updating in cart

I am using commerce price attributes module then I am facing problem , price is updated on the product display node but not in my cart...also, there is no line item for the added price attribute. ...
2
votes
2answers
123 views

Convert pot file to array

So, what I need to do is to convert the contents of a .pot file to an array. I know there is _locale_import_read_po(), but when I tried using it with the following code, I got an error. $...
5
votes
7answers
4k views

Image styles do not work

I am struggling to find a solution for image styles not getting generated. The original pictures get uploaded to the server but no styles or thumbnails are generated. I have checked folder ...
2
votes
2answers
890 views

add css if url contains

I have one node type and two page types for this node. http://site.com/themes/* and http://site.com/years/* And i want to hide one of the "view-filed" in all "years" pages using the css. Found ...
0
votes
3answers
394 views

How to automatically put your site into maintenance mode if at least a critical security update is available?

I think I'm craving for this functionality. What I want is, if after a CRON run, Drupal detects that such a security update is available, the site would be taken down for maintenance mode to avoid ...

15 30 50 per page