Title: Selecting folder shows up plugin error
Last modified: August 21, 2016

---

# Selecting folder shows up plugin error

 *  [kehgreen](https://wordpress.org/support/users/kehgreen/)
 * (@kehgreen)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/)
 * I was wondering if you could help.
 * On selecting a folder to start organising media files a script error appears 
   to occur with the following displayed;
 * SyntaxError: JSON.parse: unexpected character
    Warning: array_key_exists() expects
   parameter 2 to be array, string given in /homepages/0/xxxxxx/xxxxx/xxxxx/wp-content/
   plugins/media-file-manager/media-relocator.php on line 211
 * Warning: array_key_exists() expects parameter 2 to be array, string given in /
   homepages/0/xxxxxx/xxxxx/xxxxx/wp-content/plugins/media-file-manager/media-relocator.
   php on line 211
 * Warning: array_key_exists() expects parameter 2 to be array, string given in /
   homepages/0/xxxxxx/xxxxx/xxxxx/wp-content/plugins/media-file-manager/media-relocator.
   php on line 211
 * Warning: array_key_exists() expects parameter 2 to be array, string given in /
   homepages/0/xxxxxx/xxxxx/xxxxx/wp-content/plugins/media-file-manager/media-relocator.
   php on line 211
 * Can you point out what needs to be changed to resolve this problem, as I cannot
   use Media File Manager.
 * [http://wordpress.org/extend/plugins/media-file-manager/](http://wordpress.org/extend/plugins/media-file-manager/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [niallolaoghaire](https://wordpress.org/support/users/niallolaoghaire/)
 * (@niallolaoghaire)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831919)
 * Hi
    I’m having the exact same problem. It’s only occurring on the latest monthly
   folder, I tried using Media File Manager Advanced & it throws up the same error.
   Turned off all other plugins & only using twenty-twelve & eleven themes – no 
   luck
 *  Plugin Author [aueda](https://wordpress.org/support/users/aueda/)
 * (@aueda)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831921)
 * Can you provide me a list of filenames in the problematic folder?
 *  Plugin Author [aueda](https://wordpress.org/support/users/aueda/)
 * (@aueda)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831924)
 * Would you please do the following test?
 * (1)Download the latest test version of plugin and install it:
    [http://tempspace.net/plugins/media-file-manager_test_130822.zip](http://tempspace.net/plugins/media-file-manager_test_130822.zip)
 * (2)Download the log file.
    (Settings -> Media-file-manager -> Download Log
 * (3)Send me the log file (orguezzr at gmail dot com)
 *  [Stef Dijkstra](https://wordpress.org/support/users/stef-dijkstra/)
 * (@stef-dijkstra)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831926)
 * Is this problem already solved? I’m having the same problem over here =(. I’m
   using WordPress version 3.6.1. by the way.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831927)
 * **[@stef](https://wordpress.org/support/users/stef/) Dijkstra**: As per the [Forum Welcome](http://codex.wordpress.org/Forum_Welcome#Where_To_Post),
   please [post your own topic](http://wordpress.org/support/plugin/media-file-manager#postform).
 *  Plugin Author [aueda](https://wordpress.org/support/users/aueda/)
 * (@aueda)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831928)
 * I understand that many people are struggling with this kind of problem, but I
   cannot reproduce the problem. If you’ll provide temporary account for me, I’ll
   be able to fix the problem relatively easily.
 *  [Stef Dijkstra](https://wordpress.org/support/users/stef-dijkstra/)
 * (@stef-dijkstra)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831929)
 * I’ve fixed the problem for myself. I’ve changed the $res variable on line 252.
 * I’ve changed the following code:
    $res = wp_get_attachment_metadata($dbres[0]-
   >post_id);
 * to:
    $res = array(wp_get_attachment_metadata($dbres[0]->post_id));
 * Now it works for me!
 *  [keconomos](https://wordpress.org/support/users/keconomos/)
 * (@keconomos)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831930)
 * Same problem- where are you changing the code on line 252:
 * from: $res = wp_get_attachment_metadata($dbres[0]->post_id);
    to: $res = array(
   wp_get_attachment_metadata($dbres[0]->post_id));
 * What file is it in – please
 *  [keconomos](https://wordpress.org/support/users/keconomos/)
 * (@keconomos)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831931)
 * Went to plugins- selected “Media File Manager” then edit.
 * did a find (ctrl F) searched for “wp_get_attachment”
 * added array( …………….);
 * and it goes.
 * This may happen particularly to people using a theme that generates multiple 
   resolutions of the same single media import (just a guess.)

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Selecting folder shows up plugin error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/media-file-manager.svg)
 * [Media File Manager](https://wordpress.org/plugins/media-file-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-file-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-file-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/media-file-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-file-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-file-manager/reviews/)

## Tags

 * [folder error](https://wordpress.org/support/topic-tag/folder-error/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * 9 replies
 * 6 participants
 * Last reply from: [keconomos](https://wordpress.org/support/users/keconomos/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/selecting-folder-shows-up-plugin-error/#post-3831931)
 * Status: not resolved