All Questions

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

RewriteRule causing internal redirect limit error

I am trying to server a static HTML site from /sites/default/files/staticsite and make it available via a subdomain. I'm hosting the site on Acquia Cloud, and their docs describe Maintaining a static ...
0
votes
0answers
21 views

DBupdate schema update can't rename table because it already exists -

I recently updated a couple of modules and core: To Drupal 8.8.6 Modules updated: metatag, Search API, Feeds, External Links and EntityQueue. There was a small hiccup that broke the site, so I re-...
1
vote
1answer
607 views

Node Edit Form in CTools modal

I added node ADD form in ctools modal window and ctools autosubmit functionality . So far so good, but my goal is to return node EDIT form when autosubmit triggered. Now modal callback function looks ...
0
votes
2answers
585 views

dependent dropdowns via #ajax for unlimited option

I have a commerce Product content type, which has a field collection field attached to it field_mycollection, which has 4 different fields field1, field2, field3 and field4 dependent on each other. ...
0
votes
0answers
26 views

User field to entity reference

I have created a content type, with a custom field. Then i have created an Entity Rereference on the users fields, so the user can select from those nodes on their user account settings. The idea is ...
0
votes
2answers
955 views

Unable to set the data property xxx as the parent data structure is not set

I currently use geofield to set latitude and longitude but rules gives me this error: 0 ms Unable to modify data "user:field-coordonnees:lon": Unable to set the data property lon as the parent data ...
2
votes
4answers
143 views

How do I create a HTML link from an internal path using the core Link class?

I miss the deprecated l() a lot. I am trying to construct the Drupal 8 equivalent of: l(t('mylink'), 'admin/structure/types'); This call generates this HTML: '<a href="/admin/structure/types">...
0
votes
1answer
574 views

How to setup multiple currency drop down

I have basic content type setup (No commerce or ubercart) which display price as a text field and that value has been used in 5 computed fields. Now i like to make that price field in drop down ...
0
votes
0answers
16 views

How to migrate content using migrate-manifesy?

English is not my native language so please be patient. I'm totally new to Drupal development so I was learning how to migrate from Drupal7 to Drupal8 due to some work necessities to test a POC, the ...
1
vote
2answers
643 views

How to grant permissions for some role to execute custom Rules Components?

I created a view (table) and i asociated views bulk operations. I created 4 rules components. I have permissions only for user/1 (admin). Another user role (eg. editor) can't see these options. "...
2
votes
1answer
860 views

Sort view items by field collection's field value

I added a field collection to Basic page that contains: box title box image box position on page You can add 0 or more field collection's items to every basic page. Every node may contain 0 or more ...
0
votes
0answers
18 views

My custom menu link class are being overwritten by the “is-active” class

I have a standard navigation menu. In the Drupal UI, I've assigned a CSS class to some of the links on this menu. These classes are being correctly applied to the tags in the rendered menu. However, ...
0
votes
1answer
643 views

Passing arguments to a block

I am working on trying to understand the secrets of custom-developed blocks. Namely, I have a use case where a block need to pull content via EntityFieldQuery (this could be done with Views, but I ...
0
votes
1answer
636 views

Merge multiple block views to a single jump menu

I want to implement a jump menu with a list of three different vocabulary terms grouped by each vocabulary name. If I make only a single view all the terms are shown correctly but I would like to be ...
-1
votes
1answer
34 views

How to alter the POS order item table header and columns

Using Drupal 8/Commerce 2 and the Commerce Point of Sale (POS) module, the autocomplete form to search and add a product to an order shows this table header. As indicated by @JayPan below, here ...
0
votes
2answers
868 views

One image style not generated

UPDATE: After investigting this I have concluded that the problem concerns ALL new image styles, but "old" ones are still working. Old ones are the built-in (e.g. thumbnail) and one image style of my ...
2
votes
2answers
1k views

How to alter views exposed form and add ajax to filters

I have a views with 2 exposed filters - both taxonomy reference, select. I want to limit options in second filter based on user selection from the first. Tested with enabled/disabled ajax in views - ...
2
votes
2answers
1k views

How to override a module theme function in a custom module but still allow themes to override the template file?

I'm writing a fairly simple module which allows the removal of colons from field output on a per field basis and I need to override the core field module's theme_field function in my module. I can ...
-2
votes
0answers
19 views

Item Textarea doesn't work correctly with the spacebar under Chrome Browser [closed]

I use Drupal v8.8.5 and Webform v8.x-5.11. Issue only with Chrome Browser, because all it's correct with others browsers. In a Webform with the object , users wish enter normaly text on zone "...
1
vote
3answers
2k views

How to save files to a private directory?

I am writing a custom module in which data is written to a file and the file is stored in a private directory folder. In order to do so I have created a private directory and assigned required ...
0
votes
1answer
26 views

Looping through an array using Migrate Plus

I'm trying to loop through an array (called "Attributes") in a JSON migration source, but I can't figure out how to do it. Here's a shortened sample of my data source: [ { "Id": "ST00000002", ...
-5
votes
0answers
31 views

why textarea does not work in the chrome browser [closed]

I use drupal 8.5 with webform 8.5.12 arrow keys espace keys and tab keys do not work in with chrome browser Could you help me please?
0
votes
1answer
1k views

Composer update : Package “drupal/module_name” listed for update is not installed. Ignoring

After hours of struggling to update Drupal with Composer (see my solution here), I have now some difficulties to update some modules. I was able to update with composer update drupal/bootstrap:3.11 --...
7
votes
3answers
11k views

How do I programmatically generate an entity form?

I need to programmatically generate the entity form for my custom entity - basically get the same output that happens when you call \Drupal::formBuilder()->getForm('form namespace') When I try ...
2
votes
1answer
493 views

Continuing an interrupted batch

I'm using a batch job in Drupal 8 to scrape pages from another site to import. I'm using httpClient, and I have it wrapped in a try/catch. try { $response = \Drupal::httpClient()->get($parts['...
1
vote
2answers
533 views

Problem with equal height of columns in Display Suite

I`ve got Fluid two column stacked layout in Display Suite. There is responsive picture in the first column, the second column contain some rendered fields. Below that columns is long text. My problem ...
0
votes
1answer
526 views

Showing title keyword in autocomplete

I have just installed search auto complete module,its working fine,but the problem is its showing title before every result like: title: Drupal 7.9 Release tile:Understanding Drupal Here Drupal 7.9 ...
0
votes
0answers
9 views

Filter by the label of a content type in a query

I'm trying to modify the entity reference autocomplete to search by the content type label. Does anyone know how to search by the label of a content type? With "node_field_data.type" I can search by ...
0
votes
1answer
562 views

Exposed Filters View is not functional with Anonymous Users

I created a Filtering Search with Multiple Exposed Filters. It all has been working fine except one thing; when I logout as an admin and use the site as an anonymous user, exposed filters don't work. ...
1
vote
0answers
15 views

Using Taxonomy in drupal

I need to create a custom form with a vendor dropdown ("Vendor A", "Vendor B") and a list box with multiple options belongs to selected vendor. Once a user select Vendor from dropdown, list box will ...
0
votes
0answers
11 views

Exposed form block disappear when views has no results

I created a view template for my website in which i put my exposed form block with twig tweak module. It works when there is at least 1 result. But when my view has no result, the exposed form ...
0
votes
1answer
1k views

Lightbox gallery is not working in mobile website

I am using D7 and lightbox2 for image gallery. I'm using same in the mobile version too. But the lightbox popup is not opening and showing in mobile browsers. It will work sometimes and will never ...
0
votes
1answer
884 views

How to override views-view-field.tpl.php in custom module?

I am trying to override views-view-field.tpl.php in my custom module as suggested in override views-view-fields.tpl.php in custom module but looks like it's syntaxes are old. My codes are like: In ...
1
vote
1answer
486 views

I get a “URL not found” error, but the image is on the server

I have a Drupal site which I have just migrated to a different Linux server for development. The site seems to be working more or less. However, one problem persists: None of the images is shown. ...
0
votes
1answer
573 views

Display batch operations messages

I have defined a batch, everything works ok, but I want to understand how the messages are displayed. So I have this batch: $batch = array( 'title' => t('Generate reports'), 'operations' => ...
1
vote
1answer
602 views

Creating Two carousel in one page using jCarousel in drupal

I am trying to create 2 carousels in one page with jCarousel module. But the css is applied only to the first carousel and second is appearing as normal ul li tags. Can someone help me in resolving ...
0
votes
0answers
12 views

PHPUnit fails when logging in user

I've got a custom module and have the auto generated LoadTest but it is not working. This is a functional test. protected function setUp() { parent::setUp(); $this->user = $this->...
0
votes
2answers
1k views

Clearing cache breaks site

I'm trying to load a production site in a dev environment using the site's codebase (core 8.3.7, contrib and custom modules and vendor folder) and the current database. After struggling a bit with it,...
5
votes
4answers
11k views

Getting arguments from URL

How do I get arguments from the URL? in other words, what is the equivalent of the arg() function of Drupal 7 and previous versions?
1
vote
1answer
148 views

Entity Reference Custom Entity not visible

I made the following module with a custom entity in it. This is all working fine, but now i want to make a entity reference field in some content type to this custom entity. For this i made the ...
0
votes
0answers
20 views

Display taxonomy field in view on content page

Using Drupal 8.8.1, I am trying to display taxonomy fields in views on content pages tagged with that taxonomy. Essentially the content page would have an image header from the taxonomy image field, ...
0
votes
1answer
609 views

External URL Redirect Breaking Image Links

I was recently hired to manage an existing Drupal 7 site (built with an Omega subtheme) and am doing my best to ramp up quickly. Unfortunately, I do have some fires to put out immediately and could ...
2
votes
1answer
1k views

How can I add multilingual taxonomy breadcrumbs?

I have a site with two languages and a large number of taxonomy terms. I want to use breadcrumbs on my taxonomy pages, but I can't find a system that works well with multiple languages. I translated ...
3
votes
2answers
115 views

What is the best practice for writing a link to the screen through t()?

In Drupal 7, one could do the following one line:: t('Visit !mylink', ['!mylink' => l('my website', 'http://example.com')]); But that no longer works in Drupal 8 or 9 😞. So far, I've tried this:...
1
vote
3answers
659 views

Display Jalali (Shamsi) Date in Archive View

I have a Persian language website and I need to a archive block in my site. but date of default archive view is Gregorian. I install Datex module and it convert all date of nodes to Jalali(Shamsi) ...
0
votes
0answers
20 views

Is there any native way to implement AJAX form submission without a button?

I need to implement a form that automatically saves data on each element change. So I can add a button with ajax callback and trigger mousedown on this button on "change" event using jQuery. And ...
0
votes
1answer
81 views

Update some field values after user update own account

On my Drupal 8 project, usernames are only allowed to be emails. For that, on account creation, I am setting the name field equal to the email field, and users don't have the permission to edit their ...
1
vote
2answers
37 views

Layouts using the grid system

How can I lay out blocks or paragraphs using Bootstrap's grid system? I found this seven-year-old answer and am hoping things have evolved since then, and if so would like to know how. My best stab ...
0
votes
1answer
36 views

Naming convention for field type templates?

It seems that the naming convention for field types is undocumented. Looking at the classy theme shows a seemingly arbitrary convention. For example, the Text (formatted, long, with summary) type as ...
1
vote
1answer
938 views

Programmatically load and submit the user form

I want to programmatically load the user profile form for a particular user and re-submit it without changing any of the existing values. The reasons are complex but I am dependent on gathering data ...

15 30 50 per page