All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Change max length of title in a custom block added via a template file

A drupal 7 website has a custom block added via a template file. The block displays previews of article content type belonging to a certain rubric. It uses the following line to do so: $block = ...
0
votes
1answer
23 views

URL Redirects and Configuration Management

I have installed Drupal's Redirect module to redirect from old URL's to new ones. I have added the required redirects in my local environment, ran drush cex but can not see the redirects in the export ...
0
votes
1answer
11 views

Error during import (The header record must be an empty or a flat array with unique string values)

I want to import some content into my site from a CSV file (bellow) [the file is originally an .xlsx and I use a online CSV converter to get the CSV file) format,type,name,address,id,ttx open,semi-...
-2
votes
0answers
31 views

Why I have to start “bash” before using drush (after drush init)?

So I have drush (symlink) inside my /vendor/bin If I call it directly (by typing full path to file) it works ok. But I want to type just "drush" and not full path to it to run it. So I ...
1
vote
0answers
9 views

How do add row striping CSS classes in Views?

I'm sure that on older versions of Drupal (6 or 7?) Views that showed as tables automatically had odd/even striping background colours. Is there a UI option for this in D8/9? I've done it in code like ...
0
votes
0answers
13 views

Can't submit entityform after ajax callback on select element

I followed the advice from this link and migrated the code populating my ajax into buildForm(), and all is well. Select list is populated by ajax and elements are preserved even after form submit. ...
1
vote
0answers
19 views

Convert User object to same JSON Structure as D7's

We are migrating a D7 site to D8 and I have an API endpoint that returns the current user that I need to migrate. In D7, I would do something like: global $user; $u = user_load($user->uid); return ...
1
vote
1answer
25 views

how to create template suggestion for image like image--NODE-TYPE--VIEW-MODE

I'm trying to create a suggestion like image--NODE-TYPE--VIEW-MODE, but in mytheme_theme_suggestions_image_alter() $vars i haven't node related info thanks for help
1
vote
1answer
15 views

Adding the category for a custom entity reference field add other fields to the same category

I have a custom entity reference field working well, but once I added the category to it the other entity reference fields appeared in the same category. Here is my code: /** * Plugin implementation ...
4
votes
1answer
134 views

What are my options for a url based cache tag?

I have a controller that serves a path, /get-messages, which requires a query argument, path. An example request to this path will look like /get-messages?path=/about/team. I have a content type, ...
0
votes
0answers
15 views

How can I extend the webform #states conditions to save a custom set of conditions for webform fields?

I need to store sets of conditions on the webform field level (these would then be evaluated according to the field's submitted values within a custom submit callback). I would like these conditions ...
1
vote
1answer
28 views

Commerce framework: How on earth do I offer recurring license subscriptions? [closed]

I'm new to the Commerce framework. My goal is to sell licenses to users (via the commerce_license module). Purchasing a license should grant the user a particular role for the duration of the license. ...
1
vote
0answers
30 views

Field type where big data is not loaded into memory if not needed

Background Normally when an entity is loaded in D7, the 'field_attach_load' step will load all the data from fields into the entity object. The field_sql_storage_field_storage_load() loads the data ...
0
votes
0answers
28 views

upgrade from 8.9.2 to 9.1.0

I have a drupal 8.9.2 installation with many modules. I ran upgrade_status and applied patches or upgraded modules to dev version like suggested. fhebert@fhebert-communication:/var/www/domain.com$ ...
5
votes
1answer
350 views

Locked myself out after enabling misconfigured Google Authenticator

I somehow managed to lock myself out of a Drupal 9 installation after setting up TFA with Google Authenticator login. So, i know my user1 name, my user 1 password, but TFA doesn't allow me backend ...
-2
votes
0answers
22 views

Converting existing single site to multisite throws error

I'm trying to convert an existing 2 Single site to a Multisite. Steps: Created 2 folders [subsite1, subsite2] inside the sites folder. Moved files from a single site to sites/subsite1/files. Added ...
0
votes
0answers
23 views

User's Name and Mail not accessible

I'm trying to access different properties of a Drupal user, such as name or mail, but they are not accessible, either from Drupal Rules module or from the emails sent when a new user has been created ...
0
votes
0answers
21 views

Editing block content: empty block body

I've been asked to support a drupal website. The website has a block that has content in it. When I locate the block in /admin/structure/block/block-content, the "block body" section is ...
0
votes
1answer
10 views

How can I filter nodes by term (entity reference) with jsonapi?

My nodes contain an entity reference field, Ref Term. I want to fetch a list of nodes that have a specific term with jsonapi. In jsonapi, when I fetch nodes, the field with the taxonomy term ...
-1
votes
0answers
27 views

I am trying to display the anchor tag link text issue [closed]

In Drupal 8, I am trying to display the entire text in the anchor tag. But it is truncating to 79 characters. How to display it fully. Example: <a class="btn btn-info" href='#someurl'>...
0
votes
0answers
15 views

How to speed up tracking in elastic search?

I have been experiencing extremely slow rebuilds of the search index on our client site which is currently indexing almost 4 lakh nodes, before indexing we need to complete the tracking process. But ...
4
votes
1answer
23 views

How to programmatically clear library info definition?

Created a dynamic library which attaches some external CSS & JS thru hook_library_info_build hook and this depends on a dynamic config values set by a config form. So whenever that config form ...
-3
votes
0answers
17 views

Search menu by Menu link title

How can I search a specific menu by Menu link title. I want a list of Menu link title containing a specific set of characters.
0
votes
2answers
19 views

Hide comment box from node for Anonymous users

I am trying to hide the comment box for anonymous users. Anonymous users should only be able to view the comments. How can I hide the comment form?
-3
votes
0answers
40 views

Comparison of Drupal VM, DDEV-Local and WSL (Windows Subsystem for Linux) for Drupal 9 development [closed]

I am wondering if there are other methods of Drupal 9 development similar to Drupal VM and want to find out the differences and benefits of these 3: Ubuntu VM (Drupal VM) DDEV local (running in Docker?...
0
votes
1answer
18 views

How can I limit an entity reference selection to a specific field value on the reference

I have a content type Research which has a an entity reference type of People. The problem is that I don't want to show ALL people but only people which have a certain value under their field named ...
0
votes
1answer
15 views

Moved Site - Can't find original CSS for look other than in the ADVAGG

I've inherited a drupal 7(I'm a beginner) site that had ADVagg installed. I added a stanza in my nginx config to take care of those files. What I'm running into is that there is a button on the ...
3
votes
0answers
41 views

How can you require users to change their passwords on first login after migration?

We are planning to migrate users from another CMS to Drupal. We can migrate usernames, but not passwords as the encryption is different. So we shall have to assign passwords to them. Earlier versions ...
0
votes
0answers
4 views

Access custom block link field url in twig template

I have a custom block with four fields like this : I want to display in twig the value of image's uri. I've tried something like that in field--block-content--field-linkedin-link--rs.html.twig ...
0
votes
0answers
7 views

How to add conditional on Gutenberg's color theme-support?

I've added the Gutenberg theme-support on my custom theme. I want to add conditional based on text color and background color. For example, selecting the black color background will reset the default ...
0
votes
0answers
8 views

try to hide button with certain class in js file

I've got flags in a paragraph field, I try to hide other flags of the paragraph if one is clicked. Here is the html: <div data-quickedit-entity-id="paragraph/10" class="paragraph ...
0
votes
1answer
26 views

How can I add Commerce Wishlist share mail template variables from form?

I am trying to add 2 additional form fields to the Wishlist Share form where the user input will be rendered in the email. I have been able to add the fields to the form, but I am not sure how to add ...
0
votes
1answer
6 views

Geolocation open InfoWindow on load

I can't get my head around the following. I'm using the Geolocation module to show a map on my website and I want the InfoWindow to be open by default. I found that this should be possible by using ...
0
votes
1answer
18 views

How can I have a new dropdown for each entity reference added?

I have a content type with an entity reference to another content type that has over a hundred items. I want to use a dropdown menu to select the entity, since the user won't always know the titles of ...
-2
votes
1answer
33 views

Is there a way to sort view asc or desc using twig

Is there a way to sort view asc or desc using drupal_view('vn', 'vmn', sort order) in twig or Can sort we views_embed_view() in controller
0
votes
1answer
27 views

How to put view results in an entity reference field?

So the scenario is like this: I have to create a "node" which has an entity reference field which can hold multiple values. I am looking for a way to be able to select view results to be ...
0
votes
0answers
36 views

Placing a block on an entity

I am aiming to place a block on an entity. It seems like this should be simple as entity integration in D8 is well-developed and (in parts) user-friendly. I can get the view block working fine and can ...
-1
votes
0answers
23 views

Headless ecommerce system with Drupal commerce [closed]

I'm considering using Drupal + Drupal commerce for an headless ecommerce. I read the first articles of Google's results about that specific topic. I used to build websites with Drupal 6 & 7. ...
0
votes
0answers
18 views

How can I use range filters for strings?

I have created a view in Drupal 7 in which the dates are in text format, eg 2020-10-12 and I want to filter date ranges using between or >= and < but there doesn't seem to be such an option for ...
-2
votes
1answer
46 views

Why did my event subscriber suddenly stop working and how can I debug it? [closed]

I've been working on a module in which I'm subscribing to commerce_order.place.post_transition event. However, it suddenly stopped working. Any ideas how I can debug it? I tried Xdebug but it won't ...
-4
votes
0answers
18 views

The usage of the public:// in drupal 8 [closed]

Why it will report an error? use Drupal\Core\Database\Database; use PhpOffice\PhpSpreadsheet\IOFactory; $reader = IOFactory::createReader('Xlsx'); // Load $inputFileName to a Spreadsheet Object. $...
0
votes
0answers
17 views

Rendering view better expose filter in drupal does not containg term id in drupal 8

I have created a view with better expose with term taxonomy And render in twig file Drupap_view('viewname','machinemname') Now I want use contextual filter based on term id dynamically But I see ...
0
votes
0answers
25 views

Images broken in production site and not in local

Some reason I'm able to view all my images in my LOCAL site, but as soon as I update my production files folder to match with my Local. some of the images are broken/Not Found. I checked out my files ...
0
votes
0answers
20 views

Access denied trying to edit node that I own

In an administrator account using the administrator panel i can create and edit content from content type Country. But when they are created from a script, and even if i own them, i can't edit if ...
0
votes
0answers
16 views

In Drupal 7, how can I completely disable cron so that it won't run even if the cron URL is hit or cron is ran manually?

When working on a dev site I'd like to put in a safeguard to make sure cron cannot run, even if triggered manually. Is there a way to do this in Drupal 7?
0
votes
0answers
30 views

Why does the upload progress bar reset at 40% when uploading large files?

I'm uploading a 5 GB file and the upload progress bar resets at 40%. When it gets to 40% it starts counting again from 0%. Eventually the file does upload completely but this is not good UX. I was ...
0
votes
0answers
21 views

Migrate a multiple date-range field from CSV using Migrate Source CSV-module

I need to migrate data from a csv file to Drupal 9 (using $ as delimiter for fields). The field csv_date_options can contain multiple date ranges with | as delimiter. The CSV-file looks like this: id$...
0
votes
0answers
14 views

How can I override better better exposed filters result using a custom Ajax request?

I want to override the result of Better expose filter using custom ajax call. Because I am using multiple better expose filter with auto submit but i want to show the result of single item. I write a ...
1
vote
1answer
47 views

How to insert custom redirect script in index.php without losing it on update

At the moment I'm migrating an old site to Drupal. To redirect all old url's to new ones, I made a script that has to be inserted before anything goes off, so in index.php at the top. <?php ...
0
votes
1answer
22 views

Hide breadcrumb from CMIS views

We're running Drupal 7.65 and Alfresco 5.2.4. We've the ability to display CMIS content (hosted in Alfresco) by fetching a URI like: https://domain.com/cmis/browser?id=<node_ID>. Doing so allow ...

15 30 50 per page
1
2 3 4 5
1682