Title: Wrong Paths when plugins folder moved
Last modified: June 9, 2017

---

# Wrong Paths when plugins folder moved

 *  Resolved [elmar71](https://wordpress.org/support/users/elmar71/)
 * (@elmar71)
 * [9 years ago](https://wordpress.org/support/topic/wrong-paths-when-plugins-folder-moved/)
 * Hi community,
 * we just came across a problem, as we are moving our plugins path on the top level.
   
   In this case the plugins folder is no longer a subfolder of wp-content, but the
   plugin assumes it should be there anyhow.
 * The problem occurs in common/src/Tribe/Assets.php :: maybe_get_min_file()
    around
   line 184ff in Version 4.5.4
 * For all other people that might hit the same problem: the correct code should
   be
 *     ```
       ...
       // Check for all Urls added to the array
       foreach ( $urls as $key => $url ) {
               //set path to file for Windows
               $file = $url;
               //Set variable for content normalized directory
               $normalized_plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
               //Detect if $url is actually a file path
               if ( false !== strpos( $url, $normalized_plugin_dir ) ) {
                       // Turn file Path to URL in Windows
                       $url = str_replace( $normalized_plugin_dir, plugins_url(), $url );
               } else {
                       // Turn URL into file Path
                       $file = str_replace( plugins_url(), $normalized_content_dir, $url );
               }
       ...
       ```
   
 * Hope it helps all of you out there!
    Thanks for making this great plugin!

Viewing 1 replies (of 1 total)

 *  [shelbelliott](https://wordpress.org/support/users/shelbelliott/)
 * (@shelbelliott)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/wrong-paths-when-plugins-folder-moved/#post-9272217)
 * Hi there [@elmar71](https://wordpress.org/support/users/elmar71/),
 * Thanks for sharing this for the community, and thanks for the compliments! We
   really appreciate it. 🙂
 * Take care!
 * Shelby 🙂

Viewing 1 replies (of 1 total)

The topic ‘Wrong Paths when plugins folder moved’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [shelbelliott](https://wordpress.org/support/users/shelbelliott/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/wrong-paths-when-plugins-folder-moved/#post-9272217)
 * Status: resolved