Context auto-saved with reaction: blocks breaks block display

Created on 19 June 2023, about 1 year ago
Updated 19 September 2023, 9 months ago

Problem/Motivation

When a user create a context that reacts with blocks, and doesnt press "Save and continue", then no blocks (except content block) are displayed.

Using Drupal 10 and context rc-5.

Steps to reproduce

  1. Create a context (admin/structure/context/add)
  2. Press save (you are redirected to admin/structure/context/[context_name])
  3. Add reaction
  4. press Blocks
  5. Refresh the page (without pressing "save and continue")

Proposed resolution

I believe that the reaction should not be saved if you havent pressed the "Save" button.

Remaining tasks

Doing a patch

✨ Feature request
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands deneus18

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @deneus18
  • πŸ‡³πŸ‡±Netherlands deneus18
  • πŸ‡³πŸ‡±Netherlands deneus18
  • πŸ‡ΊπŸ‡ΈUnited States TolstoyDotCom L.A.

    I was able to duplicate the above. I also placed a block and then refreshed the page without pressing Save. The block was placed despite not pressing Save. Then, I removed the block and refreshed without pressing Save. The block was removed.

    Autosaving every change is probably not what the user expects. I'll look into this tomorrow unless someone else is working on it or likes things the way they are.

  • Status changed to Needs review 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States TolstoyDotCom L.A.
  • First commit to issue fork.
  • Status changed to Needs work 9 months ago
  • So this might be a bit more complex to fix than it looks in the first place. The problem comes down to ajax calls for adding conditions and reactions needing to save to a context entity so it correctly rebuilds the form. I'm looking into a solution that is not hacky.

  • Status changed to Active 9 months ago
  • I think I'll move this to a feature request because it changes the functionality of the module. And if someone thinks it would be useful they can implement it.

Production build 0.69.0 2024