As reported here, when you create a block with no title and then want to create another one with no title, you get an error. The title seems to be used as the key in the DB.

This is a general problem, it prevents you to have two blocks with the same name, which is not good. A better solution is to use some other unique key instead of the title, IMHO.

Comments

eldarin’s picture

Since almost everything are nodes with node-ids, couldn't blocks be referenced into the same id-regime but still have definitions in blocks-table ? Perhaps some "special information" in node table can make it reference to ID in blocks-table. That way one wouldn't need to have an extra table for all types of merged id's for possible other special-case IDs like blocks.

Blocks are "dynamic content" nodes when looking at it, no ?
Using the "nid" auto_increment PK also to reference blocks - then duplicating the PK value to a indexed blocks nid field, just like it's done with page, book, comments tables ...

The same goes for (at least) the aggregator_item table.

Having all the great comment, access, roles, voting etc. functionalities propagate throughout *TRULY ALL* content would make things a lot easier to manage for site administrators.

I.e imagine promoting an aggregated item to front page etc.

eldarin’s picture

Another related discussion on what I proposed and propagating the current node-functionality into *ABSOLUTELY ALL CONTENT* using taxonomy terms for permissable, deniable role/user/group actions. I propose using taxonomy terms and relations for the role-user-group entity as well as a new actions entity. Actions could be access, read, edit, display, bookmark and so on - with further actions added by modules as needed - or managed by site administrators (multi-level introduction to complexity - see the related discussion/post linked at end of comment).

The finest grain control as the common link

Bèr Kessels’s picture

Neill Drumm fixed nearly all of the block issues, including this one. PLease re-open if you disagree.

Anonymous’s picture

kbahey’s picture

Version: » 4.6.0

This has not been fixed in today's release of 4.6.

It is still an issue. If two blocks have a blank title, then attempting to save the second one will result in an error:

user error: Duplicate entry '' for key 2

The workaround here http://drupal.org/node/17170 is misleading. It does not work. In Pushbutton, the <!-- block title --> is shown as it is, and is not invisible.

Mack Oberman’s picture

I can corroborate that this is still broken.

In 4.5.2 and earlier, you could use an HTML comment as the title to work around this issue. In 4.6, this shows up as a block with <!--title--> as its title, which is new, undocumented behavior. If I could use blank titles, it would be fine, but I can't because of the uniqueness constraint.

This and the broken DB upgrade scripts are going to keep me with 4.5.2, sadly.

m3avrck’s picture

Any status on this? Seems like this bug should be fixed by the next release.

Why not change the database so the key isn't only the title, but the primary key is (title,timestamp) ... that would guarantee unqiueness, and any block could have an title. Seems easy enough :)

killes@www.drop.org’s picture

Version: 4.6.0 »

The status continues to be "nobody cared enough to send a patch".

m3avrck’s picture

Well if it is a database change, how do you send a patch? Sorry completely new to this patching thing, not a *nix guy :-D But if just changing the key from (title) to (title,timestamp) works, should take someone 2 seconds to patch. If my thinking is correct.

killes@www.drop.org’s picture

Fixed in head.

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

robertgarrigos’s picture

Version: » 4.6.0

mmmmm just upgraded to 4.6.3, released on August 15th, and looks like this hasn't been fixed yet, eventhough it was fixed in head on June 25th. Is that right?

Uwe Hermann’s picture

"Fixed in head" means it's fixed in the CVS version (the future Drupal 4.7), not necessarily in 4.6. I tested this right now in HEAD, and it works. I guess it didn't get fixed in 4.6.

tostinni’s picture

Should this be fixed for 4.6.x ?
It involves a DB patch to delete the uniqueness of this column.

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)