All Questions

0
votes
0answers
7 views

Today is in list of dates

Trying to check if variable 'today' is in a list of dates in Views Conditional Field. Both values print out nicely. Today (var php): 24/06/2019 List of dates (var field_dates): 24/06/2019, 25/06/...
0
votes
0answers
5 views

Email misses fields from form

This is regarding a Drupal 8 site, specifically Drupal 8.7.1 and the "Contact" module (with Contact Emails, Contact Storage enabled). The issue that I'm running into is some of the fields are not ...
0
votes
0answers
6 views

hook_form_alter() on a view exposed filter form

I am trying to add a disable attribute in a field using the hook_form_id_alter function. I created a module and built the function function disableIncentiveform_form_views_exposed_form_alter(&$...
0
votes
0answers
13 views

Attempting to load content into dialog (modal) via URL

I have a page that contains both static and dynamic content. On the static portion, I've attached a link that looks like this: <p> <a id="trigger" class="use-ajax" data-dialog-options="{&...
4
votes
2answers
2k views

How to attach a library to a specific content type?

I wonder how to attach a library to a specific content type. .e.g News. I found the following code from a post and applied the "hook" to the "node" but no idea how to filter by content type. Any idea? ...
0
votes
1answer
437 views

math operators for text fields in views filters

I have a field of type text that contains a number like 10. I want to create a search form with views exposed filters. Since the field is a text, I can't use greater than and less than operators on ...
0
votes
2answers
451 views

only allow to upload profile pictures of a certain size

I want to limit the user to only upload profile pictures of 160x160 size. What is the simplest way to validate that the resolution of uploaded avatar picture is actually 160x160, and provide an error ...
0
votes
1answer
140 views

Upgraded Contrib modules & Drupal to 7.14 now SSL doesn't turn green

I'm using the latest D7 & securepages. When I took over this website from the previous developer, they had the problem that when they would update "anything" (according to them) it would break the ...
11
votes
4answers
7k views

Increase memory limit doesn't help in Fatal error: Allowed memory size of …/modules/views/views.module on line 416

I've switched from Drupal 7.14 to 7.15 three weeks ago and therefore, I'm encountering a series of very sophisticated (for me) memory limit errors. Those errors occur any time I'm trying to clear ...
1
vote
0answers
25 views

Create a content type after checking out a product [duplicate]

I am using Ubercart and I want to create a certain content type after a user checks out a different content type. I'm having the same problem with How to programmatically create a node when a payment ...
0
votes
0answers
4 views

How to add a file element in webform matrix component

Iam using webform matrix component module of drupal 7. but it doesnot provide support for webform file element. I have no knowledge about code. I need to know how I can use a file element with webform ...
0
votes
1answer
457 views

Commerce Licence billing

My question is regarding the recurring payment for drupal commerce. I use Commerce Licence with 'Licence role' and Commerce Licence Billing to make my users pay for a monthly subscription. The ...
1
vote
1answer
455 views

How to make blob file downloadable?

I have created a Module to make blob file available for Download in Drupal 7 . Below my code for .module file <?php function blobfile_block_info() { $blocks = array(); $blocks['...
0
votes
1answer
457 views

How to send email to submitter in a webform?

I have a webform and i want to send by mail this webform to submitter. For the moment, i created an hidden field with token [current-user:mail] and i chose this field in adress. I think it isn't very ...
1
vote
4answers
2k views

SMTP Module not sending email

Using XAMPP on Mac I have installed https://www.drupal.org/project/smtp After setting up admin/config/system/smtp It gives above error. Unable to send test email. Do we have to any setting on ...
0
votes
1answer
513 views

Why is hook_form_alter() not setting default values in _after_build function on /node/add/myct in D6?

I've got a validation form (id="mymodule-myct-verify-form") that retrieves data from temp_node to populate it's hidden fields. On submit, the form sends its data to /node/add/myct. (currently via $...
0
votes
1answer
13 views

Vanilla Javascript Firing Twice

I have some simple dom manipulation I want to make using javascript without jquery. I can't seem to figure out how to prevent this code from firing twice. Almost all examples I find use jQuery, but I ...
0
votes
0answers
8 views

How do I make webform submissions available to Rules and loop

I have a webform application: five (5) questions/statements (Select Yes/No) for anonymous user usage. First result: all five (5) questions are answered "Yes" - the webform gets submitted, emails get ...
3
votes
1answer
430 views

Vertical Tabs in Panel Pages

I am trying to have three forms available to the public on my site and would love to have them configured in in the vertical tabs layout. Initially I was going to have them available through node/add/...
0
votes
1answer
433 views

How to rewrite the value of an array element in page.tpl.php

I'm totally new to PHP programming and modifying the values of Drupal output with php customisations, so sorry if this question seems dumb. In Drupal 6 I need to rewrite the value of the array ...
0
votes
1answer
31 views

Can drush 9 be used without composer?

I have a Drupal 7 site that was not built with composer. I have been using Drush 7 with it, but about a week ago, wd-show --tail stopped working, I'm not getting any output. I installed Drush 9, but ...
4
votes
1answer
634 views

What may be causing “fails the check integrity”?

I need some help with the Rules fails the check integrity issue. I am running the Rules version 7.x-2.7. It works most of the times and appears to be suddenly. When I checked on the dblog it has ...
0
votes
1answer
6 views

View to display content type and media type

Say I have 1 content type and 2 media types users can create Content type: Post Media Type: Picture Media type: Movie How can I create a view that pulls all 3? As far as I can see you can only create ...
0
votes
1answer
430 views

How to remove default div of views block?

My html code: <div class="workList col-lg-4"> <div class="view-back"> <a href="" target="_blank">&rarr;</a> </div> <img class="img-responsive" src="<?...
0
votes
1answer
10 views

How do I programmatically close webform by node date field?

Background: I'm adding an events (custom content type) & registrations feature to an existing drupal 8 website. My experience in drupal is pretty minimal. But I can find my ways around code. ...
0
votes
1answer
19 views

After save empty cache of referenced node

I have two content types. For clearer question I will work with the content types event and location. From my location content type I can reference to and event. Then on the event page I show the ...
0
votes
2answers
227 views

Vertical alignment of table content in a view

I have a table view with two columns, one of which contains an image which is quite high. The text in the second column is relatively brief but is displaying in the vertical centre of its cell (where ...
0
votes
1answer
21 views

How do I allow custom .php files to be accessable?

I have already looked at the How do I call legacy PHP files? answers and they didn't fix my problem. I have a custom php file in my Drupal site (Hosted on Acquia Cloud and I am working on a local ...
0
votes
1answer
15 views

How to make a Drupal lock forget?

I understand how locks work, thanks to this post. Very straightforward: function mymodule_long_operation() { if (lock_acquire('mymodule_long_operation')) { // Do the long operation here. //...
2
votes
1answer
2k views

How to use composer for installation profile?

I have a Drupal 8 installation profile with custom modules and themes and I am wondering how should I use composer so that I can run it and drupal core and other dependencies(like contrib modules) ...
0
votes
0answers
9 views

Creating a Product Display Catalog via taxonomy Drupal 8

I need to create a catalog system for a product range from taxonomy in Drupal 8 My taxonomy is structured like this : - Product Category 1 -- Sub Cat 1 -- Product 1 -- Product 2 ...
0
votes
2answers
33 views

How to prevent programmatically created blocks from caching

I've been working with Drupal 7 for a couple of years but am new to Drupal 8, and am just getting into building custom modules. What I have built is a module that alters Drupal Commerce in order to ...
0
votes
0answers
14 views

ReflectionException: Class \MenuBlockKernelViewSubscriber does not exist

Doing a simple staging to production migration, copied all files, and the database,. Imported the database successfully but now when visiting homepage of the site I get the below error message/...
2
votes
1answer
417 views

Create form for image selection from the content

I have a content type with title and image field in it. Now, I want to show a form to the user which will show the image thumbnail, title and a checkbox below each image with the value of respective ...
3
votes
1answer
951 views

Specify a node type (bundle) in entity reference field

I have a custom entity type which has an entity reference field. $fields['referenced_article'] = BaseFieldDefinition::create('entity_reference') ->setLabel(t('Article')) ->setDescription(...
0
votes
0answers
20 views

How to identify vulnerabilities?

I work for Global Pepsico IT and we are trying to add CMS vulnerability detection to our arsenal of vulnerability testing. So far, we haven't been able to find a way to do this detection for drupal ...
0
votes
2answers
727 views

Add bootstrap row class on every n views rows

I am using Drupal Bootstrap and to get the correct positioning I am using bootstrap rows and columns classes. How do I render a bootstrap row class on every let's say 3 view rows (bootstrap columns)? ...
1
vote
2answers
2k views

How to create a rule to send an email when someone creates content of selected type(s)?

I'm trying to create a rule (using the Rules module 8.x-3.x-dev) to send an email when someone creates content that is of the type Announcement or Article, but I can't seem to get the event to trigger ...
1
vote
2answers
301 views

Notify node author of new comments

Has anyone been able to figure out how to notify the node author when new comments are posted on their content? I understand Rules for Drupal 8 is still in its infancy. When I used various tokes ...
0
votes
1answer
456 views

Views : Output the field as link - not showing the field properties properly

I want to output an image field as a link in views. I've seen many tutorials but get stuck at one point. I already added the link on top of the image field. By clicking on the image at rewrite ...
1
vote
2answers
507 views

Cloning entities

i have 3 different entities build with help of EntityApi module. They connected with each other with ID column in tables. Entity - "Purchase" Entity - "Catalog" has 'purchase_id' column in table ...
0
votes
2answers
499 views

How to disable CACHE in VIEW PAGE display

DRUPAL 8 I am using VIEW module to create a page which loads data from a database table. Seems this view page is caching because whenever I add a new record in this table via custom input form, it ...
0
votes
0answers
7 views

Add a FULLTEXT index on specific column

I'm currently implementing a custom search engine in my custom module. In order to optimize my module, I would like to perform SQL queries by using the syntax MATCH....AGAINST in Entity queries. By ...
-2
votes
1answer
21 views

Getting translated version of Menu

I'm trying to get translated variant of Manu, but I can't make it work. This is code of what I'm trying to do, but this is for content node. $entitytype_manager = \Drupal::service('entity_type....
4
votes
4answers
1k views

Regenerate image styles

I'm currently using Drupal 8.2.3 for my website design. My aim is to use it for publishing my blogs to social media sites, such as Facebook, Twitter, LinkedIN, etc. With that in mind, i'm using image ...
1
vote
2answers
434 views

Views : Use a custom template field even if it's excluded from display

In a Views, I have two field : Link field : With 1 to n links to display (excluded from display) Body field : Who use the previous link field (via rewrite output and token) I have created a custom ...
0
votes
0answers
27 views

Get image style URI in JavaScript [on hold]

I am creating some custom Gutenberg blocks and that includes upload and selection of images from the file and media system. It would be best if I could load the correct image style in these blocks. ...
0
votes
1answer
480 views

Create an SVG using data from Views

I am looking for a way to create a dynamically-generated SVG graphic based on data returned in a view from the Views module. Since Views creates lists and SVG is ultimately XML and therefore DOM-based,...
-3
votes
0answers
17 views

How to have all options of some menu on the same line?

In the mayo theme I use for my site, I have a footer menu. By default, the options of this menu are displayed vertically: I'd like to have the options displayed horizontally. How can I do that?
2
votes
2answers
434 views

How do I send notifications for followers of a group when group content is updated?

I want to build such functionality that allow the user to follow the other users, and when the followed person is updating the information, the follower can get notified for what they are doing. I ...

15 30 50 per page