Download & Extend

CSS Class Definition on "Add Block" page

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

Assigned to:Anonymous» Shannon Lucas

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

Version:6.x-1.1» 6.x-1.x-dev

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

Status:active» fixed

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

Status:fixed» active

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

Status:active» needs review

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.

AttachmentSize
block_class-410554.patch 860 bytes

#7

Patch in #6 works, thanks.

#8

Status:needs review» reviewed & tested by the community

Patch in #6 works for me too. Thanks.

#9

Assigned to:Shannon Lucas» Anonymous
Status:reviewed & tested by the community» needs review

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

Component:User interface» Code
Category:support request» bug report

#14

Status:needs review» closed (fixed)

I think delta is not the delta as found in the blocks table, but simply bid. That works for me. Fix committed.

nobody click here