All Questions

1
vote
0answers
457 views

How to update jquery and jquery ui

I am on 8.3.3 and I would like to update jquery and jquery ui to the latest stable version of both. I do not want to update drupal core only jquery and jquery ui. Anyone knows how to do that?
0
votes
2answers
1k views

Attaching libraries to specific controllers

I want to include the google charts js library to a specific (or set of) controller(s). In my library file, gcharts.libraries.yml, I have the following: google_charts: remote: https://developers....
1
vote
0answers
113 views

Library .js file getting corrupted

I'm trying to get views slideshow to run on a Drupal 8 site. I've followed this tutorial and have downloaded the required libraries. I've set up the view, and it shows up fine on a page when it's ...
2
votes
1answer
525 views

From my child theme, how can I remove a library loaded by the parent theme?

I have hit an issue which I think is quite unusual or peculiar when settingup a child theme. A commercial parent theme I have bought loads the Slick library like this in its theme.libraries.yml: ...
1
vote
1answer
405 views

What ways to attach a library to a form?

I created a custom form and I use a js library on it. I attached my JS in my template file but in a first time, I tried to attach it directly on my form with $form['#attached']['library'][] = "...
0
votes
1answer
612 views

How to add google_tag script to header with custom environment variables?

I'm trying to add Google Tag Manager to the <head> of my document. Unfortunately, the way I'm doing it with an HTML tag render element, the ampersands (&) are being escaped. function ...
1
vote
1answer
1k views

How to reuse object between Drupal Behaviors?

We have a JS file (basic-page.js) that has the following Drupal Behavior. In this, we created what we believe is considered a Drupal object (need help with correct term) that contains a function that ...
0
votes
1answer
172 views

Why is jQuery dependency not working?

I'm extending core Classy theme so I have included my JavaScript code in theme.libraries.yml file like this: js: js/blogger-list.js: {} dependencies: - core/jquery but still browser console ...
0
votes
1answer
117 views

Include third-party library

I have a third party library located in the root/libraries directory, but it is not called on my webpage. I was wondering using subtheme/subtheme.theme or subtheme.libraries.yml. I call it from here? ...
0
votes
1answer
94 views

correct way to load JS library for custom module

I am trying to use d3.js in my module, but I am facing some issues. I have the D3 module installed in sites/all/modules/d3/ and d3.min.js installed in sites/all/libraries/d3/, and I can see the d3/...
1
vote
1answer
119 views

Installing the Waypoints plugin

I’m using Drupal 8.5.4 and I have installed the Advanced CSS/JS Aggregation module. I’m trying to install the Waypoints plugin without success via the module: jQuery waypoints (still on alpha1 for D8)....
1
vote
1answer
174 views

How to load JS as the first item in head tag?

We have a custom module that has a JS library that we want to load in the <head> tag as the very first item even before all the normal Drupal JS files. All other libraries are loaded through ...
1
vote
1answer
22 views

jQuery transition not run on anon page

I am running Drupal 8.5.5 and am running into a problem. It seems for anonymous users jQuery is not loading a library that it would when I am logged in as admin. I tried to understand why that is but ...
-1
votes
1answer
25 views

Load module config into Javascript from a different module

I have two Drupal modules. One is a shared module that provides a JavaScript library. The second is a module that builds a form which uses that library. Lets call them modlib and modform. They've ...
1
vote
2answers
197 views

drupalSettings object not showing for anonymous users. core/drupalSettings is added as a library dependency

I'm stumped on this one. I’m having an issue where the drupalSettings object is empty when not logged in. Works fine when I am authenticated. - core/drupalSettings is in theme’s *.libraries.yml file. ...
2
votes
0answers
70 views

Adding an Attribute to a Script Tag Before Src

I'm working with CloudFlare and have identified a script that needs the data-cfasync=“false” attribute applied so CF doesn't touch it. This script is defined in a library in a custom module. my-...
0
votes
2answers
51 views

Exclude a JavaScript file from a node

I'd like to exclude a js file from loading on to a specific node. Right now my libraries.yml file looks like this: global-styling: version: 1.x css: theme: css/bootstrap/bootstrap.css: ...
0
votes
0answers
43 views

Javascript not working for unauthenticated users

I have some script for a "back to top" button. The script works fine when I'm logged in, but it does not work when I'm logged out. I've read about dependencies, but I think I'm doing them correctly: ...
0
votes
0answers
12 views

How to add 3d party js library to the project?

For my D8 project I am doing some optimization for mobile devices, and for node views it is very important for us to implement hyphenation for the titles. Based on my research the css property hyphens:...
0
votes
1answer
534 views

Add radio buttons and text field together to theme-settings.php

I want to integrate a CSS switcher into my theme, but without the Color module. So I want a radio button list, (or a select list, or dropdown, doesn't really matter), with a list of different styles, ...
0
votes
0answers
4 views

Setting modal that triggers form in custom block in header

I made a paragraph with form and placed it in custom block in header. Form has a modal that pops up a form when clicking on a link in a navigation. I've set my form in region--header.html.twig but it'...
0
votes
1answer
17 views

Creating an image upload input field

I'm creating a image upload input field in blockForm which will output to Twig later. But got stuck due to some stuff. public function blockForm($form, FormStateInterface $form_state){ $form['...
2
votes
1answer
2k views

Retrieve taxonomy terms with EntityFieldQuery for a given parent term

I am retrieving a tid of a taxonomy term by using EntityFieldQuery. However, I need to cross-link the taxonomy_term_hierarchy table to list those terms which have a particular parent, but I am not ...
2
votes
1answer
2k views

How do I extend a configuration form without using hook_form_alter()?

I want to extend some fields in a config form of a module with another module in Drupal 8. I created a config form in a module (e.g. custom_1) and now I want to add some more fields from another ...
0
votes
1answer
315 views

How to add a 3rd party library and call it using Libraries

I've installed the Libraries module. How can I add a 3rd party PHP library in my Drupal 7 project. How do I use hook_libraries_info()?
-1
votes
1answer
24 views

Retrieving value of paragraph type with entity reference revision through preprocessor

I have created a paragraph type which has field of type entity reference, link, plain text. Now I want to fetch the values present in these through the preprocessor.paragraph.inc and display it in ...
1
vote
1answer
559 views

Cannot install modules

I am very new to Drupal so please excuse me if this is an easily answered question. Basically I wish to install CKEditor, however when I upload the module thorugh the online installer I am greeted ...
1
vote
0answers
9 views

Use generated JWT from Keycloak to authenticate user in Drupal using REST API

We are working on developing a mobile app and users should be able to log in to the app and in our backend Drupal site authenticated from Keycloak. Our main goal is that the user would be able to ...
0
votes
0answers
6 views

How to show menu items depending on the user's roles and the node type?

I would like to show some menu items (merged with the main navigation menu) when viewing a node (full content) of a custom content type. Also, this menu items depend on user's roles. It could be ...
0
votes
1answer
562 views

How to have OutboundPathProcessorInterface change the URL of the loading page

I have a page my/topics. The page presents content based on the user's selection from another page. Having made the selection, it and other information is passed to the page via a query string: ...
0
votes
2answers
11 views

CKeditor stripping allowed style attribute

I've installed Colorbutton to my Drupal 8 site. I have enabled the button for Full HTML and For Basic HTML I have allowed the attribute <span style> in the Basic HTML allowed attributes area. ...
0
votes
1answer
43 views

Create the FooTable functionality by using only views

I noticed by using FooTable display on one of my view on a Drupal 8 site, it is increasing the load time of the view by more than 2000 ms. The main idea i am using Footable is because of the ability ...
3
votes
2answers
903 views

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?
-2
votes
0answers
9 views

Notifications_Node_Update_Event not load on cron

When i execute a cron, i got this error : PHP Fatal error: notifications_cron_queue_event_worker(): The script tried to execute a method or access a property of an incomplete object. Please ensure ...
0
votes
2answers
132 views

Want to display the validation error message above the webform

I have a webform created in Drupal 8 using the webform module I have to submit the data to 2 different 3rd party API. The scenario is I have to submit the data to the 1st API if there is no error ...
1
vote
1answer
460 views

Zend Optimizer+ error with Drupal 7

Can an anyone help me.I am getting the following error while running my drupal 7 application Fatal error: Cannot redeclare function views_views_plugins() (previously declared in /var/www/vhosts/cibi....
-3
votes
0answers
12 views

Running Drupal 8 on AWS lambda [on hold]

Is there anyway to run Drupal serverless? I search the web and the closest I can find is this site https://www.slideshare.net/AmazonWebServices/making-headless-drupal-serverless
0
votes
0answers
41 views

Passing variables between theme preprocess hooks

I'm a newbie to Drupal 8 and PHP coding in general so I hope my approach is not too much out of the lines. I'm trying to theme some parts of my website by fiddling a bit with templates, what I need to ...
0
votes
1answer
576 views

How to create a parent content type which consists of other child content types?

I want to create custom content type (parent) which consists of other custom content types (children). Is this feasible in Drupal 8? Or I should do it programmatically? Example: I want to have custom ...
0
votes
1answer
2k views

Trying to programmatically redirect

I’m trying to redirect users in Drupal 8 as I was used to do in Drupal 7 with a simple drupal_goto(). This is my code. $response = new \Symfony\Component\HttpFoundation\RedirectResponse(\Drupal::url(...
1
vote
3answers
509 views

How to use domain access module for localhost

I want to use domain access module for my xampp localhost. Any one knows how to configure it for localhost.
4
votes
1answer
641 views

Unlimited field collection pagination in node edit page

In my node I have a field collection which is set to unlimited. How to enable pagination for node edit page, where all items from that field collection are displayed? For display there are couple ...
0
votes
1answer
500 views

Replacement pattern for one value of a multivalue field in views

Rewriting the results of a views field, I wonder if there is a way to use a replacement pattern for the first, second and third value of a multivalue field. In my case, as example: I have tried to ...
0
votes
1answer
539 views

How to programmatically create forums and containers (not forum topics)?

I need to create containers and forums using rules. If I use the action "Create new entity" -> "Taxonomy term" I got that by default the new term created is treated as a forum, not a container. How ...
0
votes
1answer
444 views

Displaying parts of main menu in separate blocks

I need to display my main menu in separate blocks: the first sub-menu in one block, and the following two sub-menus in another block. I'm using Drupal's native menu module and also the nice menus ...
0
votes
1answer
437 views

Drupal Facebook Autopost - “user hasn't authorized the application”

I have problem with Facebook Autopost module for Drupal (v. 7.28 here). After node publishing, I'm getting this error: Facebook SDK threw an error: OAuthException: (#200) The user hasn't ...
0
votes
2answers
23 views

How to attach media item created during migration to media field in node

I am migrating content from Drupal 7 to Drupal 8. There is an audio field that I am currently moving to media via a custom process during migration. When I get the id of the new media created I can't ...
0
votes
1answer
457 views

Different front page template for different domains

I have Drupal 7 installation with the Domain Access module. I need to have different page--front.tpl.php templates for some of the subdomains, for example: www.example.com should have one type of ...
0
votes
1answer
15 views

Form with manged_file filed is not submitted?

I have a form in my drupal module. in my form, I have used manged_file field. form name is "difference_form" and I have created two functions. one is "function diffence_form" for form definitions. ...
0
votes
3answers
521 views

receiving incorrect url from amazon s3 module

I am using drupal 7. I have installed amazon s3 module and its dependencies. I have created a bucket for saving my files on amazon server. Everything went good.. But when i try to get the path for the ...

15 30 50 per page