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.
Pretty sure this set of changes allowed me to pass empty optional contexts to context views so that a single view could be used as a context and optionally consume taxonomy term or user id and provide appropriate blogs for that. Very useful. Apparently there was some sort of bug in the uid argument when I did it as well.
Comment | File | Size | Author |
---|---|---|---|
#14 | ctools_1276000-14.patch | 3.4 KB | adityasingh |
#11 | 1276000-11.patch | 4.09 KB | shubham.prakash |
#6 | 1276000-6.patch | 4.09 KB | EclipseGc |
Issue fork ctools-1276000
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
EclipseGc CreditAttribution: EclipseGc commentedComment #2
EclipseGc CreditAttribution: EclipseGc commentedAn update to this. This should version of the patch will actually add a NULL spacer into the context where it should exist, so if a plugin takes 3 contexts, the first is required the next 2 are optional, and you only pass the second you'd still have a NULL context in place of the optional context you didn't pass. This allows modules like views to expect to get all the contexts they can address, and we rely on the argument handling to return the view properly at that point.
This will need some further testing, but I don't anticipate it causing issues for existing plugins.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedI believe this may be fixed by #1263896: "context exists" access plugin broken (patch) instead?
Comment #4
EclipseGc CreditAttribution: EclipseGc commentedThis patch is about allowing empty contexts to exist for views that take optional contexts. The other patch being present didn't seem to have any bearing on this as far as I could tell.
Eclipse
Comment #5
EclipseGc CreditAttribution: EclipseGc commentedRerolled against 7.x-1.x.
Comment #6
EclipseGc CreditAttribution: EclipseGc commentedThis is better, it actually works for NULL contexts that are the first argument.
Comment #7
DamienMcKennaComment #9
geek-merlinCrosslinking 2 other issues with nearly the same patch. We should really consolidate that.
Comment #10
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 6 year old patch in #6 does not apply to the latest ctools 7.x-1.x-dev.
Comment #11
shubham.prakash CreditAttribution: shubham.prakash at OpenSense Labs commentedComment #12
DamienMcKennaComment #13
joelpittetI committed #2399313: Relationship silently left out if it has optional required context so this needs another reroll. Also that might have helped solve part of what this patch is trying to do.
Comment #14
adityasingh CreditAttribution: adityasingh as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedReroll the patch.