Questions tagged [7]

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

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

How do I theme the “The website encountered an unexpected error” page?

How do I set the theme to use for the error page showing an unhandled exception like the one shown in this screenshot?
0
votes
0answers
34 views

How do you cache a menu when loading it programmatically?

I am having the below code to load the main menu tree. $tree = menu_tree_all_data('main-menu'); $parentMenu = array(); $index = 0; foreach($tree as $key => $value) { if (!empty($value['...
1
vote
2answers
28 views

What rule to use to redirect users, unless already redirected?

I'd like users with certain roles to be redirected to the page /civicrm when they login, unless they've already been redirected elsewhere. For example, an email might have a link that directs them to ...
0
votes
1answer
38 views

How do you add help text to a form item?

I would like to change the help text for an input field. My form ID is views-exposed-form-events-page-1. I have a text field that I want the helpful hint to appear below. The field ID is edit-field-...
0
votes
1answer
31 views

Sort the products by SKU when seeing order details

I have an Ubercart commerce website in Drupal 7. I'm trying to sort the products listed inside a given completed order by the SKU value. This is the link: /admin/store/orders/1 or /admin/store/...
-1
votes
1answer
43 views

How do I programmatically add a “Load More” button?

I am trying to add the "Load More" button in the block view programmatically. Initially, I am loading the 9 contents but when clicking on the button next 9 contents should load from view. How can I ...
1
vote
2answers
48 views

PostgreSQL unbuffered query

I am producing large query results that can exceed a sizable PHP memory limit (128 Mb). I've been trying to address this and came across unbuffered queries. Unfortunately, these only seem to be ...
1
vote
1answer
31 views

Content tab takes a very long time to load

I have about 350 000 records in node table and about 600 000 in node_access and domain_access tables. When I try to open content tab it takes about a minute to load. As I found out with Devel module ...
0
votes
0answers
36 views

how to check if content type is

I ve got 2 type of commerce product.1 is the product the other is another type of product commerce. I want to check if the product type is then you can do something if not do another thing. Notes: ...
0
votes
0answers
12 views

How can I use Tokens [uc_Coupon] with Search API with a custom coupon Server/Index?

I was wanting to create a custom block where an end user can search with a Search Input for an UberCart Store Discount Coupon via the Search API and after some 4 hours research, I'm stumped as to ...
0
votes
1answer
23 views

How to create a view that shows a Managing User all content of their members?

I want to create a View that lists all content of authors who have the same value (text) as the viewing user. Actually they are members and the viewing user is the manager of the members. I have 2 ...
0
votes
0answers
22 views

Export data in csv via REST

I have data which is managed by a custom module. My goal is to provide a REST endpoint where users can get the data in csv format. The user have to authenticate themselves in order to get the data. ...
0
votes
0answers
11 views

Show data entered by webform module

I am new to drupal and just started learning it. My system support drupal 7. I already have a website in which webform module is being used. I want to show the data submitted through the form on the ...
1
vote
1answer
18 views

Warning message and URLs not found on menu items

My question is in relation to a Mamp issue Im having. Installed Mamp on my MacBook, loaded the database off my live Drupal 7 site, downloaded and copied the Drupal files on the live site to Mamp ...
0
votes
0answers
21 views

Adding custom module field to views

I am currently fixing a client’s website built on Drupal 7. I created a mini custom module to add one feature. It adds a field to ‘drupal_node’. I was wondering how I could make that field available/...
0
votes
1answer
11 views

Add payment to a commerce order using Rules

I am trying to create a component that can add payments to an existing order.(the payment is received offline). However, when I try to add an amount I receive the alert that the field is not writable (...
1
vote
3answers
88 views

How to automatically change a Content type field value based on Date field?

I'm using Drupal 7, I have a content type, where I have two fields for project allocation: Status(Active/Inactive) End Date If the "End date" is less than current date, then the "status field" ...
1
vote
1answer
13 views

Token Content Access blocks access for author too

I use the Token Content Access module to hide member created nodes from public view and allow them to share private links with private links (URL tokens). My problem is when a user restricts access ...
0
votes
0answers
29 views

How to render related nodes by vocabulary X on vocabulary Y terms?

I did many research about related nodes by term. These solutions are good with related nodes by term on node pages but does not work on term pages. Solutions I found: Add "Content: Has taxonomy term ...
0
votes
0answers
32 views

redirection in htaccess file

I'm working on Drupal7. I want to redirect all the URl's to external domain except some. Below rewrite I have added in .htaccess file and its working fine. RewriteCond %{REQUEST_URI} !/user.*$ ...
-1
votes
1answer
137 views

In views use the value of a field in next row, in current row

I would like to use the value of a field in row 2 of a views table output, in row 1 so that I can do some basic math on it. This is what I would like to do: Title | Field_x | Field_y+Field_y(2) | ...
0
votes
1answer
25 views

How to display a table with results when a batch is finished

I could setup a nice batch, everything is working well. But when the batch is finished, I would like to display a beautiful table with the computed results. I could do it with the drupal_set_message ...
0
votes
1answer
27 views

Need multiple url paths for single node without redirecting

I have the requirement on our Drupal 7 site where if we have a single node we need to be able to have multiple url paths to reach that node. For instance lets say we have a node with id 1234 ...
0
votes
0answers
19 views

user_login_submit doesn't work when called in an inner function

We have a shared register function that multiple pieces of our app use. When registration is successful, we log the user in. But for some reason, when a user completes this project via browser in the ...
0
votes
1answer
20 views

Entering views result to field through rules

When I create a new OG, I would like the user with the least number of OG subscriptions automatically to be added to this group. So I created a views block where I count and least the user with the ...
1
vote
1answer
27 views

How to prevent a user from deleting an entity referenced node before deleting the referencing (child) node first?

I have a Content Type called ItemRequest, and another Content Type called ItemOrder. One of the fields in ItemOrder is "Related Item Request" that is an Entity Reference to ItemRequest. Each ItemOrder ...
0
votes
1answer
22 views

db_select with groupBy(CAST(column as DATE))

I am looking to achieve GROUP BY CAST(date_time AS DATE) in a db_select function in Drupal 7 but with no idea how. The function up until now is: foreach ($distinct_users as $user){ $day_record =...
0
votes
1answer
31 views

Last modified date in menu link

I have a book with some child pages and I'd like to show the last modified date of each corresponding node near them in their menu tree links, or a red badge near the nodes updated during eg. the last ...
0
votes
0answers
16 views

How do I retrieve the individual elements that make up an entity?

I have some entities (called media_item) that each consist of a collection of images (small, medium, large). I would like to pro grammatically select the large image path from one of these entities ...
0
votes
0answers
64 views

How can I read uploaded CSV file data and create nodes from it?

I have created custom module. but don't know how to read uploaded file data and add into perticular content type. HTML File upload is displayed but after upload file unable to read content. function ...
0
votes
0answers
64 views

Strange AJAX HTTP error, 302 redirect error after update and migration

I have a Drupal 7 site (ver 7.67) running on CloudWays, PHP 7.1, MySQL 5.5. I get the AJAX error "An AJAX HTTP error occurred. HTTP Result Code: 302" The debugging information is limited: "Path: /...
0
votes
0answers
17 views

How to catch exception if the destination mail id does not exist while sending mail through webform?

I'm sending mails on submission of a webform. The destination mail address is fetched from a custom email field in the form. On submitting, when the user enters a mail address, a custom mail would be ...
0
votes
1answer
54 views

Ckeditor Wordcount plugin - How to target specific textareas

I'm using the CKEditor - WYSIWYG HTML editor Drupal 7 module and wordcount plugin. I've added the wordcount plugin file in the ckeditor plugins directory and got it working, however my config max word ...
1
vote
0answers
81 views

Why would redirected files create 404's at website's root? [closed]

When my Drupal 7 site was built (not by me), there was a schematic file field created within our "Tool" nodes to upload tool schematics PDF files with the file directory set to sites/default/files/...
0
votes
1answer
36 views

impossible to save source code in wysiwyg blocks if <a> does not contains some strings

It is impossible to use an icon as anchor in wysiwyg blocks. <a href="https://myfburl"><i class="fab fa-facebook-f "></i></a> The content is lost when editing back a block ...
0
votes
0answers
31 views

Drupal 7 WYSIWYG module with CKeditor library stripping form and input HTML tags when inserted into a block

I'm wanting to add some code snippets from MailChimp. We are using the WYSIWYG module (7.x-2.5) with the CKeditor library version (4.9.2.9). When I add the code to a block it is stripping out when ...
0
votes
0answers
12 views

Set block content from panels / page manager?

I am configuring a panels page manager page which also should have a specific sidebar block (search filters related to the page content). I want to use the regular page.tpl.php where the sidebar is a ...
1
vote
0answers
27 views

Where do you set node revision permissions?

I’m using Drupal 7. I created a Content Type called ItemRequests. One of the fields is a Body field. As my authenticated users keep editing this Body field at different times, I want them to be able ...
2
votes
2answers
64 views

Automatically creating an organic group for each new user

I would like to automatically create an organic group for each newly registered user. I checked all its settings, no such option with organic groups module, then I checked the rules module but no luck ...
0
votes
1answer
28 views

Navigate to page with content displays page not found error

I have a URL (/url1) that I navigate to that is showing content because of the Context module. The Context module has a condition that when the user navigates to /url1, some view blocks are rendered ...
1
vote
0answers
68 views

How do I reliably expose aggregated CSS/JS to a third party app?

(TL;DR at the bottom) For the purposes of "theming" some other internal apps based on ASP etc., I need to make a D7 site's CSS/JS available at a permanent, reliable URL; one which will also self-...
0
votes
1answer
30 views

Difference in form when first loaded and submitted

When debugging commerce checkout panes, which are basically forms I see that form is loaded on page load(obviously). It is again loaded when I click submit and debugger goes through same lines of form,...
1
vote
2answers
248 views

How can I make the coupon code field in commerce mandatory?

Using D7 commerce coupon/discount modules. I need to make the coupon field mandatory. Every order needs a coupon code entered. There is no standard "required" checkbox on the field and I tried using ...
0
votes
1answer
20 views

Override a file from the parent theme

Adding in the child theme a CSS file with the same name as the parent theme CSS file overrides the parent file. It doesn't seem to work JavaScript files. How can I override a JavaScript file loaded ...
0
votes
0answers
45 views

Remove duplicate records from view result with pager

My project is setup in Drupal 7 and i am using search API for display my custom search result. Actually i want to show search result based on two content types content so i have configure the search ...
0
votes
1answer
20 views

How to create programmatically multiple URL alias of same taxonomy term?

I have category cars and I want to create its URL alias according to the region like if the user location is Australia than URL will mysite/australia/cars similar if the user location is USA than URL ...
0
votes
1answer
16 views

Alter Add to Cart form POST data provided by #action

I am going to be phasing out Drupal Commerce on our website in favor of a new custom built application that is hosted at another URL. Without completely rebuilding everything I am trying to override ...
0
votes
0answers
32 views

Related nodes view block based only on child Taxonomy Terms

I have a 2-levels Taxonomy Hierarchy structured like this: Parent Term - Child Term 1 - Child Term 2 - ... My goal is to create a view block, where related nodes based only on child ...
1
vote
0answers
30 views

Help me write a Rule condition and action to remove discount line item and to add payment

I am trying to write a rule for an existing order. Order has a zero total due to (Commerce) discount, e.g.: Widget $3.00 Discount -$3.00 For the condition, I'd like to check if a specific discount is ...
1
vote
2answers
43 views

Override a function in a contrib module

My company received a maintenance contract for a website developed in Drupal 7. The Drupal 7 website uses the Quiz contrib module, ver. 7.x-4.0-rc10. The module is used to implement a feature where ...