Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When you go through the "Add box" flow, the additional_classes
value is not saved because it doesn't exist as a default option in class boxes_simple.
However, when you go to edit that same box, it is saved because there is code in the module that takes care of this setting.
The proposed fix simply adds additional_classes
as a default option in boxes_simple
.
EDIT Realized there are other ways to fix this. In addition to the above, you could:
1) handle the setting internally in class boxes_box::factory, or
2) add the default option in class boxes_box via options_defaults() or similar.
Comment | File | Size | Author |
---|---|---|---|
#2 | boxes-box_add_form_submit-2226125-2.patch | 658 bytes | jacktonkin |
additional_classes_not_saved_when_adding_box.patch | 968 bytes | favrik | |
Comments
Comment #1
favrik CreditAttribution: favrik commentedComment #2
jacktonkin CreditAttribution: jacktonkin commentedIt turns out that boxes are being built and saved twice in
boxes_box_form_submit
andboxes_add_form_submit
.The first of these handles
additional_classes
and also calls theoptions_submit()
method, so the attached patch reduces the second to: