• Resolved jzilberberg

    (@jzilberberg)


    I have encountered an issue with the plugin where the plugin_base_url is not set correctly and therefore the path to css, js and image files for the search and register process are not set correctly. For example the following are set as the paths for css and js files:

    
    http://domainame/wp-content/plugins/E:envidashboardwp-contentpluginsmedia-from-ftp/css/style.css
    
    http://domainname/wp-content/plugins/E:envidashboardwp-contentpluginsmedia-from-ftp/js/jquery.mediafromftp.js
    

    If I change line 50 in media-from-ftp/MediaFromFtpAdmin.php as listed below, this resolves the issue, but that is only temporary as I would not want to change core plug in files manually.

    From:

    
    $this->plugin_base_url = plugins_url($path='',$scheme=null).'/'.$slug;
    

    To:

    
    $this->plugin_base_url = '/wp-content/plugins/media-from-ftp';
    

    Here is the server path status info for this server:

    		
    WordPress
    home_url: http://xx.xx.xx.179:1400
    ABSPATH: E:/envidashboard/
    wp_upload_dir[basedir]: E:\envidashboard/wp-content/uploads
    wp_upload_dir[baseurl]: http://xx.xx.xx.179:1400/wp-content/uploads
    upload_path: 
    upload_url_path: 
    WPINC: wp-includes
    
    Media from FTP
    Upload Dir: E:/envidashboard/wp-content/uploads
    Upload Url: http://xx.xx.xx.179:1400/wp-content/uploads
    Upload Path: wp-content/uploads
    Plugin Disallow Tmp Dir: /wp-content/uploads/media-from-ftp-tmp/
    Site Url: http://xx.xx.xx.179:1400
    

    On another server, it works correctly without making the change noted above. Here is the server path status info for that server as a comparison:

    
    WordPress
    home_url: http://xx.xx.xx.239/envi_customers
    ABSPATH: /var/www/html/envi_customers/
    wp_upload_dir[basedir]: /var/www/html/envi_customers/wp-content/uploads
    wp_upload_dir[baseurl]: http://xx.xx.xx.239/envi_customers/wp-content/uploads
    upload_path: 
    upload_url_path: 
    WPINC: wp-includes
    
    Media from FTP
    Upload Dir: /var/www/html/envi_customers/wp-content/uploads
    Upload Url: http://xx.xx.xx.239/envi_customers/wp-content/uploads
    Upload Path: wp-content/uploads
    Plugin Disallow Tmp Dir: /wp-content/uploads/media-from-ftp-tmp/
    Site Url: http://xx.xx.xx.239/envi_customers
    

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Katsushi Kawamori

    (@katsushi-kawamori)

    Thanks your report!!

    Plugin Author Katsushi Kawamori

    (@katsushi-kawamori)

    Hi,

    Please fix as follows. Do work?
    MediaFromFtpAdmin.php 50row

    Before
    $this->plugin_base_url = plugins_url($path='',$scheme=null).'/'.$slug;

    After
    $this->plugin_base_url = untrailingslashit(plugin_dir_url( __DIR__ ));

    Thanks.

    Thread Starter jzilberberg

    (@jzilberberg)

    Thanks!!! That resolved the issue and it works on both servers, the one that was having the issue and the one that was working without the issue. Are you going to push that change with a new version so that I don’t have to manage that line when updates are made?

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

The topic ‘Path Error’ is closed to new replies.