We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [6]

Version tags should be used only for questions that apply to a version only, not to merely say what version a site is using.

Filter by
Sorted by
Tagged with
54
votes
10answers
12k views

How do you improve Drupal performance?

Drupal is fast at develop, but the performance is so poor. It is hard to reach 50 request per second. And there are so many SQL queries in a simple web page. If you test the request time of a form ...
23
votes
4answers
6k views

Drupal 6 end of life

Is there a documented date, or a believed date for the end of life of Drupal 6? In other words, when will official development stop on Drupal 6?
22
votes
6answers
16k views

Correct way to change the active Drupal theme programmatically?

What is the correct way to change the active Drupal theme programmatically?
22
votes
4answers
6k views

Best way to optimize for authenticated user performance?

The keyword here is authenticated! Currently (as far as I know) the de-facto ways to optimize for anonymous access are through static page caches (varnish/squid/boost). However, as far as I know ...
20
votes
3answers
19k views

Updating to a newer dev version of a module using Drush (ignoring point/recommended releases, without trashing version control)

[NB This question is off the back of, but separate/further to, an earlier question of mine, here.] I've been using Drush a good while, but every so often I get stumped. At the moment, I'm really not ...
18
votes
4answers
7k views

How to get hook_install() to run all hook_update_N()?

How can i get hook_install() to run all updates that I have for my module? I have in it mymod.install file. I have tried function mymod_install() { mymod_update_6001(); } but it does not seem to ...
16
votes
5answers
5k views

Including a different jQuery version only on specific page

jQuery update module is including this script. <script type="text/javascript" src="/sites/all/modules/jquery_update/replace/jquery.min.js?6"></script> I need this on every page, except a ...
15
votes
3answers
22k views

Load more content with ajax when clicking more link in a view

I have a custom block view. I display the last 5 node titles. If someone clicks the more link I want to load the next 5 titles underneath the current 5 node titles. No page refresh and not pager. Is ...
15
votes
7answers
3k views

Exporting Taxonomies to code

I'm looking for a way to export Taxonomy vocabs and their associated terms. So far I've found and tested: Taxonomy Export -- Exports to code using features but doesn't import. http://drupal.org/node/...
13
votes
1answer
4k views

Programmatically create taxonomy term

How would you programmatically create taxonomy term? I wish to bulk create some in a custom module.
12
votes
7answers
40k views

Adding a new user directly in database

I've been given the files to a Drupal site so I can create a new theme. I haven't, however, been given the Drupal admin user/password date so I can't sign in to the admin area. Is there a way I can ...
12
votes
8answers
12k views

How to theme the views exposed form?

I've created a view with a number of exposed filters, but it is pretty ugly looking. I'd like to improve the theming, including wrapping the whole thing in a fieldset as well as grouping some of the ...
12
votes
4answers
4k views

How include hash (#) in drupal_goto path?

Is there any way to include a # in drupal_goto? i want something like this function MYMODULE_preprocess_node(&$variables) { $node = $variables['node']; switch ($node->type) { case '...
12
votes
2answers
5k views

What are the key differences between Drupal 7 and Pressflow 7?

I am currently using Drupal 7. I heard Pressflow is another solution for high performance sites. If you have experience with both systems, what is the benefit of migrating from Drupal 7 to PressFlow ...
12
votes
2answers
16k views

Where are the watchdog logs located or how do I view the errors created?

How do I view the watchdog logs that are created? Is there an interface to view them with, or are the logs stored somewhere on the filesystem?
12
votes
1answer
1k views

Best way to benchmark Drupal stack performance

I recently asked a question regarding Drupal performance and got some great replies. This got me thinking, what is a reliable/meaningful way to benchmark Drupal? It's easy to say "install APC, ...
12
votes
3answers
3k views

What is the best way, programmatically, to iterate through a view's results?

Given a view, named 'Children' (with two fields: child_node_id and a birth_order_value) what is the best way, programmatically, to iterate through the views results set given a display_id of 'default' ...
11
votes
4answers
8k views

How to programmatically duplicate a node?

I'm looking to create a copy of a webform I've made, with a new email address as the recipient. After I load the node with node_load, can I just save it with node_save? Will that create a new node ...
11
votes
5answers
12k views

Hide field when creating a node

How can I hide a field when creating a node, but displaying it when editing a mode?
11
votes
4answers
3k views

Using a newer JQuery version

The Drupal 6 version of jQuery is too old (1.26). Could I delete, and replace it with a newer version?
11
votes
8answers
16k views

Change class on the div wrapper of a form element

Is there a way to add or change a class to a form wrapper (the div's) using the form api? Or is that just done with the theme function ? If so which theme function is used to change that?
11
votes
2answers
3k views

Display webform results data in a Google Chart

I'm trying to display webform results as Google Charts. I'm doing this on the theme layer by overriding theme_webform_results_analysis() on my theme's template.php file and using the Chart module. ...
10
votes
9answers
14k views

How to delete 1600 users and 2500 posts?

A couple years ago I configured a site with Drupal 6.9, and then I forgot about it. I have 160 pages of users that are all spammers and I need to delete all but 3. Doing this one page at a time is ...
10
votes
8answers
25k views

How to detect the current URL?

I would like to add a body class in D6 if you are on a specific page(s) currently in my template.php I have: if url('the/path') { add the body class... } but that function doesn't seem to be ...
10
votes
5answers
10k views

How to list all users in drush?

I would like to list information about all users using drush. There is user-information, but it shows information only about single user. Are there any other solutions?
10
votes
2answers
6k views

Can I move a webform to another drupal installation?

I have created a few webforms on our development server and would like to move them over to a production installation. Can I do this with node export? I'm not concerned with migrate any user ...
10
votes
4answers
5k views

Why are my $messages delayed one page refresh?

I have a page with a very simple template: <!DOCTYPE html> <html> <head><title>TEST REGISTRATION PAGE</title></head> <body> <?php print ...
10
votes
6answers
2k views

How do I allow a free product into a cart, but only if cart net value is above $10?

I'm interested in running a promotion ... I'd like to make a product free if the customer's cart total is $10. I was able to do that with this module: http://drupal.org/project/uc_discounts_alt ...
9
votes
2answers
4k views

Why isn't Drupal object oriented?

I just started to peek into the docs and source (Drupal 6 at the moment) and noticed that there are no classes to be seen, only vast number of prefixed functions. Is this handy? Does such decision ...
9
votes
4answers
9k views

Update status behind a proxy

I'm running Drupal in an intranet which is behind a simple HTTP proxy. I'd like for the module and core update checks to actually work. I seem to remember there was a core hack to do this on Drupal 6,...
9
votes
4answers
10k views

I cannot log into after migration

I've searched what feels like hundreds of solutions and implemented them all. I've also searched this website in order to find the same question, but I was unable to locate it. I have a development ...
8
votes
6answers
2k views

Will Drupal 6 be left in a secure state after it becomes unsupported?

I created a custom database interface using Drupal 6 + Views + CCK that works really well for my company and recently I had to migrate it to another server. I thought "Hey, why not install Drupal 7 ...
8
votes
3answers
3k views

Migrate: What's the difference between prepare() and prepareRow()?

Using the Migrate module: I understand that prepareRow() runs a filter on the row and should return TRUE or FALSE based on some conditions, which allows a row to be migrated or not, but could someone ...
8
votes
4answers
27k views

Counting the number of rows returned from db_query() with the “SELECT” statement

How do I find the total number of rows returned in db_query() for the SELECT statement, or the equivalent of mysql_num_rows()? I'm using MySQL.
8
votes
4answers
3k views

How to migrate from MySQL to PostgreSQL

I need to know how to migrate my Drupal 6 database from MySQL to PostgreSQL. I also like to hear first hand experience tales about actual migrations. P.S. I found this drupal-mysql2pgsql.pl ...
8
votes
2answers
2k views

Programmatically add node translation

I am using i18n module. How can I programmatically create node translation?
8
votes
2answers
12k views

Multiple forms on single page?

Is it possible to put multiple forms on a single page? I am trying to make a coupon offer page. I wanted to have two forms for two different offers on each side of a page. Each form has a text field ...
7
votes
2answers
4k views

Making drupal_goto Ignore ?destination=foo

I frequently come across cases in my Drupal 6 sites where a user might encounter my module's pages with the ?destination=foo querystring appended to the URL, from previous interactions on the site. ...
7
votes
2answers
3k views

How do I remove variables from the variable table when my module uninstalls?

I'm working on a Drupal 6 module that adds some variables to the variable table. How can I go about having those variables removed from the variable table when the module is uninstalled?
7
votes
4answers
4k views

How to delete node revisions

I need to delete all node revisions before upgrading to Drupal 7 to save time in migration. Is there any way to do that?
7
votes
4answers
2k views

How to maintain a local mirror on my Mac?

I have a personal Drupal 6 site being hosted commercially, and I would like to maintain a mirror of the site on my local MacBook for the purposes of developing custom modules and themes before ...
7
votes
1answer
2k views

Programmatically validate a node?

I am programmatically creating many nodes. Obviously they have to be valid before storing them. Such $node objects have CCK fields mixed with custom fields. Because the validators only set a ...
7
votes
2answers
9k views

Passing in URL parameters to menu callbacks

I implemented hook_menu() to create a new path called 'user-login'. The page callback function receives url parameters like $_GET['parameter']; however, when I go to http://site.com/user-login?...
7
votes
1answer
4k views

db_query('SELECT nid FROM uc_products'); doesn't give any results! Why?

There's a really simple query related to the enabled and working Ubercart, where the task is to get all the nids from uc_products table, which simply doesn't give any results: $query = 'SELECT nid ...
7
votes
1answer
730 views

How to theme simplenews unsubscribe page?

I'am trying to theme Unsubscribe Page for my Newsletter to much the Newsletter Design. Does anyone know how to theme unsubscribe page in Drupal 6: example.com/newsletter/confirm/remove/*
7
votes
5answers
804 views

Conditionally show fields viewing a node (not in the node add form)

I know conditional fields can be use to create CCK optional fields, but I need something similar to display part of a node, according to user decisions. I will have a question "do you like cats?", ...
7
votes
3answers
1k views

How to use URL parameter and page callbacks for tab menus correctly?

I'm using Drupal 6 and I'm trying to display two tab (menus) on a page that has the URL /vehicle_info. Both pages that the tabs link to should take a node's nid as parameter. My current code looks as ...
6
votes
4answers
12k views

Simple drupal admin for clients? [closed]

Basically Drupal is bit complicated for normal clients. Drupal 7 is better but still its not that user friendly for clients especially when comes to admin content or taxonomy! Is there any module or ...
6
votes
6answers
1k views

Should I choose Drupal 6 or Drupal 7?

I want to use Drupal as a Framework for my application. Apart some modules, such as Image, Imagecache, Views, and Panels, I will make custom modules. I need the best performance and result. What ...
6
votes
5answers
7k views

How to remove unused files from directories

I want to remove/delete files from site directories (e.g. /sites/default/files/*) that are not used in site. There are thousands of files that causing fillup size. Any suggestions for this?