All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

How to programmatically apply a fee/promotion?

I am trying to use the new commerce_fee module to programmatically apply a fee during admin payment flow. I did a simple form_alter to the commerce_payment_add form to have a list of my Fee entities ...
-1
votes
0answers
17 views

Superfish menu hides second level in responsive viewport

I have migrated dev.ronrandolph.com from Drupal 7 to 8.9.1 with Danland theme and superfish menu. ...
0
votes
0answers
12 views

REST login issue with react application

We are trying to integrate the drupal8 login REST api in react. And we are facing the below issue. Status code 500: Service unavailable. And When we checked the error log, we are seeing the following ...
0
votes
0answers
24 views

Assign content creation of nested content

In my Drupal 8 site I have a newspaper, that consists of multiple non-fix categories. Within these categories I have two different types of articles. As an editor I want to assign these two types to ...
0
votes
0answers
34 views

Drush commands are not working in Xampp on Windows

In Xampp 2 Drupal sites are there.one is drupal 7.0 and another one is drupal 8.8.7. Drush version is 8.3.5, PHP version is 7.2.22 ,composer 1.9.2 When I try enabling module in Drupal 7.0 drush en ...
0
votes
0answers
19 views

How to translate the author line “Submitted by … on …”

I've created a custom content type in Drupal 8.9.1. Each content post automatically renders the line Submitted by author_name on 08.07.2020 - 18:21 Even though my Drupal system language is set to ...
-3
votes
0answers
17 views

search api solr : partial keyword number + letter not working

We have Solr version :drupal-4.3-solr-4.x Problem: we have an existing part of a node title: swf6p175 we can search for swf6p175 we can search for swf issue: we can NOT search for swf6: : only ...
0
votes
0answers
21 views

Update/Changed field not updating programatically in node

I'm creating a node programatically in D8 and passing the value for update field explicitly. When the node is created it sets the update value which is provided, but when the same node is updated the ...
-1
votes
1answer
44 views

Show node summary (teaser) as tooltip/ Alt/ Title text on hover over nodes titles on front page with Views

I have a custom front page view showing nodes titles only without teasers. I want to have the teaser of each node show when hovering over any title. Something like: <a href="{{ url }}" ...
1
vote
1answer
28 views

I'm unable to install the Symfony var-dumper component

I am having issues installing symfony/var-dumper package via composer the command I ran is composer require symfony/var-dumper The result I get is Your requirements could not be resolved to an ...
1
vote
0answers
25 views

What are best practices for backing up settings files?

I have a Drupal 8 multisite with a few different hosts for production, staging, and local dev. Certain important files like settings.php and .htaccess are excluded from git, making it complicated to ...
0
votes
1answer
33 views

Converting a page created with panel into PDF

I'm working on D7 Panels and I created few pages using panel. I have a use case to generate the pdf for the data existed in the panel rather than the whole page with header and footer. Are there any ...
0
votes
0answers
27 views

How can I check in Twig if an advanced theme setting option is unchecked?

I've a list of advanced theme option(checkbox) to not display, such as search bar. I did many research about custom advanced theme setting, but all the samples are {% if remove_searchbar %}{% endif %}....
0
votes
0answers
11 views

View with referenced nodes from field in the same paragraph possible?

I can not seem to figure out how to set up the correct contextual and relationship settings to accomplish the following: I have a node with a paragraph named slides. In the paragraph slides there is ...
0
votes
0answers
12 views

How can I reference more than one media entity in a custom migration

I have a custom migration script that uses 4+ sheets to migrate data into two different content types (that reference each other), along with referenced users, and most important to my question, ...
0
votes
2answers
30 views

How to make subprocess & migration_lookup plugins behave consistently with single and multiple items arrays

I have a JSON that can hold single or multi values arrays and I can't make subprocess + migration_lookup behave consistently. It correctly imports the nodes in all cases, but it adds the reference to ...
2
votes
1answer
138 views

formBuilder()->getForm() outputs everything except the <form> tag in a view?

When displaying my entity edit form with \Drupal::formBuilder()->getForm($form); (for a flagging attached to a node) in a View that is set to show Content with the Default display, I noticed the &...
0
votes
1answer
13 views

Content Type add/edit command throws an error

The error on the site doesn't allow me to add a new content type or edit an existing one. The error has remained through version updates of 8.8.1, 8.8.8 and 8.9.1. When I click to add or edit an ...
0
votes
0answers
20 views

Is there a way to pass custom data to a form template?

I have been tasked to customize a view, and I have been struggling with its exposed form, because I need to display some informations. Here is how it should look: These elements act as a checkbox, ...
0
votes
0answers
19 views

Using Azure file storage blob [closed]

I am getting the following error whlie trying to upload a video file through Azure module ( https://www.drupal.org/project/az_blob_fs ) with Drupal Webforms. The files are getting uploaded to the ...
0
votes
2answers
44 views

Displaying another entity's form on a node

I am trying to embed the edit form for a flag on my node (the full page view mode). After some struggle, I finally figured out how to get the flagging form. But once I have the form, how do I ...
1
vote
1answer
25 views

How can I show a date in Urdu?

I am working on printing dates in more than a language. With Drupal 7, I used the following code. <span class="arabic-date"> <?php $arrayurdudays = array('', '', '', '', '', '', ...
0
votes
0answers
10 views

Remove Selected button not working on files generated using file_save_data

I am using file_managed field having multiple set to true. I am saving the submitted files in database table in bytea format. buildform : $form['test_pdf_1'] = array( '#title' => t('...
0
votes
1answer
13 views

How do I set up an entityreference entity base field to show as a link to the target entity?

I have a base field on my entity type that's an entity reference, e.g.: $fields['type'] = BaseFieldDefinition::create('entity_reference') How do I set this up so it displays as a link to the ...
-2
votes
1answer
18 views

The admin toolbar is messing up the sticky position set with fundation

i am using the sticky component from foundation to render a sidebar element sticky. It does work when unconnected but when connected the toolbar cover the sticky element. How could i fix this ? ...
2
votes
1answer
15 views

How do I change store based on location?

I need to have different prices for same products based on country. I was advised to use Price list module and to have different store per each country and I did that. I.e. I have Swiss store and ...
0
votes
1answer
11 views

How to automatically generate anchor ids to CKEditor added headers

How can i automatically generate anchor ids to h2 and h3 added using ck editor ? I need it for making a table of content.
0
votes
1answer
13 views

Add extra custom permissions to Field Permissions

I'm using Field Permissions module to restrict access to each field. If you choose custom permission on /admin/structure/types/manage/CONTENT_TYPE/fields/FIELD_NAME, you'll see these permissions are ...
0
votes
0answers
17 views

Error on manual scoring for quizfileupload module

I'm using d7 with quiz module, and to enrich question type I installed quizfileupload, as described on quizfileupload features said that we can score manually for the answered question. But when I try ...
0
votes
0answers
20 views

Views page menu shows up on all languages

I am working on a old website built on Drupal 6 which has two languages. There is a views on which I created a page for each language, but their menus shows up on both languages. I tried different ...
0
votes
0answers
11 views

DependentDropdown + AjaxAddMore

I have a custom form in which I'm using both the DependentDropdown and AjaxAddMore form examples from the example module. I've simplified the code below to focus on the issue. The dropdowns function ...
1
vote
1answer
41 views

How do I load the current items in cart of the anonymous user?

I am working on a custom module for our payment system using Drupal 8 and Commerce 2. When a user removes and item for the cart or updates the quantity, I need to sync the two systems (our internal ...
0
votes
1answer
18 views

Why does include() call PublicStream::stream_set_option()?

I am including a PHP file that in stored in the public:// directory. (Yes, I know that's generally a bad thing, but there are reasons, and this is done on a local development server.) I get this ...
0
votes
0answers
16 views

Optimized images in custom theme

All of the image optimization modules are for images you upload through the admin portal as an Image content-type, but how would one optimize images that are in your images folder in your custom theme?...
0
votes
0answers
23 views

How do I use a preprocess function for a custom template?

The content of this page is taken from a template file called hello-world.html.twig In my module file I have created the following hello.module file function hello_theme() { return array( '...
0
votes
1answer
57 views

How does generateFromLink work?

How the generateFromLink method works ? And how to use it in the render array. What is the difference between this method and the other methods used to generate link ? $url = new Url('test_route_1'); ...
0
votes
2answers
29 views

Use url of media field in view twig

I need to output the url for field_slide_media in views-view-unformatted--carousel.html.twig. I can output the entity ID using: {{ view.field.field_slide_media.value(view.result[i]) }} I would like ...
-2
votes
0answers
16 views

Issue regarding File Upload size

I'm facing an issue related to file data upload. I have uploaded multiple files and they all saved successfully in the DB. But I have one file It contains 40,000 records when I have upload it I'm ...
0
votes
0answers
20 views

Upload External File to Drupal File System

Situation I would like to be able to upload files programmatically from an external source to the drupal file system. I was thinking of making a RESTful API that allows me to save external files into ...
0
votes
0answers
8 views

How to recalculate the price in d7 e-commerce depending on the number of attributes

I need to increase the cost of the product each time a user attribute is added. Attribute is a text field available to the user in the product. The number of fields added must be multiplied by the ...
0
votes
1answer
14 views

How to combine two filters in search api views?

I have a search index which is indexing both content and files. I have configured the search api views which displays the search results. On this view, I have a filter on type which displays the ...
-4
votes
1answer
28 views

Error Unable to copy files settings files from BLT into your repository

When I try to run blt sync I am getting the following error. blt:init:settings Hash salt already exists. [error] Unable to copy files settings files from BLT into your repository. For ...
-1
votes
0answers
53 views

How do I publish a web page?

I'm new with Drupal. I have a webpage that has to be published to a Drupal 8 site. This webpage consist of an index.html file with some subdirectories with javascript and css files. These files are ...
0
votes
1answer
28 views

Is there a way to enable the Gutenberg editor so I can use it with custom blocks?

I've installed the Gutenberg Editor module and have it working with various content types, however I'd like to also use it to create content for custom blocks (as in structure > block layout > ...
0
votes
0answers
10 views

Commerce 2 how to acces a users order items quantity

There is a similar question here but how can i access the amount of a product variation the current user has been ordered (in the last order)? Would it be similar to this? $product_variation = $...
1
vote
1answer
53 views

How can I programmatically reindex Commerce products to AWS Elastic Search?

I am using Drupal 8 Commerce module. I am using Elastic Search on AWS platform. From the Admin whenever product is saved, those changes are directly applied on Elastic Search server, but when I try ...
-1
votes
1answer
28 views

Class 'Mpdf\Mpdf' not found

I am trying to download content in pdf. I have done composer require mpdf/mpdf Then in my code I have used the following: use \Mpdf\Mpdf; $mpdf = new Mpdf(); $filename = 'file.pdf'; $mpdf->...
0
votes
1answer
13 views

Different custom view per taxonomy

I'm currently working on my first Drupal 8 project and while many things are now integrated in the core, others still stump me (for example restoring options to now bare bones CKEditor requires like 4 ...
1
vote
1answer
17 views

save views->execute result as a static variable

Does it make sense (performancewise) to store view->execute() as a static variable in order to avoid running same view multiple times? And then call view->render() wherewer I want to print the ...
0
votes
0answers
20 views

Bug in setError when using unlimited cardinality with custom FieldType

I have recently added the field_example (Color RGB) custom field type to my Drupal instance (Drupal version is 8.9.1), didn't make any changes to the example code, and found that when using unlimited ...

15 30 50 per page