All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
826 views

views api add_where() causing view not to be displayed

have a page that features a few views based on content types. Each content type includes a keyword field. This page is reached from a short quiz. I'm trying to limit the content in the views based on ...
0
votes
0answers
3 views

Site HTTPS insecure on some browsers and others are fine. .htaccess redirect is working, but random?

I have the following url: https://www.xcubicle.com/about It shows that its insecure on my phone, Edge, and Firefox browser. But on Chrome desktop it works correctly by redirecting it to the https://...
0
votes
0answers
2 views

Composer update - Your requirements could not be resolved to an installable set of packages

when I run a composer update --with-dependencies, I get the following error message: Problem 1 - don't install drupal/core 8.6.0|remove drupal/drupal dev-master - don't install drupal/core 8....
1
vote
2answers
735 views

How to prevent closing ctools modal window with ESC?

I am using ctools modal window to edit some records with Form API. How can I prevent closing window with ESC key and the default close button?
0
votes
0answers
3 views

Overriding the User entity list_builder handler

I'm trying to override the User entity list_builder handler to add another column to the table and implement some JavaScript search functionality. The code I'm using is below which is in my modules ...
1
vote
2answers
435 views

How can I use xx time ago in Drupal 8 comments?

I use Drupal 8 and want the date of comments just show "xx time ago". I added this code to mytheme.theme, but it does not work: function mytheme_preprocess_comment(&$variables) { /** @var \...
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 ...
0
votes
1answer
388 views

Add field to an entity_view for dispaly in a tapir table in ubercart

In the simplest terms I am trying to add a 'vendor' column to the order view table in Ubercart which will display the author of each line item product. Below is the table of interest. I have hacked ...
0
votes
2answers
15 views

Cloning nodes between multisite instances with separate databases

I'm working on a Drupal 8.6 multisite and my client wants to be able to duplicate content between many of these sites. The codebase of the websites is the same, but each of them uses a different ...
1
vote
3answers
17 views

Query fieldCondition for custom content type

I am attempting to query a custom content type called players (machine name) in a Drupal 7 module and it seemed to be working fine up until an hour ago. Nothing has changed on my side but now the '...
0
votes
1answer
13 views

Difficulty with checkbox boolean feature

Our stakeholders asked for a feature where they can "pin" blog posts (basically the "sticky" feature, but I'll use the term "pin" and "pinned" in this question), where certain posts that they select ...
1
vote
4answers
4k views

Node Export and VBO

In an effort to mass export all my nodes, I installed Node Export and VBO. The NE project page claims that it supports VBO, but I can't seem to edit the prepackaged VBO view and add the Node Export ...
0
votes
0answers
10 views

Why ajax button calls submitForm?

I have no problems with using Ajax in every form element other then button. When I'm clicking this button '#type' => 'submit', '#ajax' => [ 'callback' => '::ajax_function', '...
5
votes
4answers
3k views

tableselect with dropdown per row

I use a tableselect to output a list of terms and per row I want a drop down (select): $header = array( 'name' => array('data' => t('Name')), 'weight' => array('data' => t('...
-3
votes
0answers
15 views

How does accessibility compliance in Backdrop CMS compare with that of Drupal 8? [on hold]

One of the benefits of Drupal 8 was to enhance compliance with Section 508 accessibility requirements. To what extent does Backdrop match Drupal 8 regarding those improvements? Do those ...
0
votes
1answer
9 views

Why can't I debug twig templates with intellij idea?

I can't get intellij idea to break on twig files. It is breaking on theme and module files fine. This means that xdebug must be setup correctly. I don't believe that it is caching as I've deleted the ...
0
votes
2answers
39 views

.htaccess not working in files folder to disable php files from executing in files folder

I have the following in my default/files/.htaccess file: SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006 ...
5
votes
3answers
5k views

What could be causing drupal to want to reinstall itself after I clear cache?

I am trying to update Drupal from 7.17 to 7.18. I uploaded a copy of my site from a test server to my production server. Everything installs fine, I actually see the site working, and I can navigate ...
1
vote
1answer
2k views

How to sub_process a non-associative array in migration.yml

I know I can use sub_process to iterate over an associative array like field_categories: plugin: sub_process source: remote_categories process: target_id: plugin: migration_lookup ...
0
votes
0answers
35 views

How to remove or fix Missing bundle entity that causes error

Working on a new site, and I have a "regions" taxonomy vocabulary that has mysteriously disappeared, even though it shows in the list of taxonomies. If I try to view, edit or delete the taxonomy by ...
0
votes
1answer
2k views

how to set a session variable when a link is clicked?

I have created a search block. It outputs multiple results (names) as links. User can follow the link. How can I pass the user name into $_SESSION variable? I tried doing this, result shows page not ...
0
votes
0answers
8 views

Cant get Quick Edit Link to display on Published Content

I am having a problem with the Quick edit link displaying on published content? Is this working as designed or am I missing something. The quick Edit link appears on all of the unpublished content. ...
3
votes
3answers
2k views

How to migrate to translatable fields

I am using the latest Entity Translation module in order to provide a couple of translatable fields for some of my content types. I have a content type which has a translatable field which is called "...
0
votes
1answer
735 views

Date field Start and End limit

When we create a date field in node form, we can set START and END years to be shown in that date field. If we are creating a date field programatcaly, how do we do that? I have a date field, my_date,...
-4
votes
0answers
24 views

Calling Microsoft Azure Queue from Drupal custom module is not working [on hold]

how to invoke Azure queue code in Drupal 8.The standalone PHP interface is working as expected with Azure Queue but not end-end with drupal application. Is there any working sample for this scenario. (...
0
votes
0answers
21 views

Should I create one or multiple EventSubscribers for different functions, but same module and event?

This is more of a design decision than troubleshooting question. I have 3 different things I want to do when a certain Event occurs. I could either: Create one EventSubscriber for the event, with ...
1
vote
3answers
1k views

How to display a block if a Boolean on/off checkbox is checked?

I will eventually install Panels to accomplish this. But I can't at this time. I want to allow an editor to display a right sidebar menu on any page when they want by checking a Single on/off checkbox ...
0
votes
3answers
717 views

Feed's Regex find replace problem

Hello Drupal community, I'm finding some issues in a tamper used in feed's module. I want spaces to be deleted in a field that contains numbers. Something that changes "00 00 00 00 00" into "...
3
votes
0answers
53 views

How do we programmatically place a section and then a block in that region on module install?

We are looking for the best way to export a defined/built layout with inline blocks and then use that to programmatically set both them during a module install. eg. module install create node in ...
0
votes
1answer
8 views

Feeds: How to import content from multiple xml files

I have around 100 xml files. Each xml file contains a single item. I have created a feeds importer which is working fine for single xml file. But I don't know if feeds can work with multiple xml ...
0
votes
2answers
2k views

How to sort by condition in entityQuery

I want to get a list that the items with a specific term in the top (like promote). The query would be like: $query = \Drupal::entityQuery('node') ->condition('status', 1) ->condition('type'...
-1
votes
0answers
10 views

Block or ban ip addresses based on site-wide contact form category

How to create a rule with the Rules module that blocks or bans ip addresses based on the category that they selected on the contact form for anonymous contact submissions via the site-wide contact ...
-5
votes
0answers
19 views

Paragraph ordering [on hold]

Drupal 8 (possibly be Drupal 9 be completion of project) I have a set of data that will be in paragraphs, simple date & text fields. These need to be ordered in groups which do not have to ...
0
votes
1answer
34 views

Show rendered node in jQuery modal through JSON

Whenever a link has a specific class I want to show it as a jQuery modal. I have added the neccesarry data attributes to the link in order to be able to use it as a modal. I have also created a route ...
0
votes
0answers
47 views

Using Layout Builder with Menus

I followed this tutorial but am having some issues. I enabled menu_link_extras and layout_builder on my site. I enabled layout builder on my menu, added a menu link and added a block to that link's ...
4
votes
2answers
1k views

How do I filter by node ID in views?

I am trying to add Node ID in contextual filters but it seems there isn't Node ID anymore.
0
votes
2answers
28 views

Defaulting a value for a new boolean field added to an existing content type with content?

We have a Drupal 8 site. For one of our features, I added a boolean field called 'Pinned' to a our Blog Post content type. As I added the filed as a filter criteria to views, I noticed that, no ...
0
votes
0answers
12 views

How to change where the sqlite database is generated when running tests?

When running tests, I have some .sqlite files and tmp files created in my project root while the test is running. This causes my IDE to go crazy. Is there a way to tell Drupal in phpunit.xml to store ...
0
votes
1answer
1k views

How to handle free and paid orders with post processing?

I'm going around in circles trying to use Drupal Commerce to make an ecommerce site where some orders cost money and some don't (because some users have coupons that make products free). I've set up ...
-2
votes
1answer
41 views

How can I change the taxonomy term title?

Simple as that. I want to change the H1 tag from taxonomy views to something like "Articles from %term" to make it more user friendly and not redundant (breadcrumbs shows the term alone). I couldn't ...
2
votes
2answers
6k views

How to access session in twig?

I wondering how to access to session in twig ? In my Controller I have this part of code : $tempstore = \Drupal::service('user.private_tempstore')->get('mdm_user'); $tempstore->set('...
-2
votes
0answers
26 views

Calendar/datepicker popup not working on safari

$form['date']['air_date'] = array ( '#type' => 'date', '#title' => t('Air Date:'), '#required' => TRUE, '#default_value' => !empty($arr['air_date']) ? $arr['air_date'] : '', ); ...
0
votes
0answers
11 views

Contact message entitytype missing “id” parameter after 8.7.6 update

I'm updating site from 8.7.1 to 8.7.6, and I'm getting strange error: Error: Call to a member function getType() on null in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->...
1
vote
1answer
427 views

Define permissions for Actions?

function custom_mod_action_info() { return array( 'custom_mod_delete_user_cats' => array( 'label' => t('Delete a users cats'), 'type' => 'user', 'configurable' => ...
0
votes
1answer
17 views

UTF-8 encoding when creating nodes (from mails)

I'm making a customized version of the Mailhandler module, which has a node creation function: protected function createNode(MimeMessageInterface $message, DefaultAnalyzerResult $result) { $node =...
-2
votes
1answer
23 views

How to add file to root in multisite installation?

I have a multisite setup. public html - Sites - - All - - site1.com - - site2.com etc. I need to .txt files to the root of each website such as site1.com/ads.txt or site2.com/robots.txt If I ...
1
vote
1answer
436 views

How to use the same EntityListBuilder for entity A and an extended version B

I have used the content entity example coming from the example project. This example define a Contact entity. Next I have extended this Contact class in an Artist class with some added fields (let ...
1
vote
2answers
109 views

Strip HTML tags from validation errors

I am using Services 3.x for creating web services for mobile application, and I am using the JSON format. The validation errors given from the user register services comes with HTML tags; for example ...
1
vote
3answers
1k views

How do I update a user profile with entity_metadata_wrapper()?

I got an error while updating user profile data such as name,password and email. I am using entity_metadata_wrapper() for processing update. exception 'EntityMetadataWrapperException' with message '...
0
votes
1answer
1k views

Display blocks on taxonomy and content type pages

I have a taxonomy menu block. I need to show this block on some taxonomy term pages for a particular vocabulary and on some content type node pages in second sidebar region (bartik theme). How can ...

15 30 50 per page