Title: SyntaxError: JSON.parse: unexpected character
Last modified: August 21, 2016

---

# SyntaxError: JSON.parse: unexpected character

 *  [99Dingos](https://wordpress.org/support/users/99dingos/)
 * (@99dingos)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/syntaxerror-jsonparse-unexpected-character-2/)
 * When I klick on Media Manager, I get the following error, and I have the same
   error showing up, when I am just on the dashboard:
    SyntaxError: JSON.parse: 
   unexpected character Notice: Use of undefined constant Mfma_rlMediaSelector –
   assumed ‘Mfma_rlMediaSelector’ in /var/www/web1351/html/wordpress/wp-content/
   plugins/media-file-manager-advanced/media-selector.php on line 430
 * Notice: Use of undefined constant PLUGIN_VERSION – assumed ‘PLUGIN_VERSION’ in/
   var/www/web1351/html/wordpress/wp-content/plugins/media-file-manager-advanced/
   media-relocator.php on line 33
 * Notice: Use of undefined constant PLUGIN_VERSION – assumed ‘PLUGIN_VERSION’ in/
   var/www/web1351/html/wordpress/wp-content/plugins/media-file-manager-advanced/
   media-relocator.php on line 34
 * Notice: Use of undefined constant mfma_relocator_dircmp – assumed ‘mfma_relocator_dircmp’
   in /var/www/web1351/html/wordpress/wp-content/plugins/media-file-manager-advanced/
   media-relocator.php on line 223
    [{“ids”:0,”name”:”2013″,”isdir”:1,”isemptydir”:
   0,”isthumb”:0,”norename”:0,”thumbnail_url”:”http:\/\/test.cchr.at\/wp-content\/
   plugins\/media-file-manager-advanced\/images\/dir.png”},{“ids”:1,”name”:”2014″,”
   isdir”:1,”isemptydir”:0,”isthumb”:0,”norename”:0,”thumbnail_url”:”http:\/\/test.
   cchr.at\/wp-content\/plugins\/media-file-manager-advanced\/images\/dir.png”}]
 * [https://wordpress.org/plugins/media-file-manager-advanced/](https://wordpress.org/plugins/media-file-manager-advanced/)

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

 *  Plugin Author [Zefta](https://wordpress.org/support/users/zefta/)
 * (@zefta)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/syntaxerror-jsonparse-unexpected-character-2/#post-4836052)
 * Hello,
 * Thanks for reporting this issue.
 * You can add in the file media-relocator.php line 24
 *     ```
       function plugin_get_version() {
       	if ( ! function_exists( 'get_plugins' ) )
       		require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
       	$plugin_folder = get_plugins( '/' . plugin_basename( dirname( __FILE__ ) ) );
       	$plugin_file = basename( ( __FILE__ ) );
       	return $plugin_folder[$plugin_file]['Version'];
       }
       ```
   
 * Then use plugin_get_version() instead of PLUGIN_VERSION.
    Lines 33 and 34.
 * Tell me if it solved the issue because i can’t reproduce it on my local.
 * Then i will push it to next version.
 *  Thread Starter [99Dingos](https://wordpress.org/support/users/99dingos/)
 * (@99dingos)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/syntaxerror-jsonparse-unexpected-character-2/#post-4836194)
 * Dear Zefta, my problem is, I have no clue about php. So I tried to find the right
   lines. I don’t know IF I chose the right code.
    IF I did so – it seemed not to
   work out as I get **Syntax error unexpected ‘&’, expecting ‘]’**. I made screenshots–
   can I send them to you somehow? kind regards Birgit
 *  Thread Starter [99Dingos](https://wordpress.org/support/users/99dingos/)
 * (@99dingos)
 * [12 years ago](https://wordpress.org/support/topic/syntaxerror-jsonparse-unexpected-character-2/#post-4836229)
 * Dear Zefta,
    I made it one step further and got now this:
 * SyntaxError: JSON.parse: unexpected character
    Notice: Use of undefined constant
   mrelocator_dircmp – assumed ‘mrelocator_dircmp’ in /var/www/web1351/html/wordpress/
   wp-content/plugins/media-file-manager/media-relocator.php on line 187 [{“ids”:
   0,”name”:”2013″,”isdir”:1,”isemptydir”:0,”isthumb”:0,”norename”:0,”id”:””,”thumbnail_url”:”
   http:\/\/test.cchr.at\/wp-content\/plugins\/media-file-manager\/images\/dir.png”},{“
   ids”:1,”name”:”2014″,”isdir”:1,”isemptydir”:0,”isthumb”:0,”norename”:0,”id”:””,”
   thumbnail_url”:”http:\/\/test.cchr.at\/wp-content\/plugins\/media-file-manager\/
   images\/dir.png”}]
 * Can you have a look on this?
    Kind regards Birgit
 *  [JeanThoumelin](https://wordpress.org/support/users/jeanthoumelin/)
 * (@jeanthoumelin)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/syntaxerror-jsonparse-unexpected-character-2/#post-4836302)
 * Hi 99Dingos,
 * Have you found the solution about the “mrelocator_dircmp” problem?
    Zefta, do
   you have an idea of how to fix it?
 * Thank you 😉
 * Jean

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

The topic ‘SyntaxError: JSON.parse: unexpected character’ is closed to new replies.

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

 * 4 replies
 * 3 participants
 * Last reply from: [JeanThoumelin](https://wordpress.org/support/users/jeanthoumelin/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/syntaxerror-jsonparse-unexpected-character-2/#post-4836302)
 * Status: not resolved