All Questions

1
vote
1answer
783 views

How to get taxonomy translated when creating a new node in a different language than the interfaces?

Configuration: I set up a multilingual site with Multilingual support: Enabled, with translation so I'm creating a new node for each language. The taxonomy term is set up with the Translation mode: ...
0
votes
0answers
2 views

Is Drupal 8 Upgrade not possible over 2 different domains?

I have tried to upgrade a drupal 7 site drupal 8 in both a local dev environment and a live production environment but cannot get the UI to connect from the drupal 8 site to the drupal 7 database. I ...
0
votes
1answer
916 views

Why is JW Player not working in custom Content Type?

I am having a weird problem. I downloaded JW Player and used it on my page (Default Page Content Type) to show video. It worked seamlessly. Now there was one requirement that there would be a page ...
1
vote
1answer
19 views

Newly created fields are not being displayed

I have a content type "Article" with fields and data that was migrated from a Drupal 7 website. In the admin/structure/types/manage/article/fields I added a new text field called "Test" with default ...
0
votes
1answer
521 views

Create bulk nodes - PDOException

Problem I'm trying to create multiple nodes at once using a CSV file for the data. However my script only creates the first 25 before it throws the following error. Any ideas what might be happening? ...
10
votes
5answers
17k views

How to configure webform with smtp

I have create a webform and i want to configure it sending emails with smtp authentication. I have install the SMTP authentication module also, but i cant find any option that allows me to setup ...
5
votes
7answers
7k views

How to place Contact form in block?

I have to embed a contact form inside of a block, and I'm trying to use the entity.form_builder service, But I'm not sure which entity I should give it, I found Message and ContactForm entity, so what ...
0
votes
0answers
9 views

How to autorefresh view block?

How to autorefresh view block on a page in Drupal 8? On my page, I have one block like on photo down, what I would like to autorefresh or auto reload. Thank you for your help in advance.
0
votes
0answers
18 views

Migration of field_collection with migration_d2d

In D7 to D7 migrations, when it comes to field_collections I know “ Your field collection migration should be run after the host entity migration. ”. I have done my host entity migration via the ...
1
vote
1answer
582 views

How to set a field value from parent template in Twig

I have node--article--teaser.html.twig which calls image-formatter.html.twig to printout the field_image. Everything works fine except that I don't want the field_image itself to be a linked. i.e ...
-1
votes
0answers
8 views

how i can adding Structured data JSON-LD to multisite in drupal 7

how i can add rich snippets(Structured data JSON-LD) to multisite in drupal7 ?? example JSON-LD: <script type="application/ld+json"> {"@context": "https://schema.org", "@type": "...
1
vote
1answer
669 views

Override module javascript file in theme or custom module

Is it possible to override a single javascript file from a module within a theme or custom module? My specific use would be for Views/js/ajax_view.js - I've had to apply multiple patches to get ajax ...
1
vote
2answers
609 views

How to grant permissions for some role to execute custom Rules Components?

I created a view (table) and i asociated views bulk operations. I created 4 rules components. I have permissions only for user/1 (admin). Another user role (eg. editor) can't see these options. "...
-1
votes
1answer
91 views

Programmatically and automatically delete every node after 2 years from its creation time [closed]

My question has a half answer here but not completed for my case. This is the piece of code I am talking about: <?php function mymodule_cron() { $storage_handler = \Drupal::entityTypeManager() ...
0
votes
2answers
54 views

Convert current time from Unix timestamp to date format (d/m/y)

In my custom module (.module) file, I am using: $current_time = \Drupal::time()->getCurrentTime(); date_default_timezone_set('GMT'); to get the current date... However, the date value is returned ...
1
vote
3answers
532 views

Display Custom User Profile Fields in a Block on All of Their Published Pages

I have created a role, and have added additional fields to their profile using Profile 2. The fields are part of the location module, and are just basic contact info (address and phone number). They ...
1
vote
2answers
536 views

How do I create and render a custom region?

How do I create and render a custom region in Drupal 7, when the Display Suite module is used? I am not able to show/display a block into a custom region and confused with the files structure. Please ...
0
votes
1answer
11 views

Programatically copy an image from user entity to webform submission entity [on hold]

Using a custom webform handler, I am trying to copy an image from the image field (field_usr_avatar_img) located at the user account page to the image element (avatar_img) located at the webform ...
2
votes
1answer
565 views

Language switcher shows wrong language on front page after detection by browser settings

Content and interface are displayed correctly but the language switcher shows the default language when the language negotiation is set to these options: URL (language prefix) Browser Standard Means:...
0
votes
1answer
533 views

I need to reference a custom field I created in User Profile

I used Drupal 7 computed fields to calculate weight loss. This is what I current have. Which works in a sense but only where the user inputs their initial weight and subtracts their current weight to ...
1
vote
2answers
704 views

Displaying the submitted values in a table

I created a custom form and after the form is submitted I need to display the submitted data in a table? This seems like a very simple problem. I am able to use dpm() and drupal_set_message() to ...
0
votes
2answers
534 views

Pre-select Group Audience for Organic Groups

Here is my situation. I am using the latest version of Organic Groups on Drupal 7. Every user on my site is part of one group and one group only. Is there a way to make it so that when users are ...
1
vote
1answer
592 views

Mail not going from drupal smtp

I have configured the smtp for drupal , as said in this link https://www.drupal.org/project/smtp and my smtp module folder lies in /sites/all/modules/smtp and phpmailer library lies in /sites/all/...
0
votes
0answers
13 views

#ajax not working on views exposed form [on hold]

I attached ajax to views exposed filters in form_alter but not working. For other forms, ajax is working. But adding #ajax to views exposed form fails. Any thing special with views exposed form block? ...
0
votes
2answers
574 views

How do I programmatically use the S3FS module?

I've included S3FS module in Drupal 7. I'm able to store files by using S3FS as a field of a node. Now, I need to store a file on S3 bucket when a cron job is executed. How can I programmatically ...
0
votes
2answers
534 views

Translation for node references not working properly

I have two content types: product feature and product. Both can be translated. If I create English product and assign many product features (by node reference inside field collection) and then create ...
0
votes
1answer
1k views

Execute jQuery after form submit

I have a non-ajax form for which I'm trying to execute a jQuery function after the form has been submitted and processed. I don't need ajax for the form, but I do need to wait until 600 odd form ...
-1
votes
0answers
8 views

Drush migration argument for xml source

I asked this question a while back and it was answered correctly and helpfully. However, I'm currently looking for a different solution. I need a way to create a custom argument which I can use to ...
0
votes
1answer
22 views

AJAX callback inside hook_form_alter()

I don't know how to implement AJAX callback in hook_form_alter(). The field is plain text by default and it is populated by NID (number) of the client company. The module name is "my_car". I didn't ...
0
votes
1answer
555 views

How do you output and modify the Content:Path variable using field:PHP global?

I'm trying to modify the content:path variable using PHP field in Views for Drupal 7. The $data and the $row->path gives a blank result. Anyone know why? It seems that I can grab it via the $views ...
0
votes
1answer
575 views

How can I dynamically change the display format?

I have an entityreference field. I want to change the 'Format' under 'Manage Display' from 'Rendered Entity' to 'Label' based on custom logic. Basically, what I'm doing is, if there isn't an image in ...
0
votes
2answers
532 views

Speech API Javascript and Drupal Forms

I'm using WebSpeech API to allow users speech recognition on my site. I'm using example 3 on this page: https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html. My code looks like this: ...
0
votes
3answers
306 views

Default frontpage showing http instead of https

How/where can I update the domain for the default front page to https?
1
vote
1answer
667 views

How to insert data into node and other tables at the same time?

I create a Drupal module which install database tables during module installation, table is created using Drupal way. The tables are created perfectly and now i have to insert data into those tables. ...
0
votes
0answers
6 views

Searching entity reference field value with Search API

I am using Seach API, Solr Search modules in my website for searching. I've created an index, say 'Blogs index', I've selected blogs content type to index Fields - title, body, Author are added to ...
0
votes
0answers
3 views

How can I attach a css file within the ckeditor iframe

I need to attach a Drupal library but only in iframes that ckeditor uses. I've noticed there appear globals libraries, but I only need to add this in a specific case. Also, when I clear the cache, ...
6
votes
2answers
2k views

How to customize the default search block form template?

How can I customize the default search block form template, I now use below template to display a search form block, but this code doesn't allow me to edit and customize each part of this form ...
1
vote
1answer
11 views

Possible to theme the form's elements with own twig?

I was thinking to get twig outputs so I could use these twig variables on a form.html.twig such as below: <div class="row"> <div class="col-md-6"> {{ form.name }} ...
1
vote
1answer
717 views

Create template suggestion for item-list.html.twig

I have to change the markup and I have to add CSS classes to themes/classy/templates/dataset/item-list.html.twig. But only for a specific item-list.html.twig in a specific block. How do I create a ...
0
votes
2answers
433 views

REST API 401 Unauthorized

I am trying to create a new node with POST through REST in D8. I have enabled the relevant modules (hal, serialization, http basic authentication, Rest web services, rest ui) and added the required ...
-1
votes
0answers
16 views

Create custom group permission for access to field within group [on hold]

I am trying to figure out how to create a custom group permission which will manage access to a node field. That means I'll need to add a field access permission to the group module permissions ...
0
votes
1answer
544 views

one to many and many to many relation between nodes of differenet content types

I am using Relation module for creating relationship. But i didn't find the option how to create one to many, many to many relation. Can anybody tell me regarding that Thanks
0
votes
2answers
21 views

Can't find the cause of this error

I am working through a Drupal 8 module building exercise from YouTube and I am not able to figure out what is causing an error. The relevant page loads and displays the form but I get the following ...
0
votes
0answers
10 views

Drupal Commerce: Form (add to Cart) ID from Node ID?

I'm working on a website made with Drupal 7 and the Commerce Module, with a "Products" page containing a view of all the products and for each one a "Buy Now" button (which is a form). Now, I want ...
1
vote
1answer
595 views

How to delete a scheduled task using Rules Scheduler?

I use the rules scheduler module (D7). So far all fine. What I use it for: a user registers with username and email this users then gets 4 emails over the next four weeks, sent by the scheduler BUT:...
0
votes
2answers
538 views

How do I add custom pane to existing mini panel programmatically without using features ?

I have a mini panel in which I need to delete few content panes and add new content pane programmatically without using features.
0
votes
0answers
5 views

Drupal 8 Feeds Import Programatically - how do I get finished state?

I'm running an import using the code below, its working fine but I need to get the result of the nodes created/updated etc. use Drupal\feeds\Entity\Feed; $feed = Feed::load($this->_feed_id); if (!...
0
votes
0answers
6 views

the best option to create user review for profile2, Drupal 7 [on hold]

I have a strange situation, I have 2 type of business profile in my site. one is from profile2, is registered by users. another is standard content type for business directory. So some of the ...
2
votes
1answer
677 views

Override a node page of specific content with views page

I want to create a views for overriding the node page for specific content. For example, when I click the link of a node in a list page, by default , it will go to the node page (e.g node/1), but I ...
0
votes
0answers
32 views

Print a webform submission from a printer after successfully validating and saving it [closed]

Drupal 8.7.1 site connected via bluetooth to a printer device. I have use case where I need to print a webform submission after the user has successfully submitted the webform. I have searched too ...

15 30 50 per page