Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have 2 contexts created:
global (Condition: Sitewide | Reaction: Main Menu Block in Header)
front (Condition: Path: | Reaction: Adds various blocks to regions)
Now when you update the 'front' context with the context editor/admin and click done->save changes, the global and front contexts both get saved and the 'main menu' block disappears. This does not occur when using the structure -> context administration pages, only with the drag and drop context editor UI.
Comment | File | Size | Author |
---|---|---|---|
#10 | 996426.patch | 883 bytes | e2thex |
#10 | 996426-make.patch | 879 bytes | e2thex |
#8 | empty_blocks_disappear_using_inline_context_editor-996426-8.patch | 650 bytes | Jon_B |
#6 | empty_blocks_disappear_using_inline_context_editor-996462-6.patch | 2.59 KB | tekante |
#4 | empty_blocks_disappear_using_inline_context_editor-996462-4.patch | 2.55 KB | tekante |
Comments
Comment #1
michaellander CreditAttribution: michaellander commentedThe title of this might not be the best, though I don't believe I can edit it. I don't think it has anything to do with the 'sitewide' condition, but rather the context editor incorrectly removes blocks from other active contexts when you go to 'save changes'.
Comment #2
loze CreditAttribution: loze commentedI am experiencing similar behavior. I too thought it was 'sitewide' contexts at first.
I realized that if a block does not output the $block->content variable in the block theme, context editor will ignore the block. Context editor injects some html into this variable that allows it to work with the editor js. If its not in there, it thinks it's an empty block and removes it from the context when you save.
It looks likes the context editor also needs the blocks default id "block-[module]-[delta]" if that is changed, context editor will also ignore the block.
In my case I was excluding the $block->content output and adding content to the block template for some block overrides. These blocks disappeared when i clicked save in the context editor.
Comment #3
loze CreditAttribution: loze commentedComment #4
tekante CreditAttribution: tekante commentedAttached is a patch which should ensure blocks are not empty if the inline editor appears on the page and which should result in blocks being correctly saved. @loze - there are some items added to the content of a block that the editor hooks into so I'm not sure this path will resolve the issue if you are ignoring the content output.
Comment #5
febbraro CreditAttribution: febbraro commentedI think something might be wrong with the patch.
Looks like some testing code is still in there?
Comment #6
tekante CreditAttribution: tekante commentedThat's the initialization of the value to explicitly indicate the context_ui editor is deemed not present by default. I see that is better done during the call to drupal_static. Reroll attached using new git patching steps.
Comment #7
febbraro CreditAttribution: febbraro commentedNice, thanks for the debugging tekante.
Commited: http://drupalcode.org/project/context.git/commit/3007df8
Comment #8
Jon_B CreditAttribution: Jon_B commentedThe problem isn't quite sorted - it doesn't quite fix the issue for menu blocks. I've created a patch that sorts this problem out.
Comment #9
Jon_B CreditAttribution: Jon_B commentedSorry people, that patch was for 7.x-3.x-dev.
Comment #10
e2thex CreditAttribution: e2thex commentedI do not think checking #markup will do we need to see what happens if we render it before we check #markeup
Comment #11
fuzzy76 CreditAttribution: fuzzy76 commentedI am experiencing something very similar to this on D6. Is it possible that this bug also exists there?
Comment #12
fuzzy76 CreditAttribution: fuzzy76 commentedThis is definitely present in 6.x. We use an OpenAtrium-like setup, and our OG's comes with two blocks enabled by default. One is an activity stream, the other is an info block for general description. The info block is empty at first (the administrator needs to write the text for it). If I delete the activity stream block before writing content for the info block, both blocks are removed.
Comment #13
bnash2501 CreditAttribution: bnash2501 commentedIs anyone able to reproduce this in D7 with the latest version of Context and Blocks?
I attempted to reproduce this using the latest of both (tried both dev and beta version of context) and in both cases, the empty menu and blocks are able to be added via reactions and moved around by both the UI and normalm context editor.
If the issue present is in fact due to empty content, then the Boxes fixes ( #1394064: Allow for inline editing of empty boxes and #1440178: Display empty block content for admins when title is marked as <none> ) should have fixed this issue.
Comment #14
Bibliotechie CreditAttribution: Bibliotechie commentedI'm using D7 and did an upgrade on 5/4. All seemed okay but then I noticed that Body and Description fields weren't appearing on edit screens. On 5/7, I found out that backup was unavailable due to backup machine failure on 5/6. Searched and found a solution: CKEditor configuration required selection of a toolbar. Problem solved. (I mention all this as it might be related to my current problem with my site. I don't know but don't want to leave out what might be important.)
Now, Context has started to malfunction. I had installed Context 7.x-1.9 during the upgrade so that may have affected it. I'm not sure.
Here's the problem: My front page context was partially completed and nodeblocks and custom buttons were on the front page. I tried to make a change to the context, and all of the Reactions I had set in the context disappeared when I clicked Save. I have tried rebuilding the context several times but saving is sporadic at best. Any time I try to move a nodeblock or add a nodeblock, all of the nodeblocks disappear from the front page and Reaction portion of the Context UI. I can still see my nodeblocks (and feeds, etc.) with their checkboxes on the right. But, it's as if I never added the Reaction(s). The Reactions disappear so my nodeblocks don't appear on my front page. Oddly, the Context path to the front page portion selection of the context remains, that is it remains saved if I open or close the front page context.
I have searched drupal.org and other sites for answer. The Context behaviors described in this thread are the most similar I've come across so I thought I'd request help here.
Any suggestions?
Comment #15
tekante CreditAttribution: tekante commentedI posted a patch in #1076706: menu blocks is gone after saving an existing context comment 13 that may be of interest for those whom context is dropping blocks on when using the inline editor.
Comment #16
ianthomas_ukThis is a duplicate of http://drupal.org/node/751062