• Resolved tosca30

    (@tosca30)


    There seems to be something broken: none of the files I load with FTP + use the plugin can be found. The plugin itself is unable to display the file thumbnail, and it is not displayed in the media library either.
    And 404 errors on the front-end, of course.

    Same files uploaded (when possible) via the media uploader are OK.

    I’m using the plugin in a multisites environment but, unless I’m mistaken, it has always worked until recently. COuld it be a consequence of the recent WordPress upgrades?

    https://www.ads-software.com/plugins/media-from-ftp/

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

    (@katsushi-kawamori)

    Hi tosca30,

    I do not think the relationship with the WordPress upgrade.
    If you are using Version 7.7 is, I think that many have trouble.
    Please upgrade immediately to the latest version.

    Thread Starter tosca30

    (@tosca30)

    Thank you for your answer. I should have mentioned that I’m already using the very last version (7.9)

    Plugin Author Katsushi Kawamori

    (@katsushi-kawamori)

    It also might be a good idea to downgrade to version 7.6.

    Thread Starter tosca30

    (@tosca30)

    7.6 is no better, files are still not found on the frontend side.

    Thread Starter tosca30

    (@tosca30)

    I reverted to the 7.9 version and activated the debug option. Here are some messages that can provide some hints regarding the issue:

    [16-Aug-2015 14:58:17 UTC] PHP Warning: copy(.../www/wp-content/uploads/sites/3/https://mysite/wp-content/uploads/sites/3/2015/08/L_agriculture_paysanne_expliquée_aux_urbains.pdf): failed to open stream: No such file or directory in .../www/wp-content/plugins/media-from-ftp-7.9/inc/MediaFromFtp.php on line 382

    [16-Aug-2015 14:58:17 UTC] PHP Warning: unlink(.../www/wp-content/uploads/sites/3/https://mysite/wp-content/uploads/sites/3/2015/08/L_agriculture_paysanne_expliquée_aux_urbains.pdf): No such file or directory in .../www/wp-content/plugins/media-from-ftp-7.9/inc/MediaFromFtp.php on line 383

    [16-Aug-2015 14:58:17 UTC] PHP Warning: filesize(): stat failed for .../www/wp-content/uploads/sites/3/2015/08/4bd1bb736ce02c878361316ed7f13193.pdf in .../www/wp-content/plugins/media-from-ftp-7.9/inc/MediaFromFtp.php on line 489

    I’ve hidden the references to the actual site.
    There are a couple of other notices regarding wp_enqueue_script, add_option and has_cap but I’m not sure they are related to Media From FTP.

    Plugin Author Katsushi Kawamori

    (@katsushi-kawamori)

    Thank you for your debugging.
    The cause seems to be to get the path in the case of multi-site.
    I’ll try to fix this matter.

    Plugin Author Katsushi Kawamori

    (@katsushi-kawamori)

    I was tested in a multi-site.
    It was movement without any problems.
    Please check the settings of your multi-site.

    Thread Starter tosca30

    (@tosca30)

    Which setting should I check? I don’t know what could have an influence on the plugin.

    It is not only multisite, but multidomain, too. And the domain mapping works well as I have no addressing problem with other plugin or theme.

    Plugin Author Katsushi Kawamori

    (@katsushi-kawamori)

    Thanks for the advice.
    I found a new way of path acquisition for multi-site.
    In the near future, I will incorporate the new version.
    Perhaps, will not your error.

    Thread Starter tosca30

    (@tosca30)

    Hmmm… it appears to be worse than before: the plugin cannot find any file now, and I always get the following message:
    “There is no file that is not registered in the media library.”
    So there appears to be no possibility to synchronize any file.

    All exclude files filter deleted and thumbnails cache removed don’t change anything.

    Plugin Author Katsushi Kawamori

    (@katsushi-kawamori)

    If the file cannot find, “Settings -> Exclude file” change blank.
    There is a problem with the regular representation in the default value of “Settings-> Exclude file”.

    Thread Starter tosca30

    (@tosca30)

    I just tried the 8.3 version. This time, the plugin finds the FTPed files, and synchronizes the DB… but it changes the file name to some 8-digits number, so the file name is lost and the URL doesn’t work!

    Example:
    – my original file name is something like: news-24953-cop-21-kesako.pdf
    – and the URL calculated by the plugin is https://my-site.com/wp-content/uploads/sites/3/2015/07/06110532.pdf

    Plugin Author Katsushi Kawamori

    (@katsushi-kawamori)

    This plug-in will change by the multi-byte file names MD5 function in a multi-byte environment.
    In that case, it will be a 32-character filename.
    It has been renamed to 8 characters. I do not understand.
    Other than the multi-byte environment, the file name will not be changed.
    Your environment is a multi-byte environment?

    Maybe then, perhaps wrong judgment of the single-byte and multi-byte.
    Its location, in inc / MediaFromFtp.php, is the 401 line from the 380 line. If you commented out here, but does not rename.

    If you can use the PHP, please try to convert a string using the MD5 function in your environment. It is thankfully When will tell me what happens.

    Thread Starter tosca30

    (@tosca30)

    I’m not sure what means multi-bytes environment. I use an ordinary french WordPress installation.

    I did comment lines 380-401 of the inc/MediaFromFtp.php program but the result doesn’t change: in the folder, the filename is news-24953-cop-21-kesako.pdf' and the plugin is still renaming it as06153349.pdf`.

    Plugin Author Katsushi Kawamori

    (@katsushi-kawamori)

    Without comment out, I think that it can do to change only the 380 lines.

    Before
    380 if (strlen($new_url_attach) <> mb_strlen ($new_url_attach, $char_code)) {

    After
    380 if ( !mb_check_encoding($new_url_attach, 'ASCII') ) {

    I can be considered Only this point.

    Do you used as a filter hook change the filename in a different plug-ins that you use?

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Files synchronized with the plugin not found’ is closed to new replies.