Problem/Motivation

As of #2571927: WYSIWYG Media Library No Files, the Media Browser will show files uploaded via the wysiwyg when the **Any** option is selected, but that is not the default behavior of Atrium's space reference plugin. Instead, it aims for the current space, which means WYSIWYG-uploaded content is not displayed. For sites that have "thinner walls" in their use of Atrium or make heavy use of the WYSIWYG media button, a way to sidestep this default would be helpful.

Proposed resolution

Add a new variable `oa_core_group_reference_default_current`, when it is explicitly FALSY it will cause views-based filters to default to Any.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grayside created an issue. See original summary.

Grayside’s picture

Issue summary: View changes
Status: Active » Needs review
Related issues: +#2571927: WYSIWYG Media Library No Files
FileSize
2.21 KB
Grayside’s picture

Adding a patch to Atrium profile to pull in the patch in #1.

mpotter’s picture

Status: Needs review » Needs work

The second part of this patch in #2 looks ok where you use oa_core_group_reference_default_current variable to set #convert_empty_to_current. However, earlier in the patch it looks like you are also using this variable to bypass any existing default setting in the view itself. That shouldn't be necessary and I think will cause regressions elsewhere in Atrium if this variable is set to true.

Was that extra step needed to get this working in the WYSIWYG?

Grayside’s picture

The functionality that uses #convert_empty_to_current only applies to views tagged 'admin'. Media views are not tagged admin.

I added the first change block to the views plugin rather than change oa_core_select2widget_entity_validate_field() to localize impact as much as possible.

mpotter’s picture

Status: Needs work » Fixed

OK, that makes sense. I'm going ahead with the commit on this then since sites need to explicitly change the variable to get this behavior.

A better long term solution is probably to add a plugin for Media Browser that shows "WYSIWYG Media" that has been embedded and doesn't belong to a space. Or maybe removing the Atrium customizations to the Library tab and creating a separate "Space Media" tab for Atrium. But those are larger issues than this, and don't want to block this one till then.

Committed to 130986a.

Status: Fixed » Closed (fixed)

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