When viewing uploaded files through the Thumbnails Plus tab, no matter which folder I select it always defaults back to the Media Root folder and displays its contents. I cannot see the content and subfolders of other folders.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

das-peter’s picture

Status: Active » Postponed (maintainer needs more info)

Please provided detail information:

  • Drupal version
  • Enabled modules and their versions
  • Used theme and its version
  • Cache settings admin/config/development/performance
    • Are caches enabled
    • Is the JavaScript or CSS aggregation enabled
  • Operation system and its version
  • Used browser
    • Version
    • Operation system and its version
    • Script error messages or console output

It's always a good idea to do complete cache flush: drush cc all or use admin/config/development/performance

plinto’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry about that:

Drupal version: 7.22
File Entity: 7.x-2.0-unstable7
Media: 7.x-2.0-unstable7
Theme: Adaptive Themes 7.x-3.1
I tried in Chrome (26) and Firefox (20) and got the same error
I only have js aggregation enabled.

I do not get any error messages,
I am also using jQuery Update and have 1.8 selected. I tried with 1.5 and nothing changed.
I checked the firebug console to see if there were any errors but there are none.
All caches were cleared.

plinto’s picture

Status: Postponed (maintainer needs more info) » Active
das-peter’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks for the details.

File Entity: 7.x-2.0-unstable7

We just figured out that the latest dev (>2012-11-21 13:00).
I've added the dependency to the list in the release notes.
Doesn't sound very likely but could be an issue.

I tried in Chrome (26) and Firefox (20) and got the same error

Tested with Chrome (26), FF nightly (23.0a1) and IE (10) on Win8 64x - no errors.

I only have js aggregation enabled.

That was a candidate as a cause - unfortunately it works for me even with aggregation enabled.

I am also using jQuery Update and have 1.8 selected. I tried with 1.5 and nothing changed.

Before writing my initial feedback I thought that could be the issue - I've the module enabled as well. But I couldn't reproduce any error with changing the version, even with the module disabled.

I do not get any error messages,
I checked the firebug console to see if there were any errors but there are none.
All caches were cleared.

That's unfortunate, because now I've not really a clue what else could be wrong :|

plinto’s picture

Status: Active » Closed (fixed)

I was using upper-case letters and spaces in my taxonomy terms for Media Folders. I renamed the terms by lower-casing everything and replacing spaces with dashes, and now I can browse through all folders.

edit: Now that I remember, I also updated my jquery_update to the latest dev (7.x-2.3+4-dev). Not sure if it was this update or the folder renaming but it is working

bohemier’s picture

Issue summary: View changes
Status: Closed (fixed) » Active
Issue tags: +ui

Reopening this as I am getting the same behavior but the cause might be different. It happens when navigating MBP under a localized url (ex: /fr/admin/content/file or editing a media field under such an url ex: /fr/node/12/edit). Reverting to the english version of the url (ex: /en/admin/content/file) makes MBP behave correctly. Moreover, I am getting "An illegal choice has been detected...." message when refreshing the page after trying to select a folder, i.e.:

  1. Visit Thumbnails Plus tab at /fr/admin/content/file
  2. Select a sub folder under Media Root
  3. Watch MBP revert back to the Media Root
  4. Refresh the page, see the message "Un choix interdit a été détecté. Veuillez contacter l'administrateur du site." which is the french translation of "An illegal choice has been detected. Please contact the site administrator."

This seems to be caused by the media_browser_plus_folders view, more specifically the media_browser_plus_views_handler_area_navigation.inc function exposed_form. As suggested in http://drupal.stackexchange.com/questions/96669/how-to-avoid-an-illegal-... , setting Validated to True partly solves the problem

    $form['mbp_current_folder'] = array(
      '#type' => 'select',
      '#title' => t('Folder'),
-->'#validated' => TRUE,
      '#default_value' => $default_folder,
      '#options' => $folder_options,
      '#attributes' => array(
        'class' => array('mbp-selected-folder'),
      ),
    );

The first selection will be successful although the folder will not be selected properly. Subsequent selections will not work. Some more research needs to be done... I'll keep this post updated with my findings.

My setup:

  • Drupal: 7.38
  • Media: 7.x-2.0-alpha4
  • File Entity: 7.x-2.0-beta1
  • MBP: 7.x-3.0-beta3
  • jQuery Update: 7.x-3.0-alpha2
  • Theme: Radix / Bootstrap sub theme
  • Admin theme: Adminimal or Seven replicated the problem
  • jQuery: tried 1.5 / 1.9 / 1.11 / 2.1
  • No cache / no aggregation
  • Taxonomy terms are all lowercase, no accents or space
  • Chrome 43 mac / Firefox Aurora 41 mac
bohemier’s picture

... more research reveals that taxonomy_get_tree() called in exposed_form() returns null when called on the french site.
$folders = taxonomy_get_tree($root_folder->vid, $root_folder->tid);
Strange... The Media Folders taxonomy is not localized (No multilingual options for terms). Perhaps this is related to entity translation which I have enabled.

bohemier’s picture

Status: Active » Needs review
FileSize
1.21 KB

Found a solution... the call to taxonomy_get_tree() returns an empty tree if called with specifying the prent TID... I don't know why but in this case it seems useless to specify the parent TID since it will always take the root TID... Unless there's something I didn't see. Here's a patch to fix this.

Status: Needs review » Needs work
mmelkhatib’s picture

I am running into the same issue with the Media Folders. Bohemier, I applied your patch but the bug is still present. If anyone has a workaround I am all ears!

gfed’s picture

Having the same issue, the patch failed to apply, though the suggested solution did fix the problem for me. This patch does the same thing but applies cleanly against latest dev version (rev 0025c8edbfa338c3ec70de4f5e95feaca07ef5c4)

bohemier’s picture

Thanks gfed. mmelkhatib I also remember having some problems with i18n/entity translation of the MBP taxonomy... can't remember exactly but it might help you to know...