See the Mailing lists or Drupal Issue queue. There are also various working groups on groups.drupal.org

Use of $_GET['q']

When we bootstrap Drupal, we do this:

  // Initialize $_GET['q'] prior to loading modules and invoking hook_init().
  if (!empty($_GET['q'])) {
    $_GET['q'] = drupal_get_normal_path(trim($_GET['q'], '/'));
  }
  else {
    $_GET['q'] = drupal_get_normal_path(variable_get('site_frontpage', 'node'));
  }

Why do we put the results back into $_GET['q'] and not into a Drupal specific global variable? Or in a function that stores it statically? It seems to me that the above example loses on several counts:

1) we destroy the original $_GET['q'] (don't know whether this is useful in some cases)
2) we encourage people to access the path over and over again using $_GET['q'] which is lots of typing and not very descriptive, and locks us in to this one parameter.
3) makes it unintuitive to alter or change the value (you end up having to reassign $_GET['q']).

I'd suggest that instead we do something like this:

  global $drupal_path;

  // Initialize $_GET['q'] prior to loading modules and invoking hook_init().
  if (!empty($_GET['q'])) {
    $drupal_path = drupal_get_normal_path(trim($_GET['q'], '/'));
  }
  else {
    $drupal_path = drupal_get_normal_path(variable_get('site_frontpage', 'node'));
  }

Now, for the real-life situation that prompts me to ask the question. I've written an application that updates a table (made with theme_table) with AJAX in response to changes in taxonomy selectors. The AJAX PHP returns the entire table new, including the sorting and paging links. Since the path to the AJAX function is different than the path to the page that builds the original table, the sorting and paging gets broken after the first AJAX update because they both use $_GET['q'] in their code. So clearly, I'm going to have to reassign $_GET['q'] in the AJAX function to avoid this. It just seems really bad practice to me to do this. The stuff handed over from the server should be holy territory, never touched, immutable. It would seem much more intuitive to me to either reassign a global $drupal_path variable, or use a drupal_set_normal_path() function to do the same (and use drupal_get_normal_path instead of $_GET['q']).

Set the menu Expanded by default in Drupal

Hello ,

How do I set all the menu items expanded by default in drupal version 4.6.3?

I can do this in drupal 4.5.7 by setting the default value of the parameter $all in the function
theme_menu_tree() to "TRUE".

But We could not find such parameter in the file menu.inc for the function theme_menu_tree in drupal 46.3.

Thanks in advance.

With regards,
Baburaj

Symlink() warning for file common.inc

For drupal 4.6.5 I can't create a symlink for my multisites on the web host(Apache 1.3.34 and PHP 4.4.1).

When run php symlink() function

symlink('target', 'link');

to create a link, I got a message:

warning: symlink(): File exists in .../drupal/includes/common.inc(1813) : eval()'d code on line 2.

Anything wrong for the common.inc?

Add New User as Admin - no email sent

If you add a new user as an Admin you are not given the option to send them a welcome email.
I would think that this should be an option to select... "Send Welcome Message"

Thoughts?

Handle large number of RSS requests

I'd like to share our experience in dealing with a sharp increase in RSS feed requests including the solution we finally implemented and a feature request for Drupal core. Before getting into the subject, let me say that we have been running Drupal since last year. In terms of both functionality and performance, I don't see any other CMS system out there that's better for our needs.

What happened

* Ours is a literature site in Chinese with 18000 registered users. We have been publishing online since 1995. The current host is a dedicated 2.6 GHz Celeron server with 768 MB RAM running PHP 4.3.3 and MySQL 3.23.58. The Drupal installed is a CVS version (4.7?) that has been running for about 4 months.

* An email application used by many in China has added a RSS reader. One of our RSS feed is one of the preset feeds in the application. Starting in mid November, RSS requests started to increase very fast within a week. Before we can respond the HTTP server had to be shut down for the better part of 3 days because the server would overload within minutes. Weblogs show that hits had increased about 5 times over the two months.

* Drupal based solutions that we tried were not successful. One of the major reasons is the SQL calls generated for each Drupal URL hit. It is the database calls that invariably killed the server in the end. This in part has to do with a problem/bug in MySQL which failed to kill "sleep" connections during server overload (persistent connection is turned off).

Drupal menu does not perform well with large taxonomy

I know a lot of you *think* you know what will happen if the taxonomy grows too large, but I can tell you from first hand experience, Drupal does NOT do well with a large taxonomy. My organization has tens-hundreds of thousands of term levels, and menu.inc does not play nicely.

If anyone out there has had similar experiences, please let me know. I'm in the process of rewriting this module so any help/suggestions would be much appreciated!

Thanks!

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core