All Questions
26,475 questions
0
votes
1
answer
45
views
Lockwait timeout exceeded on drupal-commerce
There's something totally crazy going on here and i can't even diagnose the issue.
the error:
PDOException: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction: ...
0
votes
1
answer
26
views
Uploading managed_file from custom form always inserts file as temporary://. How to move to private://?
While trying to create a custom form (using form api) in Drupal 7, I wanted the user to be able to upload a file.
In my hook_formname_submit() function, I was saving the file, but in my database it ...
0
votes
0
answers
33
views
Views PHP row-> returns NULL
I have a simple View that has a global custom text field with the value of "hi". I have a global PHP field that tries to print this value with echo $row->nothing;.
As this is the strange ...
0
votes
0
answers
29
views
#ajax callback doesn't work on form loaded via AJAX from a JavaScript file
Having trouble getting an #ajax callback to work, initially user clicks on a date on the calendar and an ajax request is made to get the time slots, the time slots form have an ajax callback attached ...
0
votes
0
answers
20
views
Tax, coupon, and zero payment
I am trying to do a very basic task which I guess should be available out of the box. I have read many other comments that do one and not the other, some are even offering programming with hook ...
0
votes
0
answers
74
views
How do I add a class to HTML tags in CKEditor 5?
In Drupal 7, I could add classes for <img> and <div> tags in CKEditor 4. I can’t find a comparable feature in CKEditor 5.
How can I add classes to these tags using CKEditor 5?
0
votes
0
answers
49
views
"Unrecognized response content type" in Acquia Migration Accelerate
I am trying to run the Acquia Migrate Accelerate tool on a production D7 database. I've got as far as migrating Public Files and each time it stops after about 2000 out of 7000 entries. I also get the ...
0
votes
0
answers
31
views
Is there a method to get a view to provide multiple tags in a CSV export within one column rather than mulitple rows?
I have a D7 site that is being recreated. I need to generate a CSV of particular fields used in its numerous content types.
There are 5 taxonomy reference fields. I have created a relationship for ...
0
votes
0
answers
26
views
Using Rules to calculate end date based on start date
I have a reservation content type with field_start_date that the user sets for staying. Users can update this node at any time. I want to be able to:
Calculate the field_end_date based on the proposed ...
0
votes
1
answer
197
views
Undefined index: php in system_requirements()
Whenever updating modules on an existing Drupal 7 site, I got lots of these error messages
Undefined index: php in system_requirements() (line 471 of xxxx/modules/system/system.install)
The code at ...
0
votes
2
answers
711
views
"Declaration of Monolog\Logger::emergency() must be compatible with Psr\Log\LoggerInterface::emergency()"
I'm using PHP 8.1.2-1ubuntu2.14, Drush 8.4.12 (latest), and Drupal 7.98 (not yet updated).
I'm having a problem with a Drush command which uses Google APIs, Google Auth, and Google services. I get the ...
1
vote
1
answer
111
views
How can I get the token value added at end of css and js files?
As you know in drupal 7 css and js files added to the rendered page.
at end of href or src values you see a token.
for example
<link type="text/css" rel="stylesheet" href="/...
0
votes
1
answer
77
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).
1
vote
2
answers
81
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/...
0
votes
0
answers
64
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 ...
1
vote
0
answers
490
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 ...
0
votes
0
answers
68
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 ...
-1
votes
1
answer
53
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-...
1
vote
0
answers
12
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 ...
0
votes
0
answers
81
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, ...
0
votes
1
answer
153
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 ...
1
vote
0
answers
52
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 ...
0
votes
1
answer
29
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:
$...
0
votes
0
answers
75
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 ...
-2
votes
2
answers
288
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 ...
1
vote
1
answer
70
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">
<...
0
votes
0
answers
76
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 ...
0
votes
0
answers
101
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 ...
0
votes
1
answer
66
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 ...
0
votes
0
answers
52
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://...
0
votes
1
answer
17
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.
0
votes
0
answers
26
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: ...
1
vote
0
answers
48
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 ...
0
votes
1
answer
125
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/...
0
votes
1
answer
199
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' =...
-2
votes
1
answer
40
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....
0
votes
1
answer
54
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 ...
1
vote
0
answers
32
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 ...
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 ...
0
votes
0
answers
366
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 ...
0
votes
1
answer
437
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 ...
1
vote
1
answer
112
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 ...
0
votes
2
answers
418
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 ...
0
votes
1
answer
30
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, ...
0
votes
0
answers
45
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
184
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
432
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
604
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 ...
-3
votes
1
answer
66
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 ...
0
votes
1
answer
148
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-...