Closed (fixed)
Project:
Drupal core
Version:
4.6.0
Component:
block.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2004 at 12:21 UTC
Updated:
12 Oct 2005 at 22:20 UTC
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
Comment #1
eldarin commentedSince 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.
Comment #2
eldarin commentedAnother 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
Comment #3
Bèr Kessels commentedNeill Drumm fixed nearly all of the block issues, including this one. PLease re-open if you disagree.
Comment #4
(not verified) commentedComment #5
kbahey commentedThis 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.Comment #6
Mack Oberman commentedI 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.
Comment #7
m3avrck commentedAny 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 :)
Comment #8
killes@www.drop.org commentedThe status continues to be "nobody cared enough to send a patch".
Comment #9
m3avrck commentedWell 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.
Comment #10
killes@www.drop.org commentedFixed in head.
Comment #11
(not verified) commentedComment #12
(not verified) commentedComment #13
(not verified) commentedComment #14
robertgarrigos commentedmmmmm 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?
Comment #15
Uwe Hermann commented"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.
Comment #16
tostinni commentedShould this be fixed for 4.6.x ?
It involves a DB patch to delete the uniqueness of this column.
Comment #17
(not verified) commentedComment #18
(not verified) commentedComment #19
(not verified) commented