After enabling the Bean All module, most of my blocks cannot be put into visible regions, they move to the disabled area upon saving. After disabling the Bean All module, everything works fine. I should mention that I have the Menu Block module installed.

Files: 
CommentFileSizeAuthor
#22 bean-1912354-bean-all-destructively-removes-blocks.patch1.41 KBcalebtr
PASSED: [[SimpleTest]]: [MySQL] 98 pass(es).
[ View ]
#19 remove-bean-all.patch7.9 KBstefan.r
PASSED: [[SimpleTest]]: [MySQL] 98 pass(es).
[ View ]
#19 bean-all-warning.patch437 bytesstefan.r
PASSED: [[SimpleTest]]: [MySQL] 98 pass(es).
[ View ]

Comments

indytechcook’s picture

Status:Active» Closed (works as designed)

The bean all module takes over all of the other blocks. This is by design. You now create beans. Though, some of the logic/settings to not work quite well yet so I wouldn't use bean_all with more complicated blocks.

T-lo’s picture

Component:User interface» Documentation
Category:bug» task
Status:Closed (works as designed)» Active

This came as quite a shock when we enabled it on a site we already had a lot of regular blocks on, as it moved them all to disabled.

I'd suggest a warning on the module install page or at least in the README file, I've opened this again as a documentation issue and can write these and add a patch next week.

indytechcook’s picture

Yeah, the bean module isn't in great shape. I almost think it should be pulled for now.

Aimee Degnan’s picture

This is a really invasive feature (although a neat vision for the future). Please add a warning on the module page - this was quite an alarming "feature" to have to troubleshoot and could have saved a bunch of time in our dev process if we knew to avoid it. Bean (not all) is awesome , continue the good work!

DamienMcKenna’s picture

Version:7.x-1.0» 7.x-1.x-dev
Priority:Normal» Major

Agreed, this should be improved pretty urgently.

DamienMcKenna’s picture

Agreed, this should be improved pretty urgently.

T-lo’s picture

Are we happy with documentation and text on the add module page?
I can make a patch tomorrow.

nicholas.alipaz’s picture

+1 for adding a message in the Beans All module description and potentially making a warning during enabling. Otherwise, do not perform any destructive tasks on enabling and instead have a drupal_set_message() that nags the admin saying something like, "Beans All module wants to remove blocks from some regions, to use all of the features please *perform the rebuild*. WARNING: This cannot be undone."

This would allow users to get out of the destructive tasks if they didn't read docs or didn't understand what the module was going to do. I think my above message idea might need some better wording however.

Aimee Degnan’s picture

Thank you! The update to the documentation with super clarity and known impact is great! I attempt to RTFM most everything, this one slipped past me. Thank you again!

kscheirer’s picture

Ouch - yeah, maybe this module should not be included in the bean suite for a while - that's pretty destructive to set all blocks to disabled even after uninstalling bean all.

rashidkhan’s picture

Issue summary:View changes

The solution is to use context module. Then you can use the bean module and also put the blocks wherever you want. It gives you control to put a global settings such as displaying the menus at the top or to use specific blocks on specific pages.
I had the same problem and context solved it.

https://drupal.org/project/context

nicholas.alipaz’s picture

Title:Bean all module not allowing other blocks to be moved.» Bean all module destructively removes all non-bean blocks from regions without warning!

I wouldn't say that is a solution, as this module is not dependent on context. That is only an alternative for those whom might like to use both bean and non-bean blocks and turn on bean all. The main issue here is that this module is destructive in how it removes all blocks from all regions without warning. On an existing site this could completely break a lot of things.

Changing the title to better reflect the issue at hand.

kscheirer’s picture

Status:Active» Needs work

There seems to be agreement on this issue, does it just need attention from a maintainer?

nicholas.alipaz’s picture

@kscheirer, I say yes and would like to quote my post in #8:

+1 for adding a message in the Beans All module description and potentially making a warning during enabling. Otherwise, do not perform any destructive tasks on enabling and instead have a drupal_set_message() that nags the admin saying something like, "Beans All module wants to remove blocks from some regions, to use all of the features please *perform the rebuild*. WARNING: This cannot be undone."

This would allow users to get out of the destructive tasks if they didn't read docs or didn't understand what the module was going to do. I think my above message idea might need some better wording however.

rashidkhan’s picture

@nicholas, I'm not saying that this is the fix to the problem. but at least if you need both of them to use then this is the best module in this scenario.

jarco’s picture

Well ...this just totally ruined my day.

kscheirer’s picture

Priority:Major» Critical

Coming up on 2 years and still ruining people's day, sorry jarco.

frob’s picture

yeah, just hit this.

stefan.r’s picture

Status:Needs work» Needs review
StatusFileSize
new437 bytes
PASSED: [[SimpleTest]]: [MySQL] 98 pass(es).
[ View ]
new7.9 KB
PASSED: [[SimpleTest]]: [MySQL] 98 pass(es).
[ View ]

Please can either of these patches be committed? One removes the bean_all module, the other adds a warning.

frob’s picture

Status:Needs review» Active

I do not agree that the bean all module should be completely removed.

I do think it needs a warning, probably something more than even what is in the patch.

"WARNING: Enabling this module will mean some existing blocks will be removed from their regions!"

How about

WARNING: Enabling this module will mean any existing non-bean blocks will be removed from their regions! This module will cause side effects, do not enable on production without first testing in development.

This is a case that I think it should be more scary.

gausarts’s picture

Perhaps a shorter sentence will be more eye catching ;)

"WARNING: Enabling this module will remove existing blocks from their regions!"

calebtr’s picture

Status:Active» Needs review
StatusFileSize
new1.41 KB
PASSED: [[SimpleTest]]: [MySQL] 98 pass(es).
[ View ]

Here is a stab at actually fixing this problem. If anyone is actually using this module for something, I'm really curious about it.

The way I understand it, Bean All filters blocks by looking at variables to see which are "blacklisted". Blacklisted blocks make it through the filter and are available for Drupal to render, depending on the block's region setting per theme.

Previously, only three blocks were getting blacklisted, all from the system module, with the deltas 'main', 'powered-by' and 'help'. This results in all blocks appearing to be disabled except for these three blocks, whether they were previously enabled or not.

To fix this, on install, find out which blocks are actually enabled, and blacklist those. These blocks will now be returned when Bean All filters blocks.

In my local environment, the patch is successful on install in that it doesn't disable all your existing blocks. It doesn't address the other problem noted by the original poster, that you can no longer manage blocks.

As the module maintainer put it somewhat recently at #2347097: What does Bean All do?, Bean All is "an experiment" and "obviously isn't ready for live use." I think Bean All is very far from what it is intended to do, to turn all blocks into entities.

I wanted to dig and find out what was going on, hence the patch, but my vote is for stefan.r's remove-bean-all patch.

Lets move Bean All into a sandbox, build it until it works, and save everyone the headaches.

yareckon’s picture

Please remove bean all from the main module. I am spending my morning trying to figure out how to prevent anyone from enabling it and breaking their site. The main bean module on the other hand is really useful.

yareckon’s picture

Hook system info alter to the rescue! Add this to a custom no_bean_all module, and you can enjoy bean module without living in fear that one day your blocks will all vanish with the click of a mouse.

/**
* keep bean_all module from being enabled
*/
function no_bean_all_system_info_alter(&$info, $file, $type) {
  if ($file->name == "bean_all") {
    $info['dependencies'][] = 'do_not_activate_bean_all';
  }
}
T-lo’s picture

Status:Needs review» Reviewed & tested by the community

Given the comments in https://www.drupal.org/node/2347097 that Bean All "obviously isn't ready for live use.", I'd like to second applying stefan.r's remove-bean-all.patch

Removing the Bean All module is currently the only solution to using the Bean module on production sites.

Development of the Bean All module can then continue in a sandbox module.

nicholas.alipaz’s picture

I second T-lo's suggestion based on the linked comment.

indytechcook’s picture

Status:Reviewed & tested by the community» Fixed
nicholas.alipaz’s picture

Hurray indytechcook! Nice to know that no new releases will contain the module.

Status:Fixed» Closed (fixed)

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