Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [7]

Version tags should be used only for questions that apply to a version only, not to merely say what version a site is using.

0
votes
0answers
45 views

Custom query using EntityFieldQuery

I need to add a validation and need to check if an event booking (start and end time) falls under already booked time (start and end time). So far, I have done as below, but it is not working as it ...
0
votes
0answers
6 views

How to consume Views GeoJSON in a custom JS map application?

I'm trying to implement a custom Google Maps implementation that uses data from Views GeoJSON feeds. I need a custom approach as I need to be able to add multiple data layers. So, I need to grab the ...
0
votes
0answers
18 views

How to stop Script Injection in field collection

I have created Field Collection with Text and image. Now if i insert java script like <script type="text/javascript" >alert("hacked")</script> How to skip this same i did for node ...
0
votes
1answer
24 views

module to test if e-mail is working

In D7 I'm trying to determine the best way to periodically check if e-mail is working. I'm looking for a way to create a workflow that, say, on cron would check the day of the month, if it's the day ...
-2
votes
1answer
26 views

Create dropdown list from values DB

I got some values from the database $result = db_select('node', 'n') ->condition('type', 'staff_members') ->fields('n', array('nid', 'title')) ->execute(); ...
0
votes
0answers
20 views

How do I show all paragraph items?

My project user profile has a paragraph with 3 columns (Lesson, Experience, Price) which shows a teacher's private lesson prices. I want to show all the teacher's lessons, but in a view I am only able ...
0
votes
0answers
16 views

Modify page headers

I have a view that lists new content of a specific content type. It displays the "new" or "updated" tags (Content: has new content). The problem I am having is that when following the links to view ...
1
vote
0answers
11 views

Is menu_set_active_trail the way to go if I need to change user/* page titles?

I've had the pleasure of spending a bit of time trying to change the page titles (the one you get via drupal_get_title()) of user, user/register and user/password. It appears that this is doable in a ...
0
votes
1answer
14 views

Within a View, How do i paginate the content found inside a single Multiple file field, i.e. inside one node

Hopefully someone can help. I am using a file field and allowing unlimited files within a single content type field called "Video", handled by Media Module. I have created a view per "gallery" of ...
0
votes
0answers
15 views

Where and how can I override markup for Quicktabs accordion displays?

We've run in to an issue where we need to override/revise the output that is created by the Quick Tabs module in order to make the display compliant with the standard from W3C. I'm sure we're not ...
0
votes
0answers
15 views

Load drop-down with taxonomy terms

I have a view of nodes. While editing a node, there is a term reference field Category. I want to bulk assign a category to selected nodes so I have added views bulk operation to the view with an ...
0
votes
1answer
24 views

Why does the title callback of /user produce the title for /user/register?

I'm a bit puzzled why the title callback of /user produces the title for /user/register and /user/password. When I set the title callback of /user, I see this affects the title of /user/register and /...
1
vote
1answer
39 views

How to add google maps js without breaking jquery?

So, I'm trying to implement a custom map using the Google Maps API in addition to a Google Map view. I'm working with an up-to-date D7 install. The reason for this is that I need to have multiple ...
0
votes
0answers
26 views

WSOD when selecting condition in Rules

In Drupal 7.63, I am trying to add a new rule, however I am being greeted with a WSOD. I am doing the following process... Create a new Rule Add condition Select any condition from the drop down ...
1
vote
1answer
22 views

Change checkboxes in a node edit form alter

I have a problem with an ajax function which doesn't work properly and I don't understand why. I done a similar thing long time ago in Drupal 7 and it seems I forget how it works. I have a node type ...
0
votes
1answer
29 views

PHP evaluation for “Send HTML email body”

I'm trying to compose the body of an email using PHP evaluation within a rule. The rule is triggered when a new content is saved. Part of the email body is composed using HEREDOC and that works fine....
0
votes
0answers
16 views

Configure emails for webform

I am looking at two sites both have webform 7.x-4.18 plus mimemail and and mailsystem. when configuring emails for webforms, one site shows 3 options in the E_MAIL HEADER DETAILS: subject, from ...
0
votes
1answer
33 views

backing out of a module update after uploading it and before the database update (new update is incompatible with my version of PHP)

I got a situation here and I don't know what to do. Drupal 7. There's an update for reCAPTCHA so I click the button and checkboxes and whatever to update it, it uploads the files to the server and ...
0
votes
0answers
19 views

Flagging a file as having been 'downloaded' - views link

I have a content type called 'uploads' that includes a file field (each of these nodes has just one download 'attached'.) I have a view that shows just the post date of these nodes, along with a link ...
1
vote
0answers
13 views

Left to right mark added to field name

Using Drupal's admin I added to an existing content type a new text field with the machine name field_note. When fetching the field in my code I want to check if $field_name == 'field_note' but it ...
0
votes
1answer
23 views

How do I make a panel visibility rule work when the element to check for has to be not set or empty?

I am using Drupal 7, panels and page manager modules. In page manager I created variants on the node template for showing a particular type of node in a different fashion to different user roles. My ...
0
votes
1answer
25 views

Commerce order mail is empty for anonymous users

In the function below, there is the problem of sending email to anonymous users, the email sending only for users logged and to complete checkout and payment. I get the following error message: ...
1
vote
1answer
19 views

How can I trigger custom code when some other module is being installed/uninstalled?

I am using a third-party module. Whenever it is installed or un-installed, I want to programmatically create/delete some menus. How can I detect that a module is installed or un-installed?
1
vote
1answer
21 views

Must at least one bundle have the same name as the entity in hook_entity_info()?

I'm working with hook_entity_info, and I'm defining an entity which will have multiple bundles. Do I need to define a bundle which has the same name as the entity, or will the base entity become ...
0
votes
0answers
14 views

Webform and Shopify webhook have different IP addresses

I have a website set up with the Shopify Modules where customers can place Shopify orders. When a customer adds an item to their cart, they fill out a webform on the website and then add the item to ...
-1
votes
2answers
35 views

Dynamic image style?

I need to display profile image, but less blurred each day for example: day 1 : blur 30 day 2 : blur 20 day 3 : blur 10 Image style seems not to be dynamic. And I didn't find a way to do this. ...
0
votes
0answers
61 views

How to fix “An AJAX HTTP request terminated abnormally” while image upload

Every time while I am trying to upload image by using 'manage_file' in form api and click on upload it throws an error: An AJAX HTTP request terminated unexpectedly Debug information follows. Path: /...
0
votes
0answers
37 views

Return last 4 digits of credit card from orders

Client is requesting the ability to see some card details when order payments fail (last 4, expiration date, etc.). We are running https://www.drupal.org/project/commerce_cardonfile which exposes ...
0
votes
0answers
24 views

How can I display a selected value of a multivalue entity reference field?

I have two content types A and B. There is a multi valued field Persons in content type B. I have created a node of type B and enter two values in Persons field, X and Y. Content type A has an ...
0
votes
1answer
17 views

Order relationship in RESTful

I'm using https://www.drupal.org/project/restful module. I can sort base entity using annotation: /** * Class Things__1_0 * @package Drupal\restful_thing\Plugin\resource\node\thing * * @Resource( ...
0
votes
0answers
20 views

Multi Event Webform Registration

I am trying to create a 3-day event registration using webform (Drupal 7) in which participants have the option to attend 1, 2, or all 3 days. If a participant selects only one, they are still getting ...
0
votes
0answers
18 views

Restrict ajax throbber to specific form id

Can we restrict below code to specific form ,currently its working on all form wherever ajax is calling. I am using ajax throbber module in drupal 7. <?php /** * @file * Drupal module file ...
0
votes
0answers
48 views

Get paragraph bundle (paragraphs_item) value for migration

I am migrating node from D7 to D8 but I need to get the paragraph body value and concatenate it with the value of the body. Here is a dump of the node: object(Drupal\migrate\Row)#1848 (8) { ["...
0
votes
1answer
11 views

Only the word “array” gets printed when I try to render custom block in template

I am building a custom block in a module, like this: <?php function filterblock_block_info() { // Sökfilter till temperaturöversikten. $blocks = array(); $blocks['filterblock-temperatur'] =...
0
votes
0answers
24 views

Content items not loading for search indexing

For some content types, I have included search index as display settings and for entity reference fields in that content type has been given 'Rendered Entity' as format and 'Rendered as Default' ...
0
votes
0answers
19 views

Form in ctools modal not submitting

I have a form (table with checkboxes) created using theme_tableselect. The form is appearing fine with checkboxes. I need to show confirmation popup/modal before processing the checked rows. I am ...
0
votes
0answers
14 views

How to provide an uncached version of a view for preview purpose

A drupal 7 commerce shop has product pages which are made by a taxonomy view displaying commerce products; each of these products themselves consist of a view, so on the bottom line it's a nested view....
0
votes
2answers
22 views

How to pass variable to a views template?

I have this in my template.php: function mytheme_preprocess_views_view(&$vars) { $vars['test'] = 'Filtertest'; } And this in my views-view-responsive-grid--taxonomy-term.tpl.php: <?php print ...
0
votes
1answer
38 views

I have 2 commerce feeds imports, one must run before the other

I have a drupal 7 commerce site, each day our client uploads a .csv with updates to approx. 4000 products, including published status. 2 imports have been configured, 1 to update the product ...
0
votes
1answer
27 views

Exporting a custom module from one instance to another [closed]

I am new to Drupal. Currently I am using Drupal 7.4. Hhow to export a custom module from one instance to another instance? Note: copy the module to the new site didn't work.
-1
votes
2answers
44 views

webform submission presave in a custom module [closed]

I'm quite noob at drupal, i have a custom module with the function below: function at_custom_webform_submission_presave($node, &$submission) { // my code here } i don't know why, but it's seems ...
0
votes
0answers
10 views

How to target specific alias or tid with views-view-responsive-grid template?

I have a template named views-view-responsive-grid--taxonomy-term--page.tpl.php in which I have added a custom block to the left of the responsive view grid with the help of my foundation grid, like ...
1
vote
1answer
21 views

Rule to check specific field of content every week

I have a content type called change_note, and within that I have a field called action, action_owner, a field called action_date, and one called action status. What I am trying to do, is get the site ...
0
votes
0answers
20 views

How do I fetch a vote given on a node and programmatically apply this vote to the author of the node?

I am using the voting api, fivestar and rules modules to try to fetch the vote a user gave to a node (article) and apply that same vote/value to a fivestar field of the author of that node. How can I ...
0
votes
1answer
32 views

PHP namespace error

I'm using libraries, not using composer, and it's on Drupal 7. I installed and enabled xautoload so that I can use classes from a library that has namespacing. I think I got the xautoload function of ...
0
votes
0answers
11 views

How do I automatically assign a node to a term?

I'm playing with taxonomy and rules. I need help, again! Scenario When an user role changes and becomes "writer", there is a rule that creates a new entity type "taxonomy term" name "user name" and ...
1
vote
0answers
102 views

Is anyone working with webp images? [closed]

I'm working on a Drupal 7 site with a prominent flexslider paragraph rotating images. The image files sizes appear to improve quite a bit if I convert them to .webp format. My problem is that I ...
0
votes
0answers
37 views

How to use DS layout on page generated with views?

I have a site where products are shown in different categories using taxonomies. I then use a view that emulates Drupal core's handling of taxonomy/term to generate those pages. Now, in only one of ...
0
votes
0answers
32 views

How to get nid as int (and not as string) [duplicate]

This code snippet: var_dump( db_query("select nid, title from node limit 1")->fetchAssoc() ); Prints this: array(2) { ["nid"]=> string(4) "6247" ["title"]=> string(5) "test!" } ...
0
votes
0answers
14 views

Drupal Commerce Price Conflicting with Discounts & Price Table

I'm trying to calculate the cost of an unsaved line item with a given product and quantity. I'm using Commerce Discounts as well as Commerce Price Table which changes the price of a product depending ...