All Questions

0
votes
0answers
3 views

How can I style image on custom form upload?

I have Drupal custom module with a form and a number of fields in it. File upload is one of them, it's working fine. But I need to preprocess image before uploading, preferably with Image module. Here'...
0
votes
0answers
3 views

How to programmatically search content with a specific taxonomy term with Search API?

I'm working on programmatically searching content with the Search API module. Ideally I would like the ability to select which taxonomy term of a content type is being searched. For example, if I have ...
0
votes
0answers
7 views

How to disable caching for hook_preprocess_menu drupal 8

I have used hook_preprocess_menu to add the child to the menu items. The child's are a specific content type. If i make changes to the content the changes are not reflected to the menu item child ...
0
votes
0answers
8 views

How to link a teaser view mode to content?

When creating views I prefer use views modes rather than fields. I have been reading up on accessibility stuff and one topic that comes up is that adjacent fields, linking to the same url can be a ...
0
votes
0answers
3 views

how to make my views field link open form modal?

How add the options: data-dialog-type="modal" id="my modal form id" data-dialog-options="50%" to my view field custom link if the rewrite result as only has link class???
0
votes
0answers
14 views

How to serialize a form's render array to json in Drupal 8?

I want to build a REST resource to return Forms as JSON with all labels, help text, default values, etc... When I use REST's built-in resource /entity/entity_form_display/node.article.default it does ...
0
votes
0answers
4 views

Weekly Drupal cron task exiting unexpectedly, Drupal not reporting error

I have my doubts that this problem is actually caused by my Drupal configuration, but am wondering if anyone else has experienced a similar issue and how they went (or would go about) troubleshooting ...
0
votes
0answers
5 views

Using image styles with a normal “managed file”?

I created a content type with 4 fields on it: Private Image Field Public Image Field Private File Field Public File Field I am able to access 1 and 2, as they are image fields. But if I upload an ...
0
votes
0answers
8 views

766 security update database schema errors

After updating to 7.66 and running update.php i get an error: Class name must be a valid object or a string in /home/breastcancertiss/public_html/includes/common.inc on line 8066 I have 6 schema ...
0
votes
0answers
6 views

I cannot delete the default content [on hold]

I am deleting all the default content of Drupal 7 Commerce Kickstart, bnut I found out some content cannot be deleted. I don't know if it's because I wrongly configured something or what. I am using ...
0
votes
0answers
3 views

Put a product image on the tile view of products

I had installed Drupal 7 Ecommerce Kickstart. Whenever I search something, the products list are shown with no cover images shown. I can only see images, when I particularly click the product link. I ...
0
votes
0answers
9 views

Make “Add to Cart” Button Appear Below

I have installed Drupal Ecommerce Kickstart. I want to make the "Add to Cart" button below and not in the middle. How will I do that in Drupal 7?
0
votes
0answers
9 views

How to map key value pair xml data in feeds mapping

I have a xml data like this. In feeds_ex how can I map the metadata key value pair to content type fields target. What to write in new xpath source.
0
votes
0answers
18 views

How do I dynamically change cookie_lifetime?

I'm trying to change cookie_lifetime dynamically in my D8 project, to set cookie_lifetime to 0 or to some value(for example 24 hours). I know that this can be partially acomplished by changing ...
0
votes
0answers
11 views

How do i alter commerce product price?

I have installed Drupal 8 and using commerce 2.x, I want to alter price according to the user set its own price on user field of a user who created the product. example: user1 has its user price 10 $ ...
1
vote
0answers
16 views

How to progammatically subscribe a user on edit form(user_form)using Simiplenews?

How to programmatically subscribe a user on edit form(user_form)? I use the code below in hook_user_presave after I checked if the user is already subscribed. $subscription_manager = \Drupal::...
0
votes
0answers
8 views

Devel “devel.toolbar.settings_form” does not exist even though the route exists

After updating my core with 8.6.15 and devel with 8.2 version, I am facing the following error: Route "devel.toolbar.settings_form" does not exist. The website encountered an unexpected error. ...
-1
votes
0answers
15 views

React JS Setup in Drupal 8 [on hold]

I want to create a project using Drupal as the backend and React for the front end, but I have no idea how to set up the React inside of the Drupal theme not just including the library. Thanks
0
votes
0answers
18 views

How can I add the entityconnect's add new button to a view

Im hoping someone can assist me as I'm starting to learn Drupal 8. I have a relationship between an Artist content type (Parent) and Album content type (Child), and I have a view set up that displays ...
0
votes
0answers
17 views

How can send an alert email after 30 days when the content is not updated

Now I am currently using a Drupal 7 for our project. I am using a rule module but I am new in Drupal so I can't know in detail information about rules module. I want to implement functionality like ...
0
votes
0answers
12 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 ...
0
votes
2answers
21 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 ...
1
vote
1answer
22 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 ...
0
votes
0answers
10 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
0answers
26 views

Wrong status after updating from 7.64 to 7.66

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....
1
vote
1answer
30 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 ...
1
vote
1answer
22 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 ...
0
votes
0answers
30 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" ...
-4
votes
1answer
26 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....
1
vote
0answers
24 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, ...
0
votes
0answers
12 views

Validating Tableselect: Checkbox

I have a form in which i have created a table like the following $form['tableselect_phone'] = array( '#type' => 'tableselect', '#header' => $header, '#options' => $options, '#...
1
vote
1answer
31 views

View filter based in text not in number

I have a field in an entity that is an Entity Reference with widget Select list. I have created a view and I want to be able to filter by that field in text format, but when I try to configure the ...
0
votes
0answers
27 views

How to alter local tasks (aka tabs)

I am following the info here to alter 'Results' page for my webform. I want to do exactly what is given in the example on that page (make the table view the default, remove the 'Submissions' tab. I ...
0
votes
1answer
89 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 ...
-3
votes
0answers
29 views

Website Encountered an unexpected error [Devel]

Am new to Drupal and was learning how to make a website. But when I was updating the settings of the theme the website crashed and gave the Following error. The website encountered an unexpected ...
0
votes
0answers
19 views

Entity registration state change to cancel after 30 minutes

On drupal 7, I use Entity registration and created a registration type with a timestamp field which retrieve the actual timestamp (field-timestamp). After registrering, the user has 30 minute to ...
0
votes
1answer
19 views

Programmatically added block doesn't appear in block admin page

First of all, this is not a duplicate of this question, as I can't see my block even though I click Place Block. Below is my block class. To the best of my knowledge, it should appear in the list, ...
0
votes
1answer
19 views

Change content of views_field_view field using hook_views_pre_render

I am using the views_view_field module for embedding a view inside another view. I want to concatenate some text with that field in hook_views_pre_render based on a condition. But when I printed the ...
0
votes
0answers
22 views

content type, local tasks and routing

So I have two content types, organisation and room. I'm using pathauto on room so the path for a room is /meet/[organisation]/[room] (based on a field in the room content type linking to the ...
0
votes
1answer
20 views

Select the same number of results for every group

I have views where I select nodes and group all results in 3 groups by field. When I select for example a limit to 30 I get results but with the different count in every group (for example 20/7/3). ...
1
vote
1answer
21 views

Programmatic list of Webform elements?

I am building a D8 module that, for configuration, needs a list of webforms and their fields (just the entity reference fields, but I am not picky) I can get the webforms with this: $webforms = \...
0
votes
1answer
20 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
31 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 ...
1
vote
1answer
12 views

Webform Issue with Drop Down and Key not Equaling Value

I have written a custom handler in Drupal 8 D8 that grabs submitted data from a webform and reformats it and sends it to a JSON webservice. That is all working perfectly. My issue is that the ...
0
votes
1answer
18 views

how to download an alpha version with composer

when i run composer require drupal/uswds it does not download this contributed theme, because https://www.drupal.org/project/uswds only has alpha and beta versions. what would be the correct command ...
0
votes
2answers
23 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
37 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 ...
-2
votes
0answers
15 views

Wizard question based theme [on hold]

Does this kind of module/theme combination exist? A similar site that I can relate to is: https://en.ryte.com I need some wizard-based theme that collects data not particularly for registration.
0
votes
0answers
22 views

Using Raphaël JavaScript library

I'm trying to use Raphaël with a Drupal 8 website. I'm wondering if there's a step I'm missing, or maybe some other issue, as it doesn't seem to work. I suspect I'm just missing a step in using extra ...
0
votes
1answer
14 views

Rendered markup different than template markup

I am using drupal 7, and the bootstrap base theme to make a simple theme for a website I am working on. I am having issues with Drupal forcefully changing my html5 hierarchy and it's causing the site ...

15 30 50 per page