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.
26,482
questions
1
vote
1
answer
127
views
Changing the PHP memory limit in settings.php is not reflected in phpinfo()
Of the various methods to increase the PHP memory limit, the only one I can use for a certain site is ini_set('memory_limit', 'XXXM'); in settings.php.
This value does not appear to change the ...
1
vote
0
answers
71
views
Trying to get to the bottom of an out of memory error related to the database
I've inherited a highly problematic site built in Drupal 7. Upon installing the site on my dev space I get a 'This page isn’t working' error 500. Looking at the web logs I get this message:
lmu.[...
0
votes
0
answers
68
views
AJAX callback not fired in hook_form_alter()
In Drupal 7, customer wants to add a button to the user_profile_form. So in my custom module, I create the button and its companion callback. But while the button appears on the form, I see no ...
0
votes
0
answers
14
views
Filter a view on whether the page has a menu link
I'd like to make a view listing all pages that do not have "Provide a Menu Link" checked so that I can review them for pages that would appropriately have a menu link to a parent page.
I can'...
0
votes
1
answer
29
views
computed field inside field collection
I have two fields (field_a and field_b) which are inside the field_available_water_s field collection. I want to set the field_c computed field, which is also inside the field collection, to the sum ...
0
votes
1
answer
207
views
'Aggregate and compress CSS files' and 'Aggregate JavaScript files' don't work
Recently selecting Aggregate and compress CSS files or Aggregate JavaScript files in the Performance page stopped working on a Drupal 7 site: When they are selected, the CSS/JavaScript file won't load....
0
votes
0
answers
82
views
Drupal Views filter on a Date field does not work as expected
I have a Drupal7 view which includes a field of Date type (let's say "activity date") via a relationship.
I want to filter this field by "today" (show only activities with activity ...
0
votes
1
answer
37
views
Modify cart view to allow direct quantity updates
In want to modify the cart view so that when costumer change quantity of item in cart, it will update cart and total price automatically and immediately through AJAX (instead of when pressing button ...
0
votes
0
answers
91
views
Clear specific view's cache programmatically, specific to contextual filter
I am using the following to clear view specific cache on node_presave which is working fine.
cache_clear_all($view_name.':'.$display_name, 'cache_views_data', TRUE);
Currently, it is deleting all ...
0
votes
0
answers
43
views
Metatag cached, cannot change it
I'm running a D7 with the Metatag module 7.x-1.28, no other Metatag modules are enabled.
On my front page node I:
a) changed the metatag description from the old text to a new description text.
b) in ...
0
votes
0
answers
64
views
Append info to original filename when uploading file in webform (filename token)
I'm sure I am missing something really obvious.
Drupal 7 + Webform + File (Field) paths.
I am uploading files (jpg, pdf, xls) in a webform and need to append the node NID to the original filename. But ...
0
votes
1
answer
120
views
How to fully reproduce dev environment with ddev?
I'm git cloneing a project that is run with ddev. After doing
git clone
ddev config
ddev start
and opening the hosted site, I get various errors, for instance:
Warning: include_once(/var/www/...
0
votes
2
answers
52
views
Change default user tab
After logging in, users would be redirected to their user profile page.
I have added a new tab, My dashboard using hook_menu(). Everything functions well.
After the users log in, I would like they are ...
1
vote
0
answers
99
views
Update.php gets "The page isn’t redirecting properly" error page
I recently moved our site to a new hosting company. After uploading all the files and importing the database I get this notice when I try to Run Updates and/or accessing the update.php page.
The ...
0
votes
2
answers
57
views
Files with 644 permissions and owner apache:apache are still failing Security Review module
I am using Drupal 7 and just installed Security Review. According to this page, the files should be 644. I tried that but I am still failing Security Review (I'm getting hundreds of files under the ...
0
votes
1
answer
105
views
SMTP module cannot connect to smtp.gmail.com [closed]
The SMTP module stopped working about a week ago. It is no longer able to connect to smtp.gmail.com. I have tried commonly recommended remedies:
Allow "Less secure apps" in Google settings....
-1
votes
1
answer
24
views
hook_menu() items disappeared and no longer work
I'm feel like I'm losing my mind here. I have written a custom module and implemented hook_menu to add custom admin pages. Last week this worked perfectly - this week they stopped working then ...
0
votes
0
answers
36
views
How to get the user info on who deleted an account?
In Drupal 7, a user was removed. As an administrator I reviewed the permission and role report from administration menu. But couldn't find the information. Is there any other way I can find the info ...
0
votes
0
answers
45
views
Add prefix on tables break my site
I have an old site on an old shared server which used an old shared PHP 5 we can not update. I create a copy of this website which will run on a different (and dedicated) server with PHP 5.6 and ...
-2
votes
1
answer
12
views
How can I loop on checkboxes to hide all using mlid: from the datatable?
function ts_core_form_menu_overview_form_alter (&$form, &$form_state, $form_id) {
$form['mlid:11242']['hidden']['#type'] = 'hidden';
$form['mlid:11246']['hidden']['#type'] = 'hidden';
$...
0
votes
0
answers
12
views
Search View location filter not working after change from Solr to DB server?
I have a search view that allows the user to filter a list of people by distance from a location the user can input. This uses the 'Location: latlong pair' as the filter.
Unfortunately we've had to ...
1
vote
1
answer
431
views
How can I overwrite existing file and keep same filename when uploading new
I have content type 'Document' and added the 'Upload document' field with type 'File'
I want to replace file and update the node. I'm using below code
function custom_file_upload_form_alter(&$form,...
0
votes
0
answers
19
views
How can I avoid that deleting fields from B deletes also fields in A?
I have two content types: A and B. B has a entity reference field to A. There are some fields in B which autofill from values in A.
When any of the fields which are used to autofill are removed from B,...
0
votes
0
answers
57
views
How can I increase the SMTP email file size?
I have a drupal 7 website with rules 7.x-2.13. There is a rule which sends html email with all the fields whenever a new node is created of a content type. There is a file field as well which allows ...
0
votes
1
answer
31
views
How can I access or expose the Commerce data in $order->data[] to the Rules module?
Following this old checkout_pane_example.module tutorial, I created a custom Drupal 7 Commerce checkout pane. It's simply a text field to collect special order instructions from the customer.
...
0
votes
1
answer
18
views
Where did my commerce token go after an update to 7.87
My Drupal 7 commerce setup sends out a couple of emails after an order is placed. It uses this token:
[commerce-order:commerce-customer-shipping:commerce_customer_address]
After updating to Drupal 7....
-1
votes
1
answer
75
views
How can I use a token in a mailto link?
I installed the Token and the Token filter modules.
I use a mailto link in the body of a block.
<a href="mailto:info@mydomain.com?subject=The subject I want&body=Can you send me my ...
2
votes
0
answers
50
views
Views performance: Teaser vs Fields
I have to create a view on a Drupal 7 site which will have 6/8 node fields. There will be some logic for which I will have to rewrite results as well as create a views-view-field-XX.tpl.php template ...
0
votes
1
answer
124
views
Changing a node alias to reuse his old url programmatically without be still redirected to the node page
I'm on a old site on drupal 7.
I have a node with alias /url. Now I need to manage that page url programmatically, so I create an item in a custom module using hook_menu() in this way:
/**
* ...
1
vote
1
answer
108
views
Use Node title as default value in alt field of field_image migration
I've been working on a D7 to D9 migrate project, and encountered an issue around field_image's alt value.
The D7 site does not have all the field_image alt tag setup, so we'd like to use the imported ...
0
votes
0
answers
36
views
Under construction page when I enable https
I enabled https:// in a Drupal 7 site, but I get the Under construction page every time I try to access it. When I try to log in, I get a 404 error.
Can anybody tell me what I am missing?
I’ve used ...
1
vote
0
answers
39
views
How can I programmatically configure commerce checkout pane settings?
In Commerce, we have custom pane and checkout configuration that applies to all orders. Per this d.o issue in commerce_features, this is supposedly doable. However, Commerce's default configuration ...
-3
votes
1
answer
106
views
How to track recently viewed nodes using JavaScript on a completely cached website?
I want to make a block of recently viewed nodes on a website which is completely cached using Boost module (it saves a static HTML page for every request on the website). I don't want to disable Boost ...
1
vote
0
answers
69
views
Problems in collations when restoring
I'm quite lost with this issue I'm experiencing, so any clue will be appreciated. Let's start with the "symptoms".
Whenever I restore a Drupal 7 site that has been previously backed up with ...
-1
votes
1
answer
36
views
Webform Table missing in Views
I have a webform created on our site we want to be able to show the user its submitted values and everything seems to be working but the table, I have downloaded webform views. Please help i'm not ...
0
votes
1
answer
54
views
Time spent with custom module
Can anyone help me with this, I want to activate time spent module on my custom form module, and store the time spent on a field on my form. I think that I could do it on the file timespent.module ...
1
vote
0
answers
30
views
Filter GeoJSON feed on a value in the path
I have GeoJSON feed, created with a view in Drupal 7, that I want to filter on a path value in the url of the loaded page (/path/%). The feed is loaded as an Openlayers map on a page. The feed seem to ...
0
votes
0
answers
45
views
Altering user_admin_account and user_register_form
I'm pretty new to Drupal and I'm trying to build a Drupal 7 custom module to alter the user listings table in admin/people. I would like to display the first and last names of the users.
I've already ...
1
vote
1
answer
121
views
Use async with drupal_http_request()
I need to make an asynchronous call with drupal_http_request(). Is it possible?
0
votes
1
answer
78
views
How to get rendered node according to active theme?
In a hook_entity_postsave() function in my custom D7 module, I'm doing the following when a node is saved:
$_ = node_view($entity, 'full');
$html = drupal_render($_);
But the renderd HTML ...
1
vote
1
answer
128
views
Output JSON string into PHPTemplate file
I want to output a JSON string as part of a data attribute on an HTML tag for a template in Drupal 7. For the life of me, I cannot figure out why it does not work (works perfectly in 8+).
I need to ...
0
votes
1
answer
49
views
How to increase image resolution in gallery?
Not sure if I am asking the correct question here as I am more of a PHP coder than a graphics designer. My client's site has a Views img gallery which displays 3 columns wide on desktop and 1 wide on ...
0
votes
0
answers
26
views
How do I know what properties and methods are available to an entity_metadata_wrapper object?
It may be easiest to start with an example.
The entity_metadata_wrapper() function seems to do a lot of complex magic behind the scenes in order to return an object with all data related to the entity ...
-1
votes
1
answer
61
views
Using Authentication API module
I'm trying to use the User Authentication API module. My goal is to add some post-processing after successful Drupal 7 login that posts JSON to an external web service. This would be work very similar ...
2
votes
2
answers
144
views
Translation of a multilingual site into English
Note: This question is only focused on strings inside source files (PHP files).
When you are creating a Drupal site in a non English country (let say France), you will create all your PHP files with ...
0
votes
1
answer
27
views
How is the theme folder to use decided?
Under /sites/all/themes there are two folders called atlas and atlas.backup. Drupal 7 is pointing to atlas.backup and I don't understand how Drupal knows which theme folder to use.
I want Drupal to ...
1
vote
0
answers
37
views
Create a user map with a results tables below it
I've been searching around for the past couple months, watched a lot of YouTube videos, and read a lot of tutorials, and I've made a lot of progress with an alumni directory our team is creating. But, ...
0
votes
1
answer
58
views
How do I print the display name?
I have a view with multiple pages. In the Views interface, I can set a display name for each display.
Is there anyway I can print this name in the view itself, for example adding a Global Text field ...
0
votes
0
answers
47
views
With Rules, how do I use variables with Calculate and Set a value actions?
Let's say I have an Entity with a custom integer field added. Let's call the field Global Total (field_global_total)
On some event, I want to
get the existing value of that field and store it in a ...
0
votes
2
answers
504
views
How to make the float field accept decimal values?
I am using Drupal 7 and have a float field. It is used to enter prices.
Most of prices I enter have decimals (e.g. 101.82, 99.88). Some of the prices are negative values (e.g. -55.52, -1009.88).
...