Steps to reproduce:
1) In Admin/Structure/Block page Enable a block to some region
2) Configure the block as user customizable with default as visible
3) Block is visible at the specified region
4) In the user account settings edit page, the customizable block is set as a checkbox option under Personalize Block
5) Uncheck the checkbox and save
6) There is a message saying "The changes have been saved." But, if you scroll down the checkbox is still checked
7) The block is still visible.

Same behavior applies if the customizable block is hidden by default

Comments

sebyoga’s picture

Assigned: Unassigned » sebyoga
Status: Active » Needs review

Hello,

I can't reproduce this bug. Can you check with the Drupal-alpha7 version ?

Best regards,

Sebastien

grendzy’s picture

Status: Needs review » Postponed (maintainer needs more info)

setting correct status - "needs review" indicates a patch has been written.

sebyoga’s picture

Ok,

I set status to "needs review" when the patch has been written.

rayasa’s picture

Status: Postponed (maintainer needs more info) » Active

Tried this on the latest 7.x.dev. The problem can reproduced by following the steps in the description.

tofuComputer’s picture

I have throughly tested this issue and am able to reproduce it every time. Drupal doesn't throw and error, it simply goes passive-agressive on you - refreshes but no changes.

webchick’s picture

Issue tags: +Needs tests

Sounds like we need some tests for block customization. :)

bspellmeyer’s picture

Status: Active » Needs review
StatusFileSize
new1.68 KB

Currently the custom block visibility settings are supposed to be in $user->block, but there is no logic implemented to save or retrieve these settings.

The attached patch saves the block visibility settings into the serialized default variable $user->data['block‘]. I've grepped the drupal source for any occurrences of $user->block or $account->block and replaced them with the according $user->data['block'] / $account->data['block‘].

No tests were added so far.

This is my first core patch so feel free to rip it apart ;)

webchick’s picture

Actually that looks pretty good! :)

Though I'm confused, because I thought we ripped out users.data at some point. Hm.

bspellmeyer, if you want to try your hand at writing an automated test for this, feel free to join IRC and ask around in #drupal-contribute for pointers.

bspellmeyer’s picture

StatusFileSize
new2.47 KB

Well, here goes my first automated test. Patch + tests pass locally

Status: Needs review » Needs work

The last submitted patch, block-911290-test.patch, failed testing.

bspellmeyer’s picture

Status: Needs work » Needs review
StatusFileSize
new4.15 KB

Merged above patches into the attached patch.

ygerasimov’s picture

Status: Needs review » Reviewed & tested by the community

Patch and test #11 works nice with me.

tom_o_t’s picture

#11: block-911290-2.patch queued for re-testing.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks, and thanks for the tests! :)

Status: Fixed » Closed (fixed)
Issue tags: -Needs tests

Automatically closed -- issue fixed for 2 weeks with no activity.