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

Content Type access by Roles

Hi All,

I'd like to do what seems to be a basic operation. I have a user role named "news editor". Members of this role must have a full access on "news" content type (create/edit/delete), but nothing on the others.

So in 'Access Control', for the role 'news editor' I checked following options: access content, create news content, edit news content, edit own news content.

Form API

We create simple Drupal Form through the Form API. The form is rendered but when we submit the form the get the same page back. Nothing happens from the _submit() function. Our form is as follows:

function contactus_form() {
$form = array();

$form['contactus'] = array(
'#type' => 'fieldset',
'#title' => t('KEEP ME INFORMED'),
'#tree' => TRUE,
);
$form['email_address'] = array(
'#type' => 'textfield',
'#title' => t('Email Address'),
'#size' => 30,
'#maxlength' => 64,
'#description' => t('Some Description Goes Here'),
);

$form['submit'] = array('#type' => 'submit', '#value' => t('Submit'));

return $form;
}

function contactus_form_submit($form_id, $form_values) {
drupal_set_message (t('We did stuff.'));

print 'We did stuff';
WriteToFile('C:\File.txt','We did stuff');
}

function contactus_page() {
$output = drupal_get_form('contactus_form');

print $output;
}

contactus_page();

We have confirmed that the data from the form is POSTING correctly but drupal is redirecting using a 302 Moved Teporarily, so drupal appears to be doing nothing with the data sent. Is there something that must be "turned on" to get this to work.

Building search index from node with drupal_gotos in them

I've been working on finding the cause of a problem my site is showing when the cron job builds the search index. I've found the problem, but don't know how to fix it.

Briefly put, when the cron.php script is executed the node_update_index() function is called for each node. This in turn calls node_build_content() to get the text that has to be indexed by the code in the search module. If the node contains PHP code this gets executed, and if that code contains a drupal_goto() call it's followed. That means the cron.php script exits and the search index rebuild stops.

abstracting functionality out of taxonomy_save_term

Would anybody be open to incorporating a patch that would create separate functions in taxonomy.module for the database operations that need to occur when taxonomy_save_term is called. It seems to be currently designed so that the only way a term can be created is through a form (the parameter is even called $form_values). While this does still allow other modules to create terms it makes for unclean code. Plus taxonomy_save_term cannot return a new term id when a term is created.

site of drupal.org and api.drupal.org work very slowly

site of drupal.org and api.drupal.org work very slowly
it is necessary to do correct in the file system cache

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core