All Questions

0
votes
2answers
1k views

How to identify drupal bootstrap version?

I'm using project bootstrap 3.x and wondering how can I check version of bootstrap library itself? There is general solution here stackoverflow but I found it's not useful in this case (drupal). I ...
2
votes
1answer
4k views

“Taxonomy with depth” view

I have a taxonomy tree like this: balls basketball color red green volleyball color red green If a Taxonomy term has children, I want to show them; if there aren't children I want to show the ...
0
votes
0answers
2 views

How to move comment submit button inside fieldset

I created a new group for a content type under Comments Fields (admin/structure/types/manage/page/comment/fields), and set the type Fieldset. Is there a way to move the comment Submit Button inside ...
5
votes
4answers
3k views

How to configure CkEditor's styles dropdown?

I have made changes to the configuration of CKEditor for the basic_html rule set as follows: When I then try to use the editor, however, I get the following: I have tried clearing the cache multiple ...
1
vote
1answer
2k views

Connection timed out and lock_may_be_available() on working site

I'm hoping someone can point me to a fix. My drupal 7 app was running fine locally this a.m. while I was testing a way to insert a row using mysql tools for a non-Drupal function. My environment is ...
1
vote
2answers
1k views

How to use arguments in Path Breadcrumb?

I am using the Path Breadcrumbs module to create breadcrumbs. I don't fully understand how to use arguments and selection rules, and thus I'm not sure how to create the following breadcrumb: On the ...
1
vote
1answer
350 views

Commerce form refresh: 500 error on /en/system/ajax

Where can I find more information about this error? Nothing is appearing in logs, the error message itself has no useful data. An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging ...
0
votes
2answers
9 views

How do I log in if I can not get the login prompt page to come up as it should?

I am having some issues with my Drupal 7. Because of a different bug I am having with component or panel, one that is taking over pages and hiding other parts of a page somehow, my login page has ...
0
votes
1answer
5 views

Theme hook not found

I have a custom module that implements a webform handler. I'm seeing this error in my Watchdog log when I navigate to admin/structure/webform/manage/myform/handlers: Theme hook ...
1
vote
1answer
2k views

Retrieve contents from a JSON URL using cURL and display them in an HTML table

I am trying to display contents retrieved from an external URL using JSON (the cURL method). So i wrote the below function: function file_get_contents_curl() { //JSON URL which should be requested ...
0
votes
0answers
12 views

Wrong status for Drupal 7 after update to 7.66 from 7.64

I recently manually updated my localhost drupal site from 7.64 to 7.66. I ran update.php without errors. When the process finished, I cleared all cache and checked the status. It still reported 7....
0
votes
1answer
1k views

How would I clear values in ajax loaded select options?

http://pastebin.com/TX2UiJGZ I have 3 select drop-downs, selecting a value in the first populates the second using ajax, selecting the second populates the third. However when I change the value of ...
0
votes
1answer
15 views

Remove an item from $form_state in an ajax callback

I'm using this form api example: AjaxAddMore. I want to add a "remove button" for each indiviaul element, in order to remove an item but not the latest. Thouse are my changes: ... $form['...
2
votes
1answer
804 views

Changing decimal field scale and precision using database

I'm using a custom decimal field in a custom product type in Drupal commerce. It has a precision of 10 and a scale of 2 (2 digits to the right of the decimal place). I have a client with a large ...
4
votes
1answer
1k views

How to import nodes and their translations from a csv using Feeds?

Is there a way to provide the original and translated values of the title and the body in a csv for example, and the Feeds module to produce the translated nodes automatically (and synced with the ...
2
votes
2answers
1k views

How to add UniqueField constraint on integer field?

The title basically says it all. I have the following field definition in an Entity class: $fields['code'] = BaseFieldDefinition::create('integer') ->setLabel(t('unique code')) -&...
0
votes
0answers
6 views

Remove “Upload” button in Webforms and upload on submit

We have a webform that must be open to anonymous users. Users can upload a file to the form, and we found out that some users abuse this option and keep uploading files to our site without submitting ...
0
votes
1answer
424 views

Topics are not getting associated with forum

I am testing out the Drupal 8 core Forum module. I am using a theme that I based off of Acquia Lightning. I have successfully installed the module and added Containers, Forums and Topics. My issue ...
0
votes
2answers
20 views

Programmatically specifying pathauto alias

I am working on a custom module to specify the pathauto alias of a new node, based on taxonomy terms that a user sets when they create the node. For instance, for my blog post content type, the alias ...
1
vote
1answer
674 views

Create custom endpoints by extending the Resource Base class

I created a custom endpoints by extending the core of Drupal. but I can not retrieve JSON data. I do not know what value to put in 'note: serialization_class /** * Provides a resource to get bundles ...
0
votes
2answers
2k views

Select users with only one role

How can i select all users wich have only 1 role. For example i got 4 users: User 1: Role 1, Role 2 User 2: Role 1 User 3: Role 1, Role 2 User 4: Role 1 How can i retrieve a list of users ...
1
vote
1answer
21 views

No such file or directory in Drupal\Component\DependencyInjection\PhpArrayContainer->createService()

I installed a fresh D8 (Drupal 8.6.15) site on my local dev and I am unable to use drush. After I installed the site, I also did a composer install. My dev is set up on php 7.1 using AMMPS and drush ...
0
votes
2answers
1k views

Programmatically resize images uploaded

When uploading images to D8 programmatically the setting for Maximum image resolution will be ignored and images will not be scaled down. Some of the images i have to upload are even larger then 10MB. ...
0
votes
1answer
1k views

Change url alias for user profile pages based on role

I have two sets of users, faculty and staff, with corresponding Profile2 profiles. I can't figure out how to get different paths for users dependent on roles, e.g, staff/userid or faculty/userid. I'...
1
vote
3answers
1k views

How do I get a paginated view to display rel=“next/previous” tags?

Using Drupal 7. I've got several views (most of which listing articles which have been posted) that paginate and I'd like to add; <link rel="prev" href="http://example.com/recent-articles?page=...
0
votes
1answer
52 views

How to prevent Cross Site Scripting when input using “Full HTML” mode of CKEditor

I am using Drupal version 8.3.7 and ckeditor 4.11.3. I create a basic page contains some scripts as following: In the detail page, I can see that the script in onmouseover="alert('222222')" is ...
1
vote
1answer
939 views

Using Profile 2 with Entity Reference--How to display the user name and not the “Profile Name”

I've reviewed the threads similar to this, and can't seem to find a definitive answer. I have a Content Type in Drupal 7 where I want to be able to associate multiple users to a content item. For ...
2
votes
2answers
781 views

Node Add / Edit Options Vertical Tab Problem

For just one of my content types -- the built-in Article content type -- the node option vertical tabs at the bottom of the add / edit form are not displaying correctly. As shown in the attached ...
2
votes
1answer
663 views

Showing content of subterm under parent term

I have following taxonomy structure parent-A subterm-1 sub-subterm-a sub-subterm-b subterm-2 how can I show contents of both the sub-subterm (a and b) when i select/click ...
2
votes
4answers
44 views

Redirect after purchasing

How can I perform a redirect after purchasing a product? I tried to create a custom checkout pane for this purpose, but it doesn't work as the form is not submited: public function buildPaneForm(...
1
vote
1answer
33 views

Create one-off page with specific fields and template

I'm new to Drupal and trying to add a single new page to an existing Drupal website. It has its own design (with its own css) and its own content requirements separate from the rest of the site. I'd ...
0
votes
0answers
11 views

How to create product from image

I'm quite desperate right now and pretty newbie with Drupal. Anyhow, I wan't to develop my WordPress site and change this current system to Drupal. So now i'm able to set user specified galleries and ...
1
vote
2answers
22 views

Prevent form regeneration when a callback function is called through ajax

Here is the code for the custom form with a field(field_B) that calls an function through ajax. The issue is that I want the function (MY_MODULE_XYZ_function()) to be executed only once, when the ...
0
votes
2answers
357 views

Cannot install Drupal via drush in the root of site

I am going absolutely insane. I have been up for several hours scouring the internet, installing, removing, installing, removing, and I CANNOT get Drupal (7 or 8) to install at the root of a site (...
0
votes
1answer
27 views

How to extend ArgumentPluginBase and have it recognized by Views?

I'm wanting to create a Views argument plugin that extends ArgumentPluginBase in order to overrides one of the form elements in the buildOptionsForm(). I've pasted my plugin below. However, it doesn't ...
-3
votes
1answer
15 views

How to import OAI or REST API url data in a specific content type node?

I have a OAI/REST API url having thousand of records. How do I import these records in my content type node. Which module should I use? or I have to write custom module for this. Suggest some solution....
0
votes
1answer
19 views

How can I use month name as contextual filter?

I have a contextual filter to filter by month: Date in the form of MM (01 - 12). However, I want to filter by month name (january, february, march, etc.) to get nicer URL and breadcrumb. Is there ...
0
votes
1answer
1k views

In search result page, pagination is not showing up

I have migrated a site from Drupal 6 to Drupal 7. Search form I have rendered in page.tpl.php like this <?php $block = module_invoke('search','block_view','form'); print render(...
1
vote
2answers
1k views

How do I create a conditional form field?

I have this dropdown menu of options in the user registration page of my site (image shown below), and i want when the user selects the employer, some text fields appear, like name of company, and ...
0
votes
0answers
22 views

Pass variable from custom module to twig template

How can I pass a variable from my custom module to a twig field template? my field template is the "field--node--field-webform--parliament-visit.html.twig" and my module is named as "custommodule" ...
0
votes
0answers
19 views

How to prepopulate a field from parent form to Inline Entity Form

I have 2 content types - Employee and Project. Both forms have Inline Entity Forms with references to content of each other when user creates an Employee node, he can add projects he took part in, ...
1
vote
1answer
19 views

How to pass contextual id value from one view page to another through Drupal menuing system

I use a view to display a list of books. The view has three pages: /books/title, /books/date, and /books/popularity. The pages are essentially the same with different sort criteria. The pages use a ...
1
vote
2answers
414 views

How to add a taxonomy term value as a class?

I am trying to target a specific div with CSS. But for that, I need a unique class in order to target a specific taxonomy term. I look at this question, but that doesn't work as it will target all ...
0
votes
1answer
1k views

Trigger ajax callback from input field webform

I have a form build with the webform module. When text is entered in the input box in this case webform component 2 I want it to execute a ajax function and put data in a div. However this is not ...
3
votes
1answer
795 views

How to change the View Mode based on theme?

I am using the ThemeKey module to change the theme for mobile users. I have a custom View Mode called Mobile to display different content. I would like to have when my mobile theme is loaded for the ...
4
votes
4answers
9k views

How to send POST request to https using \Drupal::httpClient()?

I want to send POST request to https using \Drupal::httpClient(). But ended up with error like GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: self signed ...
1
vote
1answer
1k views

How to get the node from the url referer?

I have a custom entity named Application that has an Entity Reference field named Product. When I am on an Apllication page and click on a Product to see it, I would like to know that I come from the ...
1
vote
4answers
826 views

Add banned words list to the site

I want to add a banned words list to the site. and if a user used one of the banned word in node form (title and body), comment form (title and body), user username in the registration form, then the ...
1
vote
1answer
732 views

How to prevent entering a time-slot that is already taken when using the Calendar module?

I have installed and enabled the Calendar module. I have noticed that this allows multiple events for the same time slots. It means if event 1 is on Aug 12th from 11-12, I can still enter the same ...
2
votes
1answer
1k views

problem using ajax callback in form

I have a very simple form that has a select box of the terms in a vocabulary, and renders the selected term below it. It seems that the first time I change the value in the select it renders the ...

15 30 50 per page