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

user error: Duplicate entry '' for key 3

user error: Duplicate entry '' for key 3
query: INSERT INTO boxes (title, body, info, format) VALUES  ('test', 'test', '', 1) in /XXXXX/XXXXX/public_html/cms/includes/database.mysql.inc on line 66.

warning: Cannot modify header information - headers already sent by (output started at /XXXXX/XXXXX/public_html/cms/includes/common.inc:384) in /XXXXX/XXXXX/public_html/cms/includes/common.inc on line 192.

hi,

i get this error when i want to add new blocks.

Old School Open Source - securesite.module

It's time for some old school open source! Here is the very basic source code to a securesite.module, the idea is to create a full module by the end of this thread.
And, yes, this is the $500 module mentioned elsewhere on the forum. I, personaly, don't think it's right to pay some volenteers to..um..volenteer. So, hence my idea for old school open source. (hey, if they still want to give away the money then get some t shirts to pass around :o)

Error handling and rollbacks in nodeapi and other hooks

The current design of nodeapi (or all hooks for that matter) is such that on an insert, first the node is created, then the hook_insert of the specific module is called and finally all the nodeapi hooks are called. Now, at present, hook_insert and hook_nodeapi implementations don't have a return value. This creates a problem in case a fatal error occurs. There is no way to immediately rollback the change or let node.module know that something went wrong. I ran into this during the development of http://www.ourmedia.org

When a user is uploading a video, there are several things that need to happen. The file needs to get uploaded, the metadata needs to get captured and validated and finally a seperate module (IA.module) needs to ftp the file to the Internet Archive. We do most of this weight lifting in hook_insert of the media modules. IA module does its work via nodeapi. Now, even if one of the steps fails - like the ftp failed, or metadata save failed (I agree this is very unlikely unless our database server is choked) the node gets created anyway. And worse, the user gets no indication of the same. So we end up with many 'zombie' nodes.

I discussed this briefly with Moshe as well. I have been thinking if it makes sense to have hook_insert and certain other hooks to return error codes. For example, if hook_insert fails, it could return a failure code. Similarly if one of the nodeapi calls failed, then subsequent calls can be halted. Or we could even rollback the created node. To take it to an extreme, there could be a hook_rollback as well which modules could implement. Then if a fatal error occurs, for each module whose hook_nodeapi was executed, the hook_rollback could also be called. This is similar to the standard C++ application programming paradigm of checking error codes on each call (if (HRESULT)...) and bailing out in case of an error.

about mod_rewrite rule: breaking 404 page access?

Hello,
I have found a disturbing problem with the default rule shipped in .htaccess located at the root of the Drupal script (which is my webspace root as well).

Here is the rule:

searching user profiles

Hiya guys,

Anyone sussed how to extend the search to index USER PROFILES?

Have searched high and low on here and haven't found any relevent postings.

Thanks in advance for any tips

Dublin Drupaller

Horizontal Login Block?

Dear Drupal.org,

I am trying to create a horizontal login for my Drupal powered website (v4.5.2).

The code to make your own login area is:

<?php
          if (empty($edit)) {
            $edit['destination'] = $_GET['q'];
          }
          // NOTE: special care needs to be taken because on pages with forms,
          // such as node and comment submission pages, the $edit variable
          // might already be set.

          $output .= form_hidden('destination', $edit['destination']);
          $output .= form_textfield(t('Username'), 'name', $edit['name'], 15, 64);
          $output .= form_password(t('Password'), 'pass', $pass, 15, 64);
          $output .= form_submit(t('Log in'));
          $output .= "</div>";

          $output  = form($output, 'post', url('user/login'));

        return $output;

?>

Which creates something extacly like the login block by default:

--------------------
|   [=======]    |
|                 |
|   [=======]    |
|                 |
--------------------

I would like to display this login block like:

-------------------------------------
|   [=======]    [=======]           |
-------------------------------------

Any tips?

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core