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
2 answers
222 views

How to add custom option value to select field in Webform and have them save with the submission?

I have a Drupal 7 webform when I need to dynamically populate a select field's options. I'm currently using hook_form_alter() and setting the values on the like so: <?php $form['submitted']['left']...
  • 1,069
0 votes
1 answer
17 views

Adding conditional comparison of two columns in relationship

I am trying to put value comparision while creating relationship. When i give direct value that works perfectly fine. but i wanted to pass column name with alias to get required results. This is ...
0 votes
1 answer
159 views

Is there a way to pass a value to a hidden field to multiple blocks printed from a template file?

The scenario is a template (tpl) file outputting a list of contact forms where each one is unique to a term ID in it section on the page. I need to generate a custom options list per printed Webform ...
  • 1,069
2 votes
2 answers
171 views

Do I need the trusted host setting?

Do I need the trusted host setting for a Drupal 7 site? If so how do I configure it? I noticed that Backdrop CMS has it in their settings file.
  • 31
0 votes
0 answers
33 views

How to get the field data

Hi i'm using entityreference, i hava an content type"test" that contain a field that refer to categorie and this categorie contain a field_theme also referenced to another content type ...
  • 1
1 vote
1 answer
43 views

Botton webform change bootstrap class

Maybe someone knows why when you change the name of the button, its class changes from btn-primary to btn-default. btn-primary only if there is a submit in the button name (Without spaces before or ...
0 votes
1 answer
40 views

Validation doesn't show an error when the value entered in the field doesn't respect the minimum length

I am using the Field validation module to validate a text field using the Length rule with a minimum length of 1. When the field is left empty, no validation error is shown. Setting the field as ...
1 vote
1 answer
26 views

How can I make 3 different menus?

I need to do an Agenda in Drupal 7. The table for the events is more or less already done, but I would need to add 3 days on the top like: Day 1 - Day 2 - Day 3 Depending on which day is ...
  • 11
0 votes
1 answer
73 views

hook_forms() not working

I'm trying to add a button to all node forms via callback in hook_forms. I get a similar error. Can someone help. Warning: call_user_func_array() expects parameter 1 to be a valid callback, class '...
0 votes
0 answers
73 views

How do I display nodes of two different content types that use the same taxonomy term?

I have two content types, typeA and typeB. Both the content types have a taxonomy reference field. I created a view for each content type. In the view showing typeA nodes, I want to show also typeB ...
-1 votes
1 answer
46 views

Downloading xlsm is disabled for anonymous user: What function is responsible for this access control?

We have a D7.8 site with Panopoly 7.x-1.81. No access control modules. A standard filefield is used for uploads and functions perfectly for the usual set of mime types. We recently extended the list ...
0 votes
1 answer
19 views

Is there a way to strip field set and description from [submission:values] in the emails tab?

I have a very long form. I would like to use the simple [submission:values] token in the email, but I'm hoping there is a way to add something that will leave out all the extraneous information like ...
0 votes
1 answer
507 views

Set a Data Value from Text field to Term Reference field

Node has two fields: Text field Term reference field (autocomplete?) The Text field is old and already has 500 nodes with 500 unique values. The Term reference field is new and needs to contain same ...
0 votes
1 answer
37 views

Checkbox Ajax call back giving me error

New to drupal 7, following code should work fine according to my knowledge can someone help me why ajax give me error in console ? and what the solution Code function ...
0 votes
1 answer
149 views

How can I disable these URLs?

In Drupal 7, the following URLs show the same node. http://www.example.com/node/5 http://www.example.com/node/5/randomtext1 http://www.example.com/node/5/randomtext2 http://www.example.com/node/5/...
  • 431
0 votes
0 answers
123 views

get translation programmatically of field value in specific language

I have created a content type (pdf_form) to which I added a field_gender_languagetest with two options, male and female. I translated both the options in German using the translation tab. Now I am ...
0 votes
0 answers
326 views

How do I fix the "You're attempting to access the site via IP address or invalid hostname." error?

I'm running Drupal 7 on Pantheon and have started getting the following error message whenever I try to save content. You're attempting to access a Pantheon site via IP address or invalid hostname. ...
  • 21
-1 votes
1 answer
50 views

Custom translation function

I need own translation function in my custom module where i have defined language codes ('en','ja','de'....etc) Now i just wanted to pass word and language code as a parameter and it returns ...
0 votes
0 answers
25 views

Can the Mailchimp module email node content?

I have a blog page. I want to add a sign-up box to collect email addresses so I can email everyone when a new blog entry is added. As I'm on shared hosting, I believe there is less chance of them ...
0 votes
1 answer
35 views

Securing admin account, silly "solution" found

Hello fellow Drupalers, I've been given the task of securing our admin account, on our websites (drupal 7) from outsiders. My first thought was 2FA and I looked at some of the modules (tfa, google ...
0 votes
0 answers
69 views

Why do I get "The file could not be created." on a site I locally duplicated?

I've duplicated an online site to a WAMP localhost site. The front page layout is broken and the front page shows this error. The file could not be created. The website encountered an unexpected ...
  • 57
0 votes
3 answers
91 views

Is there a way to add a variable to the variable table through the Admin menu

Can I set a new key/value pair for the variable table from the Administrator admin/config menu in a Drupal 7 site? I don't want to have to create a one-time custom module that only contains a ...
  • 295
0 votes
2 answers
61 views

How to export 1 or several specific rules?

I want to export one or more specific rules or components using Drush. I do have a script to export all the rules and components. drush --pipe rules-list | xargs -I{} sh -c "drush rules-export '{...
  • 338
0 votes
0 answers
106 views

How can I show a flipbook as block in the front page?

I've installed the FlipBuilder module that's created via the software and can view the flipbook on its own url, but I want to put a copy of my flipbook on the front page, in its own block or in a ...
  • 1
0 votes
1 answer
70 views

Drush issue duplicating includes/ directory

Using drush either globally or with a composer installed version, I get this double includes showing up in my fatal error (/includes/includes/): include_once(/srv/www/htdocs/sites/drupal/includes/...
0 votes
1 answer
284 views

invalid token: [node:title] when Token module installed

I'm on Drupal 7.80 and a Drupal newb so help with how to debug as well as things to try appreciated. Taking over a Drupal install that might have some outstanding issues. Problem: It looks like 'core' ...
  • 101
0 votes
1 answer
22 views

Drupal 7 taxonomy term fields not handling content filters

Image Resize Filter doesn't work with taxonomy term description. Resizing works fine in nodes and blocks, but not in views for taxonomy term. I'm loading term in my view template. And render its ...
0 votes
0 answers
18 views

Image field input renders with type text instead of file

(Drupal newb - please go easy and give references that help me learn how to debug stuff in Drupal myself, thank you!) I've taken over a Drupal site with 7.80. There's a type called Event which has a ...
  • 101
1 vote
0 answers
75 views

Git branching strategies with a small team to develop a Drupal site

We're a small team (5-6 developers) building a Drupal 7 site. Previously, we've used Features (https://www.drupal.org/project/features) to export our configurations from development to production. We'...
0 votes
0 answers
36 views

A new field doesn't show on the page

I recovered a site from a backup which had run on Drupal 7.7. I upgraded it to Drupal 7.80 on another instance. Now, we need to add new fields to content types and add new nodes. I added a field as an ...
  • 1
0 votes
0 answers
13 views

Views contextual display based on taxonomy for no value

I have a content type that has a name field and a taxonomy field that contains cities. I want the view to display by default the city as title and the message "nobody lives in city X" for ...
  • 1
0 votes
1 answer
162 views

Sharing articles on Social media loses the images after posting

This seems to have only happened recently. Has anyone found a fix? I'm using D7 with Metatag, Metatag:Facebook & Metatag:Opengraph. However, I'm not convinced the issue is with any of these ...
  • 191
0 votes
0 answers
41 views

ckeditor not loading rich text editor by default

I'm running CKEditor 7.x-1.19 with Drupal 7.80. With "Default editor state" set to Enabled, and "Show the disable/enable rich text editor toggle" set to Show, my system is still ...
  • 1
0 votes
0 answers
20 views

How do I upgrade a Drupal site that depends on multiple, complex installation profiles?

I'm no stranger to Drupal, but I have no experience with custom installation profiles. First, are custom installation profiles supposed to be overwritten when core is updated? I've inherited a Drupal ...
  • 3,794
0 votes
1 answer
71 views

can you search database for page values

I have taken over a Drupal 7 site which used to be on a different server and has now moved to ours. I have discovered that on lots of Pages, there are images which point to the wrong server name, the ...
0 votes
1 answer
22 views

how to call handler on every ajax request

I have created a handler for every submit request using $form['#submit'][] = 'MYMODULE_form_submit_handler' now the problem is this doesnt works on Ajax submit, or page call backs functions. i want to ...
-2 votes
1 answer
700 views

The website encountered an unexpected error. Please try again later. unable to debug

I have just moved a Drupal 7 site to a new server. The website loads ok but if I log in as an admin person and click on any of the admin menu options I get the error The website encountered an ...
0 votes
1 answer
33 views

Can I use a contextual filter to remove content?

So I have this view that searches for content (articles, blogs, etc.) associated with a particular author name. Is there a way with this that I can pass a contextual filter of taxonomy terms that ...
1 vote
2 answers
40 views

Strange Page not Found, Permissions, Clear cache

On my D7.80 I have developed a custom module: function wrong_answer_menu() { dd('it entered in hook menu'); $items['wrong-answer/%id'] = array( 'title' => t('Wrong Answer Dashboard'), ...
  • 41
1 vote
1 answer
155 views

Redirect Search API view result (Leaflet map) to display in a pane

The particular Search function starts as Full Panel Page in a style to a Google Maps Location Search page; Search Input (Block) to the top left overlaid on a current Leaflet map based on the logged-in ...
  • 669
1 vote
1 answer
84 views

Where shall I place "PHP SAML" library so that SAML Authentication module could find it?

I have a multisite Drupal 7 installation (not using Composer), and I can't figure out where shall I place "PHP SAML" library so that the SAML Authentication module would find it. The ...
1 vote
0 answers
91 views

GeoIP - Error: Class 'Database' not found in _registry_check_code()

On my Drupal 7.78 I installed the GeoIP module https://www.drupal.org/project/geoip I followed the steps in the Install.txt 1. Enable this module as usual. 2. Install one of the Maxmind php API: - ...
  • 41
0 votes
1 answer
182 views

How do I hide static media file URLs?

I have developed a website in Drupal 7. Right now I have a requirement: A page should display a PDF file (already generated). Only authenticated users should have access to view or download this file, ...
-1 votes
1 answer
229 views

I can't unverify the new owner on Google Search Console [closed]

I received a notification about a new owner into search Console. I have tried to un-verify the new owner who has been verified via meta tags. I have cleaned the website, but I can still see the meta ...
1 vote
0 answers
53 views

How can I restrict selectable terms in a term reference field to only show those which have been used earlier by the same user?

I have a node (type = List) with 2 fields, Term Name and Body. Body is a long text type field and Term Name is a entity reference field, which is a drop down with a list of Term in Vocabulary Vocab. ...
  • 11
0 votes
1 answer
145 views

How to change Search API index field machine name?

I am using Search API and Search API Solr modules on drupal 7. I have also drupal 8 and drupal 9 sites, and all those sites are indexed on the same solr index. So I need the same machine name for ...
1 vote
1 answer
47 views

user_presave and user status

I have written this hook in my custom module, just to track the status changes of the users. /** * Implements @see hook_user_presave */ function mycustommodule_user_presave(&$edit, $account, $...
0 votes
1 answer
18 views

IF statement to check if loaded entity is of type

In my module (fork of ECK Clone) I'm trying to set a default value when an entity of type "Course" is cloned. Currently I do: function eck_clone_clone_entity($entity, $account = FALSE) { $...
  • 338
0 votes
1 answer
12 views

Display a certain page in a view

Here is what I'm trying to do is display a certain page in a view instead of all of the basic pages. How would I go about doing that?
0 votes
1 answer
42 views

Manually update core from 7.0 to 7.78 in one fell swoop

I have recently become an admin for a site that has not been updated since 2011. there are broken links (internal links to the site's blog go to page not found, index error.) I think this is due to a ...