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
0 answers
15 views

Optional parameter $path declared before required parameter $langcode is implicitly treated as a required parameter in include_once()

I've just updated from PHP 7.4 to 8.1 and on the whole everything appears to be working. However I'm seeing the following over and over in our logs, to the point that it's drowning out everything else....
somnolentsurfer's user avatar
0 votes
1 answer
15 views

How can I export all webform structures?

How can I export forms generated from a Drupal 7 site using webform? The data is meant to be used to recreate a form generator tool by another team (who is not necessarily using Drupal).
Matoeil's user avatar
  • 3,355
1 vote
2 answers
38 views

Permissions to edit user field data, but not fields itself

How to allow a role to edit/manage user accounts e.g. click Edit and change email, username, password etc., but do not edit the fields itself, e.g. cannot just go to Manage fields and delete/create/...
user3108268's user avatar
0 votes
0 answers
57 views

Title length error

We just started receiving the following error when attempting to add a new content item: "Title cannot be longer than 70 characters but is currently 79 characters long." This happens ...
CJ Catalano's user avatar
0 votes
0 answers
80 views

Why is CloudFlare blocking file uploads?

I have a simple form where people raise IT helpdesk requests (oh, the irony...) and this creates a case in CiviCRM. It's an unsophisticted but cheap helpdesk system for the few requests we get. A ...
ChumKui's user avatar
  • 139
0 votes
0 answers
53 views

View breaks the page output

Has anyone encountered this problem or can at least help me debug it? The views is displayed as standard if the parameters are specified. Format:Unformatted list | Settings Show:Field If I change it ...
drupnub's user avatar
0 votes
0 answers
35 views

Deny access to pages or nodes base from a database table

I was modifying a 2fa module for restricting users to access other account's page (user/%/2fa) which is working. function custom_2fa_menu() { $items['user/%/2fa'] = [ 'title' => t('...
DevNooby's user avatar
-1 votes
1 answer
38 views

Access arguments only allow administer and user logged in

I am building a module and used the following code to define a route for a user account. How do I set the access arguments to only allow administrators and the user himself? $items['user/%/extra-...
DevNooby's user avatar
1 vote
0 answers
8 views

Limited languages choice on the creation of some type of node, not all

I inherited a Drupal 7 installation where I have a problem on a new node creation: on some types of node the SELECT language choice is limited to 3 languages, on one type the SELECT is empty, while on ...
Paolo's user avatar
  • 111
0 votes
0 answers
53 views

Expired session - Invalid form POST data - Ajax

On my Drupal 7 I have a multisep form that uses ajax to validate and to submit the answer. The form is used for an authenticated or anonymous user to answer a set of questions. Everything is fine, ...
MMT's user avatar
  • 41
0 votes
1 answer
62 views

How do you programmatically get custom content field data from commerce product?

Background: I'm creating a rule that runs after an order is submitted that checks all the line items for any backorder and emails the customer. In the PHP function I've been able to use ...
jsank95's user avatar
  • 11
1 vote
0 answers
27 views

Send email "After a webform has been submitted" to submitter

I'm using Drupal 7.97 with these modules: Views 4.25 Rules 2.13 Webform rules 1.6 Recently I upgraded Drupal to 7.97 and Views to 4.x branch, After that my rule that sends email to anyone who ...
Alex Sh's user avatar
  • 11
0 votes
1 answer
16 views

['#attributes']['class'] variable is not being rendered on the page

I'm working on an old Drupal 7 site. In the template file paragraphs-item--user-block-paragraph.tpl.php the content is being rendered, but the class is not added to the element. Here is the code: $...
Ben Alan's user avatar
  • 111
0 votes
0 answers
38 views

TFA Session expired when user login

not sure if anyone faces this issue, when I tried to login with the authentication. It shows TFA session has expired. But the user account was logged in. Screenshot attached, I tried to drupal set ...
DevNooby's user avatar
-2 votes
2 answers
91 views

Internal 500 after upgrading the server to Debian 10 with PHP 8.2

I haven't dealt with Drupal before, but I needed to upgrade the server from Debian 10 with PHP 7.3 to Debian 12 with PHP 8.2. The website throws 500 errors. I added debugging lines on the index.php ...
Yehia Gamal's user avatar
1 vote
1 answer
40 views

How do I parse a path alias? [closed]

I have the following code in my page.tpl.php file. <?php $path = drupal_get_path_alias($_GET['q']); ?> <?php if ($path == 'about-us'): ?> <div class="container"> <...
CJ Catalano's user avatar
0 votes
0 answers
33 views

How can I extend the maximum number of items in a menu?

I maintain a website where a particular content type is always displayed with a left-hand navigation menu present. As part of the process for adding new content of this, the site editors add a link to ...
user871967's user avatar
0 votes
0 answers
34 views

Book child title containing html tags is escaped

I have a Drupal 7.97 with a book e.g. node 1 that has three children nodes of e.g. nodes 2,3,4. In one of the children nodes title e.g. node 3 title I'm using an simple html tag: Node 3 sample title &...
MMT's user avatar
  • 41
0 votes
0 answers
51 views

How do I add new fields to the sitemap.xml file generated by the XML Sitemap module?

Is there a way to add extra fields to the sitemap.xml file created by the XML Sitemap module? By default, it has these fields: URL, last modification date, change frequency, and priority. I'd like to ...
monster_energy's user avatar
0 votes
1 answer
35 views

Fetch the total number of rows in Rules View to use that number in Rules

I have a View that lists entity IDs of some sort and I have created a Rules View for this. In Rules, I have created a component where I want to fetch the total number of rows from that Rules View and ...
BassPlaya's user avatar
  • 338
0 votes
0 answers
49 views

Strange redirect text in page cache entries

My Drupal site is having some redirect malware issues. I suspected some strange redirects and tried to catch redirects by caching them through Nginx. Below is the output of one redirect. Page https://...
JM John's user avatar
  • 15
0 votes
0 answers
42 views

How to use Commerce Product Options in Rules?

This questions is about Commerce Product Options version 7.x-1.0 and not 7.x-2.0, the 2.0 version does not have this problem. The reason we're using 7.x-1.0 is because other module Commerce Pricing ...
user3108268's user avatar
0 votes
1 answer
16 views

Where is the "Install Profile" value in the Status report set?

I am using Drupal 7. If I go to Reports --> Status Report, the "Install Profile" value is incorrect (it has an extra dash at the end). Where is this value stored? I wish to correct it.
MrSnrub's user avatar
  • 291
0 votes
0 answers
20 views

Example payment always sets the order to "Checkout: payment"

I'm using the Example Payment module to test payments for free stuff in Drupal 7 Commerce. It works, but after the last step in the checkout process, the order status is always set to Checkout: ...
BassPlaya's user avatar
  • 338
1 vote
0 answers
29 views

Caching Views with altered query

I have a view showing on taxonomy terms which shows popular nodes from same category of taxonomy terms. Category - Taxonomy Terms - Nodes Lets say Term A and Term B both are same category. On Term A ...
JM John's user avatar
  • 15
0 votes
1 answer
49 views

Style image is not created

I have a D7 (7.72) news website (multi-lingual), it started on 2023-06-07, that no image upload or update could create style in sites/default/files/styles although it uploads to the sites/default/...
user3532287's user avatar
0 votes
1 answer
69 views

How can I add an external/third party library with type = 'module' using drupal_add_js()?

drupal_add_js('path_to_external_JS_file_on_CDN', [ 'every_page' => TRUE, 'type' => 'external', 'defer' => 'defer', 'attributes' => [ 'async' => true, 'type' =...
monster_energy's user avatar
0 votes
0 answers
14 views

Adding a select box to a tableselect

I'm trying to use the technique outlined in this blog post: https://www.hexblot.com/blog/drupal-tableselect-fields to add a select box to a tableselect, but there are a couple of issues: The default ...
Lambic's user avatar
  • 708
-2 votes
1 answer
30 views

Is there a way to allow entering a value in a node's field if inserting a new node, but make the field disabled if updating that same node?

I'm using Drupal 7 and I have a standard text field in my Content Type. If the user with role "Standard User" is adding a new node then they should be able to set the Status field text value....
MrSnrub's user avatar
  • 291
0 votes
1 answer
34 views

Report of coupon and users

I have users who are partners and users who are clients. When clients submit an order, they use a custom coupon code associated with each partner. (Each partner has a Mycodes field set within their ...
user3532287's user avatar
1 vote
0 answers
31 views

Filter only by existing nodes

I am trying to get a view to have only a selective range of referenced content, (somewhat like https://www.seek.co.nz Classification filter) in its exposed filter, but not having any joy so far. This ...
Onyx's user avatar
  • 155
0 votes
0 answers
24 views

Trouble upgrading 7.90 to 7.91 [duplicate]

I'm trying to keep a D7 site up to date, it's currently running 7.90. I tried to upgrade to 7.95, but I ran into trouble, and eventually figured out that it's the 7.90->7.91 transition that's ...
Ken Williams's user avatar
0 votes
0 answers
193 views

I'm unable to run Drush v8.4.12 on PHP 8.1.6 using Bash on Windows11

I'm on the final two sites to migrate to D9 - but some D9 modules are now needing PHP 8.1 to stay on the latest upgrades. So - I've changed my server environment to use PHP 8.1 - and using XAMPP for ...
Wayne Foster's user avatar
0 votes
1 answer
69 views

SQL injection POST attacks

Just found hundreds of POST requests to user registration pages on Drupal site. No users are being registered but these requests are still getting 200 status from Drupal. Are these requests doing any ...
JM John's user avatar
  • 15
1 vote
1 answer
61 views

While upgrading from D6, update.php appears to expect the Drupal 7 version of the database array and it throws errors

Leaving settings.php in place (but writeable), per instructions 13 + 14 of major upgrade section of https://api.drupal.org/api/drupal/UPGRADE.txt/7.x , with the new D7 codebase but the old D6 DB, i ...
john brush's user avatar
0 votes
2 answers
93 views

How to log incoming POST requests

We are seeing a lot of POST requests by bots to /register pages or pages with forms. This is likely an attempt to make an SQL injection. What's the best way to log the full POST request and see the ...
JM John's user avatar
  • 15
0 votes
0 answers
19 views

Where are the memcache parameters set?

I installed the Memcache API and Integration module and I can check the memcache report on /admin/reports/memcache. How can I get the total utilization of memcache servers? Where are those parameters (...
avishek's user avatar
0 votes
1 answer
20 views

How do I display the title of the entities to which the user has no access?

I created a new content type with entity references to standard pages. I am using the Taxonomy Access Control module to control the access to these pages. When users view a node of that content type, ...
Sleepster's user avatar
  • 101
0 votes
0 answers
36 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 &...
Rachel C's user avatar
0 votes
1 answer
76 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 ...
Mayk RE's user avatar
0 votes
1 answer
192 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 ...
wil_SRQ's user avatar
  • 121
0 votes
1 answer
225 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 ...
user3108268's user avatar
0 votes
0 answers
24 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="...
MMT's user avatar
  • 41
0 votes
0 answers
11 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 ...
bricknewer's user avatar
0 votes
0 answers
29 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 ...
Qaiser iqbal's user avatar
-3 votes
1 answer
48 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 ...
JM John's user avatar
  • 15
0 votes
1 answer
97 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-...
JM John's user avatar
  • 15
0 votes
0 answers
60 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 ...
Chris's user avatar
  • 11
0 votes
1 answer
94 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'] . ...
user3108268's user avatar
0 votes
1 answer
94 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 ...
Rajat Bhardwaj's user avatar

1
2 3 4 5
530