How to add a default taxonomy term to all nodes in a migration?

How to add a default taxonomy term to all nodes in a migration?

For a Drupal 7 to Drupal 8 migration, we’re taking what was a Quotation content type and migrating it into an Article content type, joining a ton of nodes that are staying as Articles. To distinguish, I want to add a taxonomy term “Quotation” to the... read more
How to add a default taxonomy term to all nodes in a migration?

How to add asc and desc sort symbols in drupal views?

I have a drupal 7 view, consists of table. I need to add sort symbol (both asc and desc) in view header by default if no sorting applied. I tried with altering views-view-table.tpl.php file, and added asc, desc images for each header. But I need proper solution, Is... read more
How to add a default taxonomy term to all nodes in a migration?

How do I get the user ID of a newly created user?

I’ve been searching for this for ages, but could not come with a solution. Drupal 7 provided a way to get the user ID of a newly created user after running user_save(); the new user has been added and the user ID has been returned in the object. In Drupal 8,... read more
How to add a default taxonomy term to all nodes in a migration?

Theming paragraph fields from entity reference in view

I have a view (Drupal 8) where I load my entity reference field (display hidden), with three fields from a Paragraph type and a certain custom display). The HTML markup looks like this now: <div class=”paragraph... read more
How to get the vocabulary ID of a taxonomy term? [closed]

How to get the vocabulary ID of a taxonomy term? [closed]

I need to get vocabulary ID by term object.Please see attched screenshot for term object. read more
How to add a default taxonomy term to all nodes in a migration?

Upload a file by Ajax without submitting the form

I want to upload a file by Ajax (without submitting the form) than process in backend, and clear the field to allow to add another file. Is it possible with Drupal 8? Can anyone provide an example? I tried this one but without success.... read more
How to add a default taxonomy term to all nodes in a migration?

How to show the webform submission page as pop up?

I have created the webform with two fields. When I submit the webform, its redirecting to the submission page. Now, I want to display the webform submission page as pop up. Thank you message and the “Back to form” should display in the pop up. I have tried... read more
How to add a default taxonomy term to all nodes in a migration?

How can I prevent cache on any page where a paragraph appears?

I am using the paragraphs module with a custom theme I created. I want to figure out how to clear the cache for any page that a specific paragraph appears on. The custom theme is composed of a bunch of templates (i.e. paragraph–paragraph-name.html.twig) and a... read more
Updates for custom module not showing in update.php list

Updates for custom module not showing in update.php list

I’ve created a custom module for my Drupal 7 website, under sites/all/modules/custom/tm_general which has the following updates in the tm_general.install (please see image attached). The site is being installed from scratch, meaning the DB is empty when... read more
How to add a default taxonomy term to all nodes in a migration?

Preview is not showing after upload

When i am trying to upload image as a Authenticate user, After upload i am not able to see preview. fields got disappear fully. If i try to do as a admin, i am able to see that. Any suggestions? read more
How to add a default taxonomy term to all nodes in a migration?

Test complex method that uses a service

I have a method of a class that returns me the list of fields that have been created outside of core Drupal. The method is the following. /** * @param $contentType * @return array $fields */ public function getContentTypeFields($contentType) { /** @var... read more
How to add a default taxonomy term to all nodes in a migration?

How do I get the current taxonomy term from the plug-in context?

When on a node, the following annotation will obtain the node from the context: /** * @Condition( * id = “node_type”, * label = @Translation(“Node Bundle”), * context = { * “node” = @ContextDefinition(“entity:node”,... read more
How to add a default taxonomy term to all nodes in a migration?

"Image Upload Button" section remove after click on upload

I am trying to edit users’s profile page in Drupal 7. I have an image upload button there, but it remove (hide) after click on upload button . But If i login with admin its working fine, means image upload section is not hiding on upload click. Any suggestions ?... read more
How to add a default taxonomy term to all nodes in a migration?

How to add a rule condition from select-list in a webform

This an export of my rule { “rules_webform_to_simplenews” : { “LABEL” : “Webform to simplenews”, “PLUGIN” : “reaction rule”, “OWNER” : “rules”, “REQUIRES” : [... read more
How to add a default taxonomy term to all nodes in a migration?

Field Entity Autocomplete filter the published nodes

my problem is that I have a custom form with an autocomplete entity field for the search. The problem is that the field shows me both the published fields and those that do not. Is there any filter or parameter to prevent this from happening?... read more
How to add a default taxonomy term to all nodes in a migration?

Customizing the Access Denied Page

I’m trying to modify the text that shows on the standard Access Denied page. I created a module and tried to extend the core class but while module installs fine the page does not get modified. My first question is can Access denied be customized? read more
How can I verify users the first time they log in?

How can I verify users the first time they log in?

I was reading this article. I would like to know how logging in with the REST API in Drupal 8 works. By default, when users log in, Drupal will verify username and password. After the login, the browser has a cookie for the created session. With the REST API, how can... read more
How to add a default taxonomy term to all nodes in a migration?

Dynamic content with a view and a block

I’m new to Drupal (using Drupal 8) and have been struggling to get content from a block I’ve create to display when accessing the view. I’ve created a “service” view (page) which lives at the path “/service”. I’ve... read more
How to add a default taxonomy term to all nodes in a migration?

How can I add cache context to custom menu link?

I have two routes that receive user as route parameter, and i need a menu link for every one in account menu. So I added in my *links.menu.yml client_account_links: deriver: Drupalmy_modulePluginMenuCustomLinksClientMenuLinksDerivative class:... read more
Ajax error on node form edit page

Ajax error on node form edit page

I’m trying to ajaxify part of node form. I have a hook_form_alter that adds extra ajax property to a widget of select field. The problem I’m facing is the callback method / function, which is not fired when change is happening. So this is my form_alter... read more