| Project: | Block Class |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi, I have been successfully using this module for a few days now in an edit capacity and I am very pleased with the results, it appears to be a very thorough and useful module. Unfortunately I just went to "add block" to create a new textual based block and the Block CSS textbox wasn't there for me to enter a class.
I presume this will be an easy fix to simply edit a different template file somewhere, unfortunately I'm having trouble locating it. If you could please point me in the right direction it would be much appreciated.
Keep up the good work, this is a stunning module for customizing a business website based upon easily interpretable classes, design for the dumbest user philosophy ;-)
Thanks
Dan
Comments
#1
DanMac: Thanks for the kind words. Can you test the following steps for me to see if you can make the text field appear?
(1) Click "Add Block"
(2) Add your new block as usual. When you save the block, you'll be returned to the main Blocks page.
(3) Click "Configure" next to the new block.
Do you see the Block Class text field here? If so, we neglected to add the field to the block creation form.
#2
This may be fixed in the patch supplied here: #478496: Legacy Drupal 5.x code and techniques in 6.x branch. The results of that patch have been committed to 6.x-1.x-dev.
#3
Pretty sure this was fixed as part of #478496: Legacy Drupal 5.x code and techniques in 6.x branch. Please reopen if this isn't the case.
#4
Whoops! Not yet fixed. Adding CSS classes to a new block during block creation doesn't stick. Only modifying exists blocks works properly.
#5
There is also a side effect where the class is already filled in on the add block form. The value is whatever was entered in during the last add block save.
This is because when block_class_form_submit() is called $form_state['values']['delta'] is null which is saved as "" in the table.
#6
Here's a patch against 6.x-1.x-dev HEAD
Any rows in block_class with an empty delta should be deleted to make sure the classes form field is emtpy on the add block form.
#7
Patch in #6 works, thanks.
#8
Patch in #6 works for me too. Thanks.
#9
This has been committed to 6.x-1.x-dev. Please help test!
#10
This will also need to be ported to the 7.x-1.x branch. I've created an issue here:
#1020794: Port "Add Block" CSS class definition patch to 7.x-1.x branch
#11
Tested and worked nicely. Thanks.
#12
Not for me. I created a new block, css class doesn't stick.
#13
#14
I think delta is not the delta as found in the blocks table, but simply bid. That works for me. Fix committed.