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,461
questions
0
votes
0
answers
10
views
Use javascript code in a specific div of the webform page
I have a website that was set up using Webforms with page breaks. So on the same URL, there are multiple "pages" and div blocks on each page, with a progress bar on top so you know what &...
0
votes
1
answer
25
views
trigger('RefreshView') problems with pagination
Colleagues, can you please advise: there is a views with enabled ajax and pagination, there is a form on the page (also ajax, but not views), which makes changes to the displayed views values. To ...
0
votes
1
answer
51
views
Do I need to apply changes in default.settings.php to settings.php?
Recent updates to Drupal 7 have included changes in default.settings.php.
Do they need to be incorporated into settings.php manually, or does the code automatically look up in default.settings.php ...
0
votes
1
answer
51
views
How to upload .webp to Image field?
https://www.drupal.org/project/imagewebp lets you upload a regular jpg/png which converts it into webp, but how to upload already a file that is in webp?
Adding it as one of allowed extensions in the ...
0
votes
0
answers
20
views
Html5 tags and javascript stripped out form radio labels
On D7, I have the following simplified code
function mymodule_multistep_form($form, &$form_state, $vars) {
$mystatictext = get_my_static_text($vars);
$options ='<div class="...
0
votes
0
answers
6
views
Why might a panel pane print a block as class="panel-pane pane-block..." vs class="block block--views..."?
I apologize if the wording for this question title does little to explain my problem. I'm so deep into not understanding an issue I'm having trouble describing it.
To preface, I'm quite a noob with ...
0
votes
0
answers
16
views
Render OneAll social login block in a .php file?
I am using OneAll social login module for social registration and login. The module's login block works well on any page but not on a .php file. I am trying to render the block in a xyz.php file ...
-2
votes
1
answer
33
views
Advagg Bundler would NOT spit out same size CSS bundles
Trying to make sure Advagg bundler spits out two equal size CSS bundles as it makes a massive difference in initial server response time.
For some reason, Advagg will split files into 2 bundles (first ...
-1
votes
0
answers
28
views
Is Media Gallery 7.x-1.4 compatible with Media 7.x-2.30, and can I change to that version, and if so how? [closed]
I've got a Drupal 7 site with Media 7.x-2.30 and Media Gallery 7.x-2.x-dev. At the time this site was created, Media Gallery 7.x-2.x-dev was required for Media 2.x.
The site contains lots of galleries ...
0
votes
1
answer
47
views
Initial server response time for different cached pages [closed]
I have been trying to speed up a Drupal site and measuring speed through page speed insight. What really has puzzled me for last few weeks of experiments is that node pages score an average of 170-...
0
votes
0
answers
35
views
Keep page published or unpublish?
Such a simple question I'm sure, but I can't find anything anywhere on this. I ran lots of tests - if the page is deleted the redirect doesn't work, but whether I unnpublish or keep the page published ...
0
votes
1
answer
61
views
Alter all webform fields
If we want to alter webform item e.g. add a colon : to a label of a specific field, we use this:
$form['submitted']['my_form_component']['#title'] = $form['submitted']['my_form_component']['#title'] . ...
0
votes
1
answer
54
views
Why does this code to create a dependent dropdown not work?
I am trying to implement the dependent dropdown option in Drupal 7 from this URL http://w3shaman.com/article/creating-ajax-dropdown-drupal-7. When changing the first dropdown value, it is showing the ...
1
vote
0
answers
22
views
How can I find all the nodes that use a hierarchical vocabulary taxonomy term and reference a child term but not its parent term
I am using Drupal 7.
I have a content type "Public Resource" that uses a hierarchical vocabulary called "Resource Topics" that has up to 3 levels (parent->child->child of ...
0
votes
0
answers
18
views
Date filter not working with start date
I wish to filter view for node type 'event' by start date > today, or alternatively by >= YYYY, if relative date is not possible. Neither is working. The view SQL see below doesn't apply the ...
1
vote
2
answers
40
views
How can I prevent a page with PHP content getting flagged in Security Review "Dangerous tags in content" check?
I am using Drupal 7. I have a page that has a PHP body that I know does not have any dangerous tags. According to the README.txt file in Security Review I need to add this to the "...
-2
votes
1
answer
245
views
Serialization of 'Closure' is not allowed in serialize()
i am in the midst of fixing our website (which is built using Drupal version 7.67) that shows many errors after the PHP version is updated into PHP 8.0.
One of the errors that i am stuck now is this ...
0
votes
0
answers
28
views
Cookie value causing a "Uncaught Error: Call to undefined function menu_get_object() " error
There are plenty of posts regarding this Drupal error, but my situation is quite odd indeed. Here's the background:
I was asked to investigate an ajax error popping up on a form which does an account ...
0
votes
0
answers
25
views
After drush archive-restore of a backup tar in a new machine, how to configure apache2?
I have a up and running Drupal 7 site in a Centos 6 machine and Drush 6.2.0 is being used. I need to migrate it to Ubuntu 22.04. I used drush archive-dump to create a backup tar. Then I moved it ...
1
vote
1
answer
92
views
Migrating from D7 / MySQL 5.6 to D9 / MySQL 8
I've read the documentation of upgrading (migrating) from D7 to D9, but didn't see anything about how to handle
changing MySQL versions in the process.
My D7 instance is on MySQL 5.6, which is ...
0
votes
0
answers
27
views
What is the preferred workflow for setting up TFA for users?
I have a D7 site in which I've setup TFA using TOTP. If TFA is not required, the user can login with their user/pwd, visit the profile page, click the security tab, and setup TFA.
However, if TFA is ...
0
votes
2
answers
47
views
Saving block translation with large amount of text causes PDOException: Data too long for column 'translation'
I have a Drupal 7 project where I am using a Panel to patch together some Drupal blocks.
These blocks have to be translated and I just added some data to the current French translation and apparently ...
0
votes
1
answer
29
views
Redirect page after all nodes save
I am trying to write a custom module to save special nodes.
With my code after first node save, page redirect and other not affected.
I need after all nodes_save redirect to list.
$nidew = [12,34,55,...
1
vote
1
answer
27
views
uninstall module that depends on relation module, which is disabled
I am a maintainer of the crm_core module. The Drupal7 version depends on the relation module to provide relationships between contacts. The depend module can not be uninstalled while the relation ...
0
votes
1
answer
216
views
Call #ajax when a checkbox is checked or unchecked
I have a Drupal 7 form that I want to be a single checkbox. When the checkbox is checked, I want to call an ajax request that hits an API to update the value, same for when I uncheck it. However, this ...
0
votes
1
answer
79
views
Getting error "PHP files in the Drupal files directory can be executed." in Security Review v.7.x-1.3
I am on Drupal 7.92. When I run Security Review I get the error "PHP files in the Drupal files directory can be executed." in Security Review v.7.x-1.3. The sites/default/files directory is ...
0
votes
1
answer
49
views
Hook menu alter - Restrict access to edit block - wrong page is shown
I want to restrict the editing of a block to users whom have X or Y permissions.
I have tried access arguments and access callback.
function MYMODULE_menu_alter(&$items) {
$items['admin/...
0
votes
1
answer
28
views
Hide images for articles that are older than two weeks [closed]
I have a news website built on Drupal 7. I need to hide all images on this website's articles, when the articles are older than two weeks.
I believe a solution would a PHP line to add to the articles' ...
0
votes
0
answers
28
views
How to prevent numbering (_0, _1) of file uploads? [duplicate]
Is there a way in Drupal 7 to prevent numbering (_0, _1) of file uploads with the same name?
How to tell Drupal to replace the previous file?
Maybe there is already a ready-made module?
Or does anyone ...
1
vote
0
answers
24
views
Which hook is invoked after an endpoint creates a node?
I am using Services 7.3x with Drupal 7. I have setup an endpoint that creates nodes. After a node is created by the endpoint, I would like to retrieve some data from the new node and update a third-...
0
votes
1
answer
31
views
How do I manage select options on a multi page webform?
With a multi-page webform.
Page 1: choose country
Page 2: choose industry
Page 3: choose from a list of people that support the country and industry.
#validate handler added
$form['#validate'][] = '...
0
votes
0
answers
53
views
How to delete a node without deleting it's relation
I have the following script that I run in /devel/php panel to delete the list of nodes in the array. I want to delete the nodes but I do not want to delete it's relation. When I run this script from /...
0
votes
0
answers
17
views
Ajax issue in tab when embedding a view
trying to add two views in panel in drupal 7 in one views it is working fine ajax like comment on ajax and all works good , but while switching on different tab ajax is not working fine.
in recently-...
0
votes
1
answer
39
views
Can't add Google Webmaster metatag because "Site Verification" category is missing
I'm using Drupal 7 (I can't update) and I'm trying to add Google Webmaster verification meta tag using the following instruction: https://www.drupal.org/docs/7/modules/metatag/howto-verify-a-site-on-...
0
votes
0
answers
19
views
Why is Backup and Migrate version correct (7.91) and Core Update Status different (7.89)?
I am having a problem resolving this security error on multi-site configuration. One site doesn't get an error and the other sites do.
The current backup and migrate application shows the correct ...
0
votes
0
answers
26
views
All pagers stopped working
I have a Drupal 7 site built in 2014 with numerous pagers built in. Most of the pagers are in custom modules and are rendered using the following code.
$pager = theme('pager', array('quantity' => ...
0
votes
2
answers
39
views
How do I find out which system.info my site is using?
I have 3 sites using the same host. I have updated them from 7.89 to 7.91 however only one site shows as using 7.91. I have hunted my host files for a system.info with 7.89 without any luck.
Where do ...
0
votes
0
answers
45
views
Help to avoid using PHP filter in an entity reference view
My site is about chemistry labs which uses many studios like a blood test.
Some studio fields are Gender (male, female, both) and Age (2 fields, min and max values, could be days, months, years). ...
0
votes
1
answer
51
views
User login doesn't work after server migration
We had a Drupal 7 site running on PHP 5.6. We have moved this site to another server running on PHP 7.4.
When I navigate to /user/login, type my username and password, and click on Submit, I'm ...
0
votes
1
answer
25
views
How can I reference imported content types?
I have imported two content types. One is for a vendor list and the other is for a contact list. The vendor list was imported with a vendor id column. The contact list was also imported with a vendor ...
0
votes
0
answers
31
views
How to have schema image on views page
I am struggling to find a way to have an image object appear in the schema markup for a views page. Ideally I would set this through the MetaTag module but am open to doing it programatically.
The ...
0
votes
0
answers
25
views
Template output singe fields from entity reference fields from other content type
I have "Carousel" content that calls another "news" content type. I created the view that shows the teaser of the single news. I would like to create an html inside the .tpl "...
0
votes
0
answers
51
views
How do I enable image styles after I update?
Since Drupal 7.91 update only images displayed directly through the Drupal interface (e.g. "thumbnail" displayed in the Drupal node edit form) work. Requests to any other image style (s/d/...
0
votes
0
answers
21
views
Tracking time on custom form module
I have developed a module that presents a custom form in a page.
I want to count the time from the moment the user is on the content url.
There is a pause button that takes the user back to the start ...
0
votes
1
answer
40
views
Rule triggers twice
Simple rule to send account email after updating a commerce license.
Export
{ "rules_membership_activation_email_notification_v2" : {
"LABEL" : "Membership activation ...
0
votes
0
answers
16
views
Limit nodes created by feeds by user
Note: Running Drupal 7.
We are using the Feeds module to imports feeds for one content type from external CSV files that users FTP up.
It works great but we need to limit the number of nodes that can ...
0
votes
1
answer
144
views
How should I remove nodes from database for which the content type was deleted on Drupal 7.58?
On Drupal 7.58, I deleted a content type for which thousands of nodes existed. On this version of Drupal, deleting the content type is allowed even if nodes still exist (see Does deleting a content ...
1
vote
1
answer
90
views
Does deleting a content type also delete all nodes of that type?
I know I can delete all nodes of a content type, keeping the content type, through bulk operations or such. If I'm not interested in keeping the content type, can I just delete the content type itself ...
0
votes
1
answer
48
views
Webform 4 passing in email token into the redirect url confirmation page
This is for Drupal 7 and webform 4. I'm trying to pass in an email token value submitted from the previous webform page into the confirmation url. But it shows up blank. And the token browser dialog ...
0
votes
0
answers
18
views
Proper approach for adding multiple author on a node with customized permission
I want to add multiple contributors to a node. Contributors won't have exactly the same permission as the content author. Such as,
Contributors won't be able to delete the content, add/remove
another ...