Forum Replies Created

Viewing 15 replies - 1 through 15 (of 358 total)
  • Plugin Author erolsk8

    (@erolsk8)

    I see, thank you for all the details. So cache is valid only for first 10 (1 batch) and then it is immediately outdated. Cache can become outdated if older than 3 hours (I guess this is not the case) or if in the meantime there are changes in Media Library (outside of this import process). Could it be that something else is adding or removing files in your Media Library while you are doing this import?

    Because without this cache check, if someone were to add same file to Media Library, this plugin wouldn’t know about it and it might create duplicates. That’s why this cache is necessary even though it can be very annoying.

    I could try to add new option to force different type of cache (that does not require this manual rebuild step), but that could make it slower and require more resources on your server (memory, etc). 

    Also, you could go to “Settings” -> “Media Sync Pro” -> “Contact us” and send a private email there. It might be helpful if you could copy/paste logs from “Settings” -> “Media Sync Pro” -> “Logs” -> “Scan and import logs”. I’m sorry for this bad experience, I hope we can find out what is causing this strange behavior.

    Plugin Author erolsk8

    (@erolsk8)

    Hey @ilfriz80, sorry for the delay. One of the issues I see is that the Media Library cache became outdated, so clicking “Rebuild cache” in the right sidebar, waiting for it to complete, and clicking “Import Selection” again should solve that. This cache is very important to avoid creating duplicates of files that are already in the Media Library, so that is why it stops after the first 10 images. But if possible, it is safer and faster to only select newly uploaded files, instead of selecting all.

    Please let me know if this helps.
    Kind regards,
    Erol

    Plugin Author erolsk8

    (@erolsk8)

    Hey @daq123, it might have been permissions or ownership issue. Even if files showed up as having 644 permissions, the server process running the scan maybe didn’t have the correct ownership rights to actually read them. Re-uploading via FTP applied fresh permissions and reset the ownership which could have solved it.

    This is just my best guess, but happy to hear you got it working.

    Plugin Author erolsk8

    (@erolsk8)

    Hi @jmccallweb, yes it should work. Same way if you would use WordPress Media Library (“Media” -> “Add new Media File”).

    Plugin Author erolsk8

    (@erolsk8)

    Ah, I see, so it was a good guess 😀

    And yes, the Debug option was removed in version 1.4.9 because error handling was improved a bit, and this debug option was just making the code harder to maintain.

    Happy to help. Thank you for detailed explanations, it helps a lot to narrow it down.

    Plugin Author erolsk8

    (@erolsk8)

    Hey,

    That’s interesting, but scanning in this free version is pretty basic it all happens on page load for whole uploads directory at once, so there is no separate background process. I’m wondering if some memory or other limits are being reached and plugin just doesn’t render more scanned files, so do you see whole page loaded with “Thank you for creating with WordPress” at the bottom?

    But maybe more likely, is that files are filtered out, depending on file name. Because this plugin tries to skip thumbnails, so it won’t show up if file name ends with -100×100 for example. This can be customized with custom hook (media_sync_filter_is_scan_object_ignored) in case this is the problem. This is regex used to filter it out:

    // Default file skipping rules:
    // 1. contains image size at the end (e.g. -100x100.jpg), or
    // 2. ends with "-scaled" (also WP generated), or
    // 3. retina thumbnail (e.g. [email protected]), or
    // 4. has .webp after another file type (e.g. .jpg.webp).
    $is_ignored = preg_match('/(-scaled|[_-]\d+x\d+)|@[2-6]x(?=\.[a-z]{3,4}$)|\.[a-z]{3,4}.webp/im', $file_name) == true;

    // Receive external rules for skipping files/folders
    $is_ignored_external = apply_filters('media_sync_filter_is_scan_object_ignored', $is_ignored, $full_path, $file_name);

    Hope it helps, but please let me know if you find out something more.

    Erol

    Plugin Author erolsk8

    (@erolsk8)

    Could you please provide more details on how does it hand the admin? At which step does it happen, while scanning the folder or when importing? What errors do you see when it crashes?

    Otherwise there is no way to help you or anyone else interested in using this plugin.

    Plugin Author erolsk8

    (@erolsk8)

    Hey @wp_kc,

    This exact change has been sitting locally for a while, but now I finally pushed a new version. Please let me know if it’s solved now in 1.4.9.

    Thank you for such a detailed explanation. I wasn’t aware it was causing so many logs. But yes, it is for each file, so it can be a lot.

    Kind regards,

    Erol

    Plugin Author erolsk8

    (@erolsk8)

    If you can select AJ-Bell-London-Triathlon-Standard-Olympic-Route-e1590005335934.png and import it, then it would be a separate and new database record. Pro version has option to filter out these edit versions when selecting items to import. Not sure if that helps.

    But yes, it would be good to properly detect these files that end with -e{timestamp} as edited versions of original images.

    Plugin Author erolsk8

    (@erolsk8)

    Hi @the5krunner, I’m sorry to hear this, it’s quite the challenge. But unfortunately, the Pro version probably wouldn’t help. The Import part works the same as in this free version. Because both use the exact same functions that WordPress uses when uploading files through the Media Library. Except that files are already there in place and this plugin doesn’t touch them – it only creates database records for them.

    Sorry for the disappointing answer. Hope you’ll find a way to clean this up.

    Plugin Author erolsk8

    (@erolsk8)

    Wow that is strange. You looked at the right place, but unfortunately, without some error it is hard to guess what it might be.

    Plugin Author erolsk8

    (@erolsk8)

    Yes, sounds pretty standard, those images are not too big. It shouldn’t take that long. You could check if your WordPress is configured to make too many thumbnails or maybe disable generating thumbnails and then enable after import. Other than that, I can’t think of anything else that can slow it down that much.

    Plugin Author erolsk8

    (@erolsk8)

    Hey @hopiipoh, it should definitely work with these settings. But 3 minutes for only 1 file is way too long. Normally, even 10 files in batch takes a second or maybe a few seconds. Maybe WordPress is generating thumbnails or some other resized versions for too long. Is it some huge images you’re trying to import or which file type it is?

    Plugin Author erolsk8

    (@erolsk8)

    Hello @barthdesigns, yes, both versions should preserve original url. But IDs in database would most likely be different. So it’s still best to try with one or a few images first.

    Hope it helps.

    Plugin Author erolsk8

    (@erolsk8)

    Sorry for the delay, but without more details about the error, there isn’t much I can do to help. If you’re still trying to resolve this, do you maybe want a free one-month coupon to try the Pro version? I’m curious if that would solve it for you or at least to see what the actual error is (in Settings -> Media Sync Pro -> Logs).

Viewing 15 replies - 1 through 15 (of 358 total)