All Questions

-2
votes
1answer
9 views

How to export the content type , fields and views associated with that content type in drupal 8

How to export the content type , fields and views associated with that content type in drupal 8. Also i need to put all the configurations as a custom module. Can anyone please help me. Thanks
0
votes
0answers
5 views

View order error drupal 8 [on hold]

While I click on particular order to VIEW details it gives me error of Error: Call to a member function label() on null in commerce_payment_preprocess_commerce_order() (line 127 of /modules/contrib/...
-2
votes
0answers
8 views

i want to create people/user finder search page with views [on hold]

I want to build a views search page that search page will facilitate to site members to search other site members with their first name, last name, and e-mail. expect output result if a member open ...
0
votes
1answer
8 views

Share URL of clicked node instead of current page

I'am using the Social media share module I have created a filed in my content type (field of type social_share) I have added that field to the view fields I have render it inside each node the ...
0
votes
1answer
8 views

D8 Twig: field template - print image URL with image style

I would like to print an image URL with an image-style. This doesn't work, since I don't have a ".value"-value for the image: How to find image style URL from within twig template? Is there anything ...
-1
votes
0answers
15 views

Hooks vs Events vs Extension - when to use what?

Im writing a module. One thing it will do is alter the menu edit form. I've been looking at core code and examples on the internet and can't really figure out when to extend Drupals core classes, use ...
-3
votes
0answers
12 views

i want to display total number of posts of every organic group and their total members. using d7 [on hold]

i want to display total number of posts of every organic group and their total members. using d7 i am trying to achieve total number of post of every organic group and their total members next ...
0
votes
0answers
12 views

Non secure links redirect to homepage rather than serving over HTTPS

I have a site that is forcing HTTPS so that any links get redirected to being loaded securely if they aren't already so. For the most part, this works but there are a few links that work fine when ...
0
votes
0answers
19 views

Update Symfony before Drupal core?

Right now there are some security updates for Symfony: curl -sS https://get.symfony.com/cli/installer | bash echo y | ~/.symfony/bin/symfony self:update ~/.symfony/bin/symfony security:check Symfony ...
-2
votes
0answers
15 views

How to get netflix like login functionality restrict user login based on session?

Allow administrators to limit the number of simultaneous sessions per user role. Assuming the session limit is 1, if a user is logged in to a Drupal site from their work computer and they log in from ...
1
vote
0answers
11 views

Views alter query, add condition doesn't work

I have a taxonomy with 2 level of depth and I have a view that get some documents. In this view I can filter by the type of document (get from the taxonomy) but only by the first level. The problem ...
-1
votes
0answers
6 views

Drupal 7 : Full Html: Content is displaying below the script

In my content, first I'm adding some text, then I'm adding a external javascript tag. Example: In the full html, Text: I'm working in Drupal7. and then script tag: But, in the page view, first, the ...
0
votes
0answers
11 views

change Comments per page

I need to change the comments per page value, I set it 50 from the field setting but in some pages, I need showing only 10 comments, not 50. I tried to use this method setSettings([ 'per_page' =...
-2
votes
0answers
17 views

How to use dependency injection for \Drupal::service('page_cache_kill_switch')->trigger();?

How to use dependency injection for \Drupal::service('page_cache_kill_switch')->trigger();
0
votes
0answers
8 views

Error: Event registration is not enabled

So I have a basic node with a button allowing users to register, it is not a custom module, but when I click the 'register to the event' button in debug mode it shows that message on the log and doesn'...
0
votes
1answer
17 views

May I know the difference between field_data_body and field_revision_body?

As I am a beginner of this Drupal 7 I have some doubts regarding these database tables.I need a short notes regarding all these database tables.The doubt which I had found is that when I add the ...
-1
votes
1answer
15 views

Update jQuery version on drupal 7.59

I'm newbie in drupal. Currently, my site is running on drupal 7.59 and jQuery 1.5. Is it possible to update jQuery version to 3.4.0?
1
vote
1answer
13 views

How to replace drush_download_file in Drush 9

drush_download_file() existed in includes/drush.inc for Drush 8 and below, but this has been removed in Drush 9 as far as I can tell. Is there a standard way that file downloads should be executed in ...
0
votes
0answers
24 views

Have alias URL remain alias instead of resolving to target URL

I have a Drupal site with an Event content type. This content type has an Event Categories taxonomy field on it, which, as you can guess, categorizes events. When you navigate to the URL of a ...
0
votes
0answers
9 views

How to include book traversal links on a custom twig template page

I use the Book module to create books with chapters. When I use the default twig template node.html.twig to display a book chapter, a section titled "Book traversal links" is included, with links to ...
1
vote
1answer
19 views

Which hook to use for updates of all nodes of a particular type

This question is about Drupal 7. For a particular node type, let's take three examples: a) book b) article c) customcontenttype I would like to be able to capture the moment of an update of an ...
1
vote
2answers
26 views

How to render all paragraphs of a node as slider instead among themselves?

Initial situation I have a node type with a paragraph field. Each paragraph of the paragraph field is rendered among themselves. What I want to achieve The paragraph field inside the node should ...
0
votes
0answers
24 views

Return an Ajax Response from EventSubscriber?

I am trying to return an ajax response when a user logs in while the page is loading post-login. /#1 approach was attaching an ajax callback to the user login form submit with form_alter. However ...
0
votes
1answer
19 views

amp-img tag, replace to simple img

I need to change this tag <img> to <amp-img>, I've been researching about this and I have this function for change the img tag. function amptheme_image($variables) { // Remove RDF ...
0
votes
1answer
35 views

How to setCookie in samlredirect function

I am trying to logout users when they hit a particular path in the website and log them back in to renew the session(because it has its own login session and its expiry is not in sync with the actual ...
1
vote
1answer
8 views

Display articles based on group combinations of various group types

I took a look at the group module. Defining permissions based on user and entity memberships would suit my needs very well, but sometimes I would need a combination of various group memberships to ...
0
votes
0answers
29 views

A field only visible when a node is being edited

I have a custom field which should be only visible when a node (an article) is being edited (and not shown when a new content is created). I'd like to avoid installing a module for this, so my ...
0
votes
0answers
14 views

How to order datetime items chronologicaly on save

Is there a module or a simple way to order a multipe datetime/datetime_range field chronologicaly on every save? I want to be sure that the last item is always the last one.
0
votes
1answer
14 views

How can I use a content type field on the body of the e-mail message template on the Webform module?

For usability matters, I would like to let the editor create his own confirmation message on my Event content type. So I create a field for that. I also have another field to select which webform is ...
0
votes
2answers
28 views

Change html tag in template file tpl

I have this template file for a view: views-view--ir-news--page.tpl.php But right now, I need to use Google AMP only for this view (Machine name: ir_news) What I want to know is if something like ...
0
votes
0answers
18 views

Change git repository in Drupal install [on hold]

I have started to work on a new project and was provided with bitbucket git repository, when I looked on staging server I noticed that the old developer was working on a gitlab repo. I have spoken to ...
0
votes
0answers
19 views

Validation after all other validations were successful

I have a form with several form fields and two validation handlers. function my_module_my_form_validate_integer($element, &$form_state) { // validation stuff } function ...
-2
votes
0answers
13 views

How can we alter drupal primary links?

I want to add and remove some links at runtime. How can I do this in Drupal 6? I want to display them on a conditional basis.
1
vote
1answer
23 views

How to add a condition for an array on an entity query for a config entity?

I want to execute an entity query on a config entity type. However when I want to add an IN condition on a property which is an array I am getting an error. For example, I want to retrieve all user ...
0
votes
1answer
22 views

How do I convert "entity:node/9 in a link?

I need to get some values from a custom block I've created, and I am using the following code. // Get the block $block = \Drupal\block\Entity\Block::load('hightlight'); // Get the block content $...
2
votes
1answer
41 views

Is it compatible with PHP 7.2?

We have a Drupal 7 site running Drupal Commerce. Our host has now informed us that they will be updating PHP from 5.6.3 to PHP 7.2. Is Drupal Commerce for Drupal 7 compatible with PHP 7.2? I have ...
0
votes
0answers
9 views

Views dependent filter not working correctly

I am using views dependent filter to apply multiple dependent filters in my view. The view is a simple listing page. I have multiple categories and set of different filters that will be grouped and ...
-2
votes
0answers
17 views

Login credentials verify then logged out when using reverse proxy

I have Drupal 8 installed on Nginx server for a company. The company is using a reverse proxy. When I try to login, the credentials are verified and further page redirects to the site dashboard but ...
0
votes
0answers
9 views

Strange Behavior of Product Attributes

Using Drupal 8.6.15 with Php 7.2. This issue I have checked with a fresh drupal installation no other theme, only with Bartik. I have created a product attribute called Tiles Color. It suppose to ...
0
votes
0answers
18 views

Flag/Unflag Taxonomy term when updating Taxonomy field in user profile

I asked this question a few days ago: Send email to all users that are tagged with the same tag a node is when created I decided to go a different route and use the flag and rules module to associate ...
1
vote
1answer
25 views

Why is Twig not outputting this correctly?

I have function hook_theme_preprocess(array &$variables, $hook) { $variables['bla'] = ' AA <strong> BB </strong> CC '; } In my template I have: {{ bla }} The problem is, in ...
-4
votes
0answers
20 views

Creating a view matrix

Is it possible to create a view that would be a table like the the following and if so how? The data is events with a date and an entity reference to those attending.
0
votes
0answers
14 views

Rule that sends one email out at specific time each day with view content in it

I have 5 different views that show different metrics within blocks on the front of my website. I want a rule that can send this information to me by email each day at a certain time. How do I do this, ...
0
votes
1answer
14 views

How to set time limit only for one php file?

I have a script which walks through database table, makes some checks and based on them it makes notifications for website users. It works for a pretty long time. Currently in dev it takes a minute ...
0
votes
1answer
8 views

Get node form inside preprocess_views_view_fields()

how can I get the node id through the : preprocess_views_view_fields()
0
votes
1answer
23 views

Get the data of a given content type inside any Twig template

I have a content type named Flower with two fields : Name and Color. In my-theme/templates/page.html.twig I want to print the name and the color of each flower : <div id="page"> {% for ...
1
vote
1answer
7 views

How to change image style using hook_views_pre_render()

I am trying to adapt the following Drupal 7 code to Drupal 8, in order to set a different image style to every image in a view: // Assigns a random style name to each image function <MODULE_NAME&...
-2
votes
0answers
10 views

Create a AMP simple template hook [on hold]

I need to replace the usual tags from html to amp tags. (Drupal 7) For example: <html> to <html amp> <img> to <amp-img>, but I don't want to replace the complete template, ...
-2
votes
0answers
10 views

Error when creating Pie Chart in Charts Module

When I try to create a pie or donut chart it gives me this error message: "Cannot read property 'color' of null". All other chart types work. Any idea why the module returns this error or how to fix ...
0
votes
0answers
8 views

Add radio buttons to search block and have selection persist

I'm relatively new to Drupal and have been working with 7 and 8. I'm trying to modify the search block to add radio buttons - allowing users to select if they're searching the site or a catalog. ...

15 30 50 per page