If the user is viewing a page with an active context that includes some blocks which are returning an empty result, then those blocks are removed from the context block reaction upon saving.
For example, if I have a block set on a context when viewing a news article, and in that context there's a block which will return null if the current news article has no comments. If the admin is viewing the news page with no comments (the block is returning null) and reorders the blocks, or adds a new block, upon saving the comments block will be gone completely from the context reaction.
I have not seen this behavior with the 6.x admin module & context UI editor.
Will try to write a patch later this weekend.
Comments
Comment #1
fearlsgroove commentedThanks for testing! This is indeed an issue, but looks like a context_ui issue. Admin exhibits the same symptoms. I tested by using the user login block. It appears when logged out, but as you describe if I edit that context when logged in and save, it removes that context since it's empty/not rendered in that context. THe same issue occurs when using both admin and the inline editor (which makes sense since they're both using the context UI form and JS behind the scenes).
Worthy of a fix but it should be against the context UI module, so reassigning
Comment #2
tekante commentedCan you replicate this issue against the latest dev version of context? I have tried with a custom block that returns both NULL from hook_block_view as well as a block with NULL content as well as content with an empty string and I am not able to replicate.
Comment #3
mrfelton commentedAre you using admin.module for the inline context editor? If so, please try with my patch from #751062: 'Context inline editor' causes blocks to disapear (comment 17) and the latest -dev of context where my patch from #1401964: Empty blocks are always show to admins when using the context inline editor has just been committed.
Comment #4
Anonymous (not verified) commentedThe issue has been resolved in the latest dev, thanks.
Comment #5
tekante commented@mrfelton - I am able to replicate this if using the admin module to access the inline editor, thanks for the pointer. Since you pointed to the open issue for that condition I'm going to mark this one as fixed as based on @kevee's report this particular problem related to using the inline editor within a region in the page which is now working.
Comment #6
fearlsgroove commentedStill not fixed with current dev unfortunately, when using either admin or context_inline_editor. The user login block works as an example. It's impossible to add the user login block when using context inline editor and logged in.
Comment #7
tekante commented@fearlsgroove - the issue with context inline editor not working when used from within the admin module is being worked at #751062: 'Context inline editor' causes blocks to disapear. Please only reopen this issue if you are having trouble using the inline editor when it is placed in a region on the page.