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
1 answer
68 views

Inline Javascript throws an error on drupal_add_js() within an AJAX callback

I am trying to get JavaScript to measure a text field and auto submit at a character limit for an Ajax callback to be validated against a Luhn Algorithm and errors out on failure to validate. I found ...
0 votes
2 answers
401 views

Is there any way to clear the cache with specific cid?

I set some data in cache using cache_set($cache_id, $temp_data, 'cache', CACHE_TEMPORARY); from a custom module. It's cleared when I clear all the cache. Is there any way I can clear that specific ...
  • 1
1 vote
2 answers
124 views

Is there a way to find internal links to a specific web page?

For example, for a page called mysite.com/about can you determine any other pages that link directly to this web page? The goal is to determine all of the webpages that exist in mysite.com that have a ...
  • 11
0 votes
1 answer
29 views

How to display specific button for certain user?

I have a simple Drupal 7 page with 3 buttons. Page is only accessible by logged-in users. I have 3 roles - role 1, role 2 & role 3 What I would like to do is to show only button 1 when a user with ...
  • 157
1 vote
0 answers
559 views

Video does not pause automatically when slider change in FlexSlider

I'm using version drupal 7 to create the "slideshow" to display the slideshow of the video, each video is embedded in its own content item. When the user starts to play the video, if the ...
  • 11
0 votes
0 answers
29 views

Form doesn't update via hook in edit mode, instead of it page reloading

This is not happening all time (possibly for big amount of existing field, I'm not sure, with less amount of fields form is saving as it should) when I'm adding new Field collection entity or update ...
0 votes
0 answers
46 views

It's not allowed to store backups inside the Drupal root directory

I must be missing something because I can't determine what I'm doing wrong. I've got a D7 site, and we're running Drush 8.1.10 I'm trying to run through some updates but I keep running into this error:...
  • 399
0 votes
1 answer
105 views

Headers already sent

I found this error repeated several times for two of the pages on my website. Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/mydomain....
  • 41
1 vote
1 answer
60 views

Editing a node deletes body content reproducibly if Locale module enabled

I am experiencing a pretty serious problem leading to data-loss in D7. Editing any existing node leads to empty body content and newly created nodes have no body content whatsoever. Update: The error ...
  • 381
2 votes
1 answer
33 views

Disable links to username and date

One of my tasks requires me to disable the links to username and date fields generated from diff_diffs_show() whose output is rendered as in the following screenshot. The code outputting those links ...
0 votes
1 answer
34 views

Entity reference additional field

In D7 I have two new node type defined e.g. branch and leaf. The branch is a collection of leaves that I'm referring to using the entity_reference module. In the picture below the leaves are the nodes ...
  • 41
0 votes
0 answers
74 views

Add external script in head after CSS loading

My question maybe is a little bit strange. I have Drupal 7.x and i need to add in <head> a script to verify my adsense account: <script data-ad-client="ca-pub-xxxxxxxxxxxxx" async ...
0 votes
0 answers
39 views

Can't access to my database while installing the site

When I try to install my Drupal site, I pass throughout the first 2 steps. When I type the name of database, username, and host, nothing happens. I only see the errors about username, database, and ...
1 vote
1 answer
154 views

Migrating user accounts to Okta

I'm trying to migrate users exported from Drupal into Okta using the /api/v1/users API (specifically [creating users with import hash][1]), and am stuck, and desperate for help as I'm late on a ...
0 votes
1 answer
605 views

How can I preprocess pager links for a view display?

I've created a custom Drupal 7 block view that uses a mini pager. I need to display the pager-previous and pager-next links as images, and replace the pager-current link with some text. Do I need to ...
  • 419
0 votes
1 answer
249 views

Incorrect string value: '\xF0\x9F\x92\x99' for column "'comment_body_value'"

How can I fix the following error I get from a Drupal 7 site? Incorrect string value: '\xF0\x9F\x92\x99' for column "'comment_body_value' I read it is about users posting emojis that cannot be ...
  • 41
-1 votes
1 answer
24 views

Discount issue?

I am working on a big Drupal 7 commerce site and I have some issues with the commerce discount module on order discount. Both Drupal 7, commerce, commerce discount and rules is on newest stable ...
0 votes
1 answer
52 views

Seeing PHP info twice in status report

On the status report page of a drupal site we run with 7.78, the PHP version number gets reported twice. We have only setup 1 PHP instance in IIS with version 7.3.24. How do I correct this to pull ...
  • 113
0 votes
0 answers
22 views

View won't save end date configuration as filter criteria

I'm using Drupal 7 with views 7.x-3.15 and Date 7.x-2.9 I have a date field for an "Events" content type. Events can sometimes last more than 1 day, so I have enabled an associated end date. ...
  • 191
0 votes
1 answer
186 views

Dynamic query with left join

I need to collect comments that belong to certain user and submitted on pages of certain content type nodes. Currently I'm making two queries: $nodes = db_select('node', 'n') ->fields('...
0 votes
1 answer
70 views

db_delete does not actually delete

I'm trying to delete from the dr_cache_form table,in D7, but somehow the record does not get deleted function mymodule_multistep_form_submit($form, &$form_state) { //..... ...
  • 41
0 votes
1 answer
33 views

Can I add a custom block?

I want to have a block with 3 text body fields. I've done this before in Drupal 8 where I created a custom block and was able to add different fields to it. In my Drupal 7 setup, I can add a block but ...
  • 173
0 votes
0 answers
23 views

The following module is missing from the file system: "post_articles" [duplicate]

I was given a Drupal website in the form of a Drupal database running on a website and an archive containing a Drupal installation complete with a theme. Upon uploading the installation to the server ...
0 votes
1 answer
30 views

ctools module keeps getting unloaded?

I keep getting this error while trying to access content using The Course module. Call to undefined function ctools_get_plugins() To my understanding this means the ctools module is not loaded, ...
0 votes
1 answer
65 views

Custom js added with drupal_add_js doesn't actually get added if I enable "Aggregate JavaScript files" or "Cache blocks"

The site is the most stock, only Drupal 7 core is installed. included my theme, where the page.tpl and html.tpl theme files are copied from core I created a Yandex.Maps module, this is a block where ...
  • 101
1 vote
0 answers
43 views

Field type where big data is not loaded into memory if not needed

Background Normally when an entity is loaded in D7, the 'field_attach_load' step will load all the data from fields into the entity object. The field_sql_storage_field_storage_load() loads the data ...
  • 3,560
0 votes
1 answer
22 views

Moved Site - Can't find original CSS for look other than in the ADVAGG

I've inherited a drupal 7(I'm a beginner) site that had ADVagg installed. I added a stanza in my nginx config to take care of those files. What I'm running into is that there is a button on the ...
0 votes
0 answers
49 views

Access denied trying to edit node that I own

In an administrator account using the administrator panel i can create and edit content from content type Country. But when they are created from a script, and even if i own them, i can't edit if ...
0 votes
0 answers
82 views

How can I completely disable cron so that it won't run even if the cron URL is hit or cron is ran manually?

When working on a dev site I'd like to put in a safeguard to make sure cron cannot run, even if triggered manually. Is there a way to do this in Drupal 7?
  • 1,069
0 votes
1 answer
33 views

Loading nodes that are only available to the current user

How do I programmatically load nodes that are available to the current user? I used node_load_multiple(), but it seems to directly load nodes from the database, bypassing permissions.
0 votes
1 answer
94 views

What is the recommended jQuery and jQuery UI version?

What is the recommended version of jQuery and jQuery UI that I should use on a Drupal 7.77 site? I know the latest jQuery version is now 3.5.1, but what is the recommended version for a Drupal 7.77 ...
2 votes
0 answers
206 views

Updating modules creates An AJAX HTTP request terminated abnormally error

Drupal 7.77. I have three modules that need to be updated. Trying to update any one of them results in this error: An AJAX HTTP request terminated abnormally. Debugging information follows. Path: ...
0 votes
0 answers
1k views

PDO database connection error?

Super strange, my site was up and working fine yesterday. Today, I navigate to my home page and I'm thrown this series of errors: Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo ...
  • 239
0 votes
1 answer
269 views

How can I disable Webform submit button after being clicked

I've been trying to resolve an issue with no luck. For some reason there are no submission indicators out of the box with D7 Webforms and from what i've found it doesn't look like they have any plans ...
1 vote
2 answers
247 views

Batch delete users and the content they created

When I received this Drupal 7 site to manage, it has had years of being open for people to make accounts and now I have ~ 300 PAGES of users with names like ismehacker1234568 and such, with under a ...
  • 82
-3 votes
2 answers
332 views

How to loop through a database table to save every column as a single node?

I have a module, which loads company data from an external db to save this as content. function example_create_nodes() { // Get Data from external DATABASE db_set_active('db_wirdfit'); $result = ...
3 votes
2 answers
41 views

Unlimited values for 2 combined fields

I want to add 3 fields to my articles: repeatable (boolean) unlimited values for repeat_date and repeat_comment I created the fields and with fields dependency I made the it possible that ...
  • 183
0 votes
2 answers
676 views

How do I show an already hidden field of a custom content type to a specific authenticated user?

I have a custom content type whose fields are Name, Description, and URL which is hidden by default. I want to show the latter field to the authenticated users who have flagged the node containing it. ...
3 votes
0 answers
40 views

Speed up login after changing user name datastore type to VARBINARY from VARCHAR

We have a project underway that requires the import of ~6 million users into Drupal (Core 7x) that have many (150K+) case-insensitive duplicate usernames. Importing these users with existing case and ...
  • 31
0 votes
1 answer
100 views

After core update: Access denied after submitting form

We’re running on Drupal 7.73 and WebForm 7.x-3.30 – for a while now since the 7.75 to 7.77 Drupal release, we’ve been unable to update Drupal successfully. As every time a user submits a form on the ...
  • 9
2 votes
1 answer
73 views

Limit amount of emails sent per time frame?

Is there a module which allows for the limiting of emails sent per hour using drupal mail system? My server has a limit of how many emails can be sent per hour. Most of my users are online at the same ...
0 votes
0 answers
99 views

Add image using cURL

I'm migrating data from Zoho creator into Drupal 7. I wrote a PHP script to get all records and save them into nodes and that worked fine, but I need help to get the images and add them to the nodes ...
0 votes
1 answer
19 views

How to render full profile2?

I am tring to load a full profile2. I a trying the following code <?php $uid = user_load($node->uid); $profile2_p = profile2_load_by_user($uid, 'profile2_profile'); print render($profile2_p); ?&...
0 votes
1 answer
195 views

How can I remove self-closing source tags when rendering HTML markup?

I use this markup in a node body. <video> <source src="myvideo.mp4" type="video/mp4" /> my title </video> The following markup is instead rendered in the ...
0 votes
0 answers
39 views

Unable to access Admin page after core update (minor version 7.? to 7.77)

After manually updating Drupal 7 core - I am unable to access the /admin or /user page. Here's my process: backed up db entered maintenance mode manually downloaded Drupal 7.77 (deleted default '...
  • 1
0 votes
0 answers
239 views

S3FS S3 module image source issue

I'm using the S3FS module to use an AWS S3 bucket as my sites/default/files directory. When I upload images they are successfully uploading to the bucket. I edit a node and include the same images via ...
  • 1,720
1 vote
1 answer
26 views

testing scheduled file deletions

Long story short, is there a correct way to override DRUPAL_MAXIMUM_TEMP_FILE_AGE? I'm working on testing a fix to a module I wrote a while back that handles some uploaded files. I neglected to call ...
  • 147
0 votes
0 answers
24 views

View with Block and Page results in Pager Issues [duplicate]

I have a view that has a Block and a Page. The block is up in the header of the site as seen in the first image below and obviously the page is loaded in the content area. The odd behaviour is that ...
0 votes
1 answer
137 views

SMS password recovery

I'm currently using D7. When my users attempt to request a password reset, 95% of the time, these reset emails land in their spam, or are blocked by whomever their email provider is. That being said, ...
  • 239
2 votes
1 answer
44 views

List all node titles to better iterate on a list of names

I have a content type called Country and I have to verify what countries already exists in db and save the missing ones, comparing to a variable with all countries ($country_list). I am having trouble ...