All Questions

Filter by
Sorted by
Tagged with
2
votes
2answers
589 views

Can a domain redirect work for both http and https?

Currently hosting a site on Pantheon and I would like to redirect traffic to a single domain. There is already a lot of links inside my site that are using: http://example.com/somepage, http://www....
2
votes
1answer
464 views

How to create landing pages and Main Menu based on taxonomy

I'm trying to build a website for a non-profit which has multiple locations (~6) besides the headquarters. The frontpage needs to be generic for the whole organization and will contain content from ...
1
vote
1answer
59 views

How to rename a content type programmatically

There are many answers and tutorials addressing the problem of changing the machine name of a content type, or migrating content types. However, I would like to rename a content type, without changing ...
0
votes
1answer
423 views

I can't enable SimpleTest due to open_basedir restriction being in force

I can't enable SimpleTest due to an open_basedir restriction being in force for my Drupal7 installaton which resides on a Linux server running PHP 5.2.12. I found the directive under my PHP.INI file ...
0
votes
2answers
557 views

Show a block only on the frontpage of the sub-domains

I am using Drupal 7 for a site and I installed the Domain access module for maintaining the sub-domains. The slideshow block (created using the Views module) should be displayed on the sub-domains ...
0
votes
0answers
70 views
+50

What is the exact process of resetting a password using Node.js?

I am using Node js as front end and drupal as backend, i am trying to develop a reset password api. As per my finding there are three steps for the same. Request a Password (Send an email with secure ...
1
vote
1answer
512 views

How to get the highest value of a specific field in a multivalue field collection

How to get the highest value of a specific field in a multivalue field collection, USING PHP? This is about displaying the right discount for a marketplace product. There is a node type Product with ...
0
votes
1answer
539 views

Custom Ajax forms with managed_file form element

We have a form with three fields - where depending on the value of the first select field, we will show the other two form elements - one select field (the options depends on the value of the first ...
0
votes
1answer
1k views

Drush does not work invoking the local Drush

I have installed new D8 on a remote server using this way https://github.com/drupal-composer/drupal-project . I have pulled files from GitHub and I have run 'composer install' for getting the all ...
2
votes
2answers
2k views

Error messages aren't displayed when submitting the form

I want to display an error message when I submit a form. I added an AJAX callback to the form, and the error message appears after I refreshed the page. I first tried the following code, but it doesn'...
-2
votes
0answers
26 views

Serialization failure Deadlock found [closed]

I am using AWS Services CDN and I get the following error while adding products. Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying ...
0
votes
1answer
466 views

Add css to theme function

I'm declaring, on my module, a custom theme function: <?php function monitor_chart_theme() { return array( 'chart_monitor' => array( 'template' => 'monitor_chart', '...
3
votes
1answer
468 views

Alter the “From” address contact form

I'm trying to alter the email and change the default "From" address to a different email address. function mymodule_mail_alter(&$message){ $message['from'] = 'myemail@gmail.com'; } When I ...
0
votes
1answer
378 views

Sort grouping field associated with taxonomy term by weight on drupal 8 views

I'm currently trying to figure out how I can sort the grouping fields(Taxonomy Term) by weight that I have setup on my views. As shown in this screenshot below I have a grouping field that is ...
0
votes
1answer
546 views

Accessing Content: Path field within views_view_unformatted TWIG template

I have a view that has the fields: Content: ID, Content: Title and Content: Path. In my views-view-module.html.twig file I can access the fields via the following: {{ item['#row']._entity.id }} {{ ...
1
vote
1answer
448 views

db_update query does not work properly

I work with views bulk operations and I wanna change status of selected items in a view. I applied db_update query, but something went wrong. I was debugging my code following: $status=$context['...
0
votes
1answer
627 views

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 ...
0
votes
0answers
24 views

How to get URL on Computed Twig field (with tokens)

I have a Computed Twig field created on my webform. (Using webform module). In the "Computed value/markup" I have entered the value "{{ uri }}" token, and the url is correctly ...
1
vote
1answer
372 views

Drupal views fields printing html tags without rendering

I have my data from sql with table html tags e.g. tr and td with table html tags. When I render it in drupal views it displaying all the html table tags without rendering it. I put some code in ....
0
votes
0answers
27 views

How do I add a class to a views row in a hook?

I am building a view on my website that lists all currently pending user registrations. (They need to be approved by administrators). I also have a taxonomy that lists 'banned' names. The view lists ...
-2
votes
0answers
14 views

Display taxonomy parent in node.html/twig [closed]

I would like to print a taxonomy parent of my taxonomy term in my node.html.twig. Thank you for your help !!
2
votes
1answer
60 views

Alter Header Status Response to 410

I have several urls with "/tag/" string; some of them have content and some of them don't, so they return 404. How can I force them to return a 410 only for those that have no content? I ...
5
votes
6answers
12k views

How can I add relative path to a pdf file link in drupal menu

I have created menu link for a pdf file. I can use a full path like "http://website/sites/all/myfiles/file.pdf", but if I try to put a relative link such as "sites/all/myfiles/file.pdf" it does not ...
5
votes
1answer
34 views

Module Uninstall Validators and Lazy Services

I have recently been working on creating functionality for a module that requires certain content related to the module be deleted before the module itself can be uninstalled. https://www.drupal.org/...
1
vote
1answer
385 views

Why is an empty field on translated taxonomy term showing default language value?

I have a list of translated taxonomy terms (title, description, link, image). Only some of the translated terms have a value in the link field. Set up as Entity translation My view pulls all fields ...
0
votes
1answer
571 views

SearchApiQuery - possible to remove a filter?

The query parameter that is passed to search_api_query_alter has SearchApiQueryFilter member. It contains a protected array of filter elements. I can add to this by calling the createFilter() and ...
0
votes
1answer
20 views

How to correct a view query?

I would like to know how to correct a view query, when Drupal goes nuts ? I'm using a view that should list media by categories (taxonomy term). This view is called by a node, that held a reference to ...
1
vote
2answers
429 views

add custom data attributes to block from block configuration page

Here is what I would like to accomplish: 1. Add data attributes to block (for example: data-key="value") 2. Nice to have: add a text area to block config page where i can enter data attribute key-...
1
vote
1answer
1k views

Override page template and preserve administration navigation bar

Short version; I am trying to override the default page.html.twig (in D8) for a controller from my module and the following examples I've found have not worked: https://www.drupal.org/node/2499827 ...
0
votes
1answer
567 views

One-to-many and many-to-many relation between nodes of different content types

I am using Relation module for creating relationship. But i didn't find the option how to create one to many, many to many relation. Can anybody tell me regarding that Thanks
0
votes
1answer
29 views

How to sort type paragraphs in views?

Hello it is possible to order the output of the paragraphs for example Type of content Blog I create a blog details field that calls the type of paragraphs and there I select image and description In ...
0
votes
1answer
26 views

Add upload/processing status bar/throbber

I am new to Drupal/web development and I have been trying to create a module to add files upload menu. Once the files are uploaded, they undergo processing and a message is displayed upon completion ...
1
vote
1answer
578 views

Update a field on a node after hitting save

I am working on a Drupal 7 custom module and would like to update a field on a node after hitting save. Based on some post that I have seen this should be possible. As it is now I have the $node ...
5
votes
5answers
5k views

Is there a way to clone a content type and its fields?

I have a content type named "event_xyz" that I want to rename to "event". I figure I can clone the content type and then delete the original. But I don't see any tuts or modules on how to do this. ...
1
vote
1answer
436 views

Blocks aren't being assigned to a region

Is there any reason that these blocks wouldn't be assigned to the regions specified? The only way I can get these to appear is to set them manually. Kinda defeats the purpose of defining a region in ...
0
votes
0answers
27 views

Webform select default option theming as placeholder

I have webform with a select field. The select field doesn't have a placeholder option and by default show the first option from the select list. I can't understand how can I theme this first value as ...
0
votes
2answers
487 views

Define available default colors for Color Field programatically

I use the Color Field as a field in a custom module from where I create the content type programatically. By default the available colors are defined at this hook: color_field_field_settings_form in ...
5
votes
4answers
1k views

How to expose the user's email on the user's detail page?

Currently in the manage display page there is no way to display the email field in the manage display page. How do you expose this in Drupal 8 contacts details page? There can be a work around for ...
0
votes
1answer
424 views

Assign textfield to each checked option in a checkboxes field

Lets say I have a checkboxes field and when I check one of the options, I would like a textfield to appear so I can assign a number (quantity) to it. Every option I check would have its own textfield. ...
0
votes
1answer
364 views

The clean URL test failed. (ubuntu14.04 lts + virtualmin + Apache/2.4.7)

i can't enable clean url. Mod_rewrite is already enabled. Anything i'm missing? here is the conf my apache is running user mode, the document root is in /home/drupal/public_html /etc/apache2/sites-...
0
votes
2answers
439 views

IMCE module is not showing icons on the editor

I installed the IMCE module, but it didn't add any icon to the editor menu toolbar. It manually loads with domain.com/imce.
0
votes
1answer
16 views

In my Simplenews twig template how do I get the URL of the page I am emailing?

When a single test newsletter is sent, Drupal provides me with the expected URL as follows: {% set foo = url('<current>') %} <p class="link-to-page"> <a href="{{ foo|...
0
votes
1answer
503 views

Search API group by issue with views

I have a content type thats is called course which has a field that is a reference to a taxonomy called category. My specification tells to build a search where users can search for the course title,...
1
vote
1answer
520 views

“Allow multiple values” vs “Allow multiple filter values to work together”

In Views, when adding an Argument for a vocabulary term id, I'm presented with the following 2 options: Allow multiple values If selected, users can enter multiple values in the form of 1+2+3 (for OR)...
0
votes
1answer
441 views

Passing arguments from Panel to View without url or using contextual filter from panel to field of taxomony term within view

Using Drupal 7, Panels 7.x-3.3, & Views 7.x-3.5. I'm unsure the best way to approach what I'm trying to accomplish. I have taxonomy vocabularies classifying people in my department. One ...
0
votes
2answers
929 views

How to insert line breaks in views global custom text field?

My view renders plaint text output - no HTML allowed. I want to format my fields with \n line breaks. How do I do that?
0
votes
3answers
698 views

Passing Node ID/Title to Next Page Webform Field

I am new to drupal 8 and assisting my development team with design part. We are stuck in one place and not manage to move forward. We want to pass the node ID info to a webform filed which exist in ...
0
votes
1answer
474 views

comment form custom validation

I am using a custom validation in my Drupal 7 comment form.I want to match the comment_body against a word "example" so if someone just type "example"in the comment body then it will show a error ...
0
votes
1answer
479 views

Location's Distance/Proximity exposed filter without Node Location Submodule but with Location CCK Submodule instead

I would like to stay a little bit more flexible and use Location CCK fields (from Location CCK Submodule) instead of Node Locations (from Node Locations submodule) on my nodes. However, in my view of ...
0
votes
0answers
38 views

How to place a plugin block to twig template without any contributed module?

I am using Drupal 8. Have created a custom module, added custom block "LskyTestVideo", created a new page template with its own controller ("LskyOpenTokTestController"). In ...

15 30 50 per page