


Entity reference field dependent on entity reference in referenced entity of another entity reference field
I have a content type ‘order’ with 2 entity reference fields. One is a reference to another content type ‘brand’ and the other is a reference to a taxonomy term ‘categories’. Now the content type ‘brand’ has an entity... read more
How to link taxonomy term with current loaded NID?
I want to link taxonomy term with current loaded node I am using $nid = arg(1); $term=taxonomy_term_load($tid) print $term; but noting happened. Please tell what is the correct way Sponsored by SupremePR Spotify Promotion Services SoundCloud Promotion TIKTOK Promotion... read more
Use hook form alter to change input type
I am trying to change the input type on an ubercart checkout form using hook_form_alter. I added an extra field using the uc cart extra fields pane module but there is no option to add e-mail – only text – and I need the field I added to validate as an... read more
Domain Access Login Redirect for main domain and subdomain
I have created three sites namely one.example.com, two.example.com, three.example.com using domain access. Here one.example.com is the main site which can create n number of subdomains. I want to redirect the admin of one.example.com to the dashboard and the other two... read more
Error in executing drush command
I am trying to execute drush command from my project root directory and i am getting following error bootstrap a site that has not been installed or does not have a configured database. In this case you can select another site with a working database setup by... read more
How do I go about putting standalone PHP files?
I want to add an extra cool PHP Class, where would I put it in Drupal, how do I make absolutely sure the code doesn’t present a security risk, should I just make it into a module? Sponsored by SupremePR Spotify Promotion Services SoundCloud Promotion TIKTOK... read more
Jotform Block Integration
Provide integration with Jotform by creating a Block in Drupal to display the HTML of Jotforms within your account. SoundCloud Repost Service SoundCloud Promotion Service Spotify Playlist Promotion Spotify Playlist Placements read more
How do I get comments to be indexed?
I’m not sure if it’s actually doing this; I can’t see any options for comment fields in the configuration. How can I check? Does it say explicitly somewhere? Sponsored by SupremePR Spotify Promotion Services SoundCloud Promotion TIKTOK Promotion... read more
Getting a menu delivered via REST
I am trying to get a menu via REST and I’ve created a new module and rest resource plugin that allows for GET on /entity/restmenu/{menu_name}. I can successfully return this example json using this function when I hit the URL. public function get(EntityInterface... read more
Pass custom variable to block.html.twig
I have a customer who requires the correct set of responsive classes for his block in a given theme depending on its position and count. In my theme_preprocess_page(&$vars) I can identify the blocks in this region and build up an array for each block using its... read more
Gábor Hojtsy: Three days to go until Drupal 8 EOL: you may already be using an EOL version of Drupal 8
With three days to go until Drupal 8’s end of life (on November 2, 2021), now is a good time to take stock of your Drupal 8 sites’ modules. Use Upgrade Status to check for environment and module compatibility with Drupal 9. Unless you are on Drupal 8.8.x... read more
Reorganize Language Switcher based on Country/Region
I’m working on a site with 34+ languages and will likely be expanding to more. With this many countries, a simple drop-down list can be difficult for usability. I would like to customize the language switcher so that I can categorize a language by region and... read more
Is there any way to make Commerce Customer Profile save/store data in a predictable manner?
Heres the thing. We have a customer profile of type ‘Delivery’ which contains a delivery address for an order. It also has other non-addressfield data like driver route, delivery day (M-F, day of week), default product (recurring order kit), and delivery... read more
Multiple blogs per user, each with a blog profile page
I’m trying to to create a site where users upon admin approval, can have multiple blogs, typically differentiated by language. Each blog should have a profile/landing page specific to that blog. I can simply create a taxonomy term where a given term is a given... read more
Passing values to a view block
I have a page that contains 4 separate blocks, from the same view, Items block 1 – this contains a list of item titles Items block 2 – this contains a different list of item titles Content block 3 contains content unrelated to this functionality Results... read more
Showing more detailed error messages to user
im making an app with titanium that connects to a drupal backend. im using the awesome library (https://github.com/jbeuckm/drupal-client). how can i show more detailed error messages (e.g. email/username has already been taken)? i only get a 406 error code in ios when... read more
Setup custom required field validation for a field in custom form
How can I setup custom required field validation message for a text field in my custom form. I tried below code. But it is not working. It always showing ‘Please fill out this field’. $form[‘first_name’] = [ ‘#type’ =>... read more
Want parent MENU_LOCAL_TASK tab to show when on a child page
I have a set of local task menu items defined in my module. This includes the following items: control => MENU_NORMAL_ITEM control/jobs => MENU_DEFAULT_LOCAL_TASK control/jobs/% => MENU_??? control/download => MENU_LOCAL_TASK control/settings =>... read more