Here is the steps to generate the issue
- Create a Container or Forum
- Select an existing template forum from Access control template selection
- Select two check box to use this template for future forum & container access control
"Remember this selection" & "Use the selected forum's settings as defaults for new forums and containers"
- Save the container
- While going to create a new Forum or Container template selection will be found there.
- Also all access control item will be selected based on template selection except two checkbox ("Remember this selection" & "Use the selected forum's settings as defaults for new forums and containers")
- Resulting while creating third item (either Forum or Container) template not selected.
- So we need to select this checkbox "Use the selected forum's settings as defaults for new forums and containers." each time we save a container & forum.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonline’s picture

Status: Active » Fixed

After some workaround I have found a solution

I have modified 188 number line from forum_access.admin.inc

'#default_value' => FALSE,

to

'#default_value' => !empty($template_tid),

This resolved the issue I have reported

salvis’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Fixed » Needs work

Thank you for your report and proposed fix. I'm able to reproduce the problem in D7. Apparently, this is a porting bug, and we don't have tests covering that functionality yet.

This code is a bit tricky and we need to nail down the expected behavior with tests before we touch it.

Anyone wants to provide a patch?

jonline’s picture

Here is the patch... Hope this patch will work as I am new in GIT and never create a patch before :)

salvis’s picture

Status: Needs work » Needs review

Thank you for the patch. Its form looks ok. When you post a patch, you can set the Status to NR and your patch will automatically be queued for testing by the testbot. This saves work for the maintainer and gives you some feedback pretty quickly.

Status: Needs review » Needs work

The last submitted patch, access_control_selection-2021149-1.patch, failed testing.

salvis’s picture

Aside from the patch not being applicable, we really do need tests for this functionality.

#3 would always set both checkboxes to be either both on or both off, which is falling short of what we want.

salvis’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)