Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
It would be useful for BEANs to have a state property so they can be inactive/disabled/unpublished/hidden (I don't care about the name). When a bean is inactive state bean_block_view() would return NULL and the bean wouldn't render. In a later phase permissions could be added "View inactive beans" which would be similar to the core node "view unpublished content" permission.
I'm happy to hack on this if people think it is worthwhile.
Comment | File | Size | Author |
---|---|---|---|
#13 | 1874544-13-bean-status-property.patch | 11.19 KB | Feng-Shui |
Comments
Comment #1
indytechcook CreditAttribution: indytechcook commentedThis does sound worthwhile for me. I've been thinking about this for the 2.x version. We need to make sure to make all of the current beans active in an update hook.
Comment #2
skwashd CreditAttribution: skwashd commentedI'll look at implementing this.
Comment #3
saltednut@skwashed are you still working on this?
Comment #4
Samvel CreditAttribution: Samvel commentedHi Guys, created module with property status https://drupal.org/project/bean_status
Comment #5
skwashd CreditAttribution: skwashd commented@brantwynn not right now. I have been working on other priorities.
Comment #6
Feng-Shui CreditAttribution: Feng-Shui commentedThe attached patch is an initial pass at adding a status (published/unpublished) property to Beans. It contains:
Happy to look at any changes to this patch in order to progress this issue, I need this feature on a site so will be running this patch.
Comment #8
Feng-Shui CreditAttribution: Feng-Shui commentedFix issue with the paths in the patch...
Comment #10
Feng-Shui CreditAttribution: Feng-Shui commentedffs...
Comment #11
Feng-Shui CreditAttribution: Feng-Shui commentedComment #13
Feng-Shui CreditAttribution: Feng-Shui commentedComment #15
Feng-Shui CreditAttribution: Feng-Shui commentedWell that's interesting. uuid.test (line 13) is using a PHP trait so this patch needs to be tested against PHP 5.4. Re-queueing for PHP 5.4.
See https://www.drupal.org/node/2763727
Comment #16
Feng-Shui CreditAttribution: Feng-Shui commentedComment #17
skwashd CreditAttribution: skwashd at Dave Hall Consulting for Pfizer, Inc. commentedI've updated the project config to test with PHP 5.4 and 5.6.
Comment #18
Feng-Shui CreditAttribution: Feng-Shui commentedThanks Dave. I've got to do a bit more testing on this patch (and the other three patches that it'll be running with), but what are the next steps for this issue? Are you keen on seeing this go into the module, and if so, do you have any concerns or additional testing that you want written?
Comment #19
DamienMcKennaGiven there's already the Bean Status module, why bother adding this to the Bean module itself? Would it not be better to promote Bean Status as the recommended solution for this?
Comment #20
Feng-Shui CreditAttribution: Feng-Shui commentedA couple of reasons:
Comment #21
Feng-Shui CreditAttribution: Feng-Shui commentedFYI, there is some complexity around the installation of this patch. As the code in the patch relies on a db update hook, there can be situations where a WSOD appears if the update hook is not run before beans are loaded. We're currently looking at a two phase release, first release to push the database update, and the second release to push the code.
Given the above, the comments by @DamienMcKenna, and the fact that it doesn't look like this is going to get much traction, we're going to look at patching the Bean Status module with Views support and a few other things that we need or running this as a local patch with the anticipation that this will not get into a Bean release.
I'm not going to close this issue, as it's not mine, but I'm going to set the status to needs work.