Forum Replies Created

Viewing 15 replies - 301 through 315 (of 341 total)
  • Plugin Author erolsk8

    (@erolsk8)

    Hi @leemon,

    Sorry, looks like I missed those. So now I updated those 3 which were missing ‘media-sync’ as the second parameter. And I also updated languages/media-sync.pot file with new strings to be translated.

    I didn’t release a new version, but if you download the plugin now, you should get those changes.

    Please let me know if that worked for you.

    Thanks,
    Erol

    Plugin Author erolsk8

    (@erolsk8)

    I don’t really see what went wrong or what the issue is.

    Maybe to restore the database from backup until you see what happened.

    Forum: Plugins
    In reply to: [Media Sync] Sync Problem
    Plugin Author erolsk8

    (@erolsk8)

    Great, I’m happy to hear that ??

    Forum: Plugins
    In reply to: [Media Sync] Sync Problem
    Plugin Author erolsk8

    (@erolsk8)

    Hi @falki147, I’m glad you found a solution (kind of).

    I already reduced the number of items to process per batch. But looks like it needs to be even smaller in some cases. So I might add an option to pick custom batch size, so it can be set to 1. Which would take a lot of time, because it would make a request for each image, but it might help in some situations.

    But I think increasing max_execution_time in php.ini on the server is a much better solution.
    https://thimpress.com/knowledge-base/how-to-increase-maximum-execution-time-for-wordpress-site/

    Anyway, thank you for a detailed explanation of what you found, this is finally something useful ??

    For now, I removed batch size of 20 (for more than 1000 items), so 10 is now maximum (for over 100 items being imported). That’s in 1.1.1 version.

    I’ll update this topic when I add that “custom batch size” option. It’s a small change, but I’m not sure when will I find some time to do it.

    Plugin Author erolsk8

    (@erolsk8)

    Hi @tea23hah, it’s an interesting idea, I see how it can be useful in your case. But the main purpose of this plugin is more like “import all at once”, so this is more like a special case.

    But I’ll see if I can build something like this as an Add-On. Probably as inexpensive paid Add-On ??
    Because I don’t really have time to work on new features, and who knows when would I even find time to work on this, even if it was a paid Add-On. So, unfortunately, I can’t promise anything right now, but I’ll definitely let you know if I find some time to work on this.

    Thanks for the great feedback and suggestion.

    Plugin Author erolsk8

    (@erolsk8)

    No problem @mandrews, I’m interested to find out why these things keep happening.

    But in your case, if you’re moving your local WP the server (production), I’d import the whole database. And there are various ways to do it:
    https://www.google.com/search?q=copy+local+wordpress+to+server&oq=copy+local+word&aqs=chrome.0.0j69i57j0l3.4383j0j1&sourceid=chrome&ie=UTF-8

    Plugin Author erolsk8

    (@erolsk8)

    Hmm interesting, well, I’d turn on debugging, as I explained above:
    https://www.ads-software.com/support/topic/can-only-get-50-100-products-to-sync-at-a-time/#post-11866763

    Then I would console log in browser to see what’s actually happening:
    https://support.airtable.com/hc/en-us/articles/232313848-How-to-open-the-developer-console

    If nothing is found in “Console” tab, I’d also check “Network” tab.

    Plugin Author erolsk8

    (@erolsk8)

    Do you mean subfolders? ??

    You need to verify those subfolders actually exist by finding “uploads” folder of your WordPress installation and checking what’s available there.

    Also, I can’t access your “https://localhost” link, that’s just on your computer. So what would help is for example side by side screenshot of expanded “uploads” folder structure next to what “Media Sync” plugin lists.

    Forum: Plugins
    In reply to: [Media Sync] Addition date
    Plugin Author erolsk8

    (@erolsk8)

    Hey @adrianifero, I totally missed your comment until now that I’m back to this date issue.

    I just realized using filemtime like this, wasn’t such a great idea.

    And your solution seems pretty good, it totally makes sense. Except that “uploads/2019/11” part can’t be hardcoded since this plugin should work with any uploads folder name or folder structure and multi sites. But that regex can probably work without “uploads” part, and then if it can’t find year and month based on a folder it can just fallback to file modified time.

    So, I did some changes to your code and added it as one of the options for setting “post_date”. And even made a filter hook so it can be fully customized.

    It’s available in new “1.1.0” version. You can see more about it here: https://www.ads-software.com/support/topic/possible-bug-media-library-doesnt-load-correctly-after-importing-1000-svgs/#post-12113872

    Thank you very much for your suggestion and the code you provided.

    Plugin Author erolsk8

    (@erolsk8)

    Oh wow, it seems quite bad :/

    But I’m guessing it might be due to “post_date” which is set for each new Media Library record. Someone requested to explicitly set it to the date of the actual file (when it was modified). So it was implemented, but now it seems like it’s sometimes causing strange behavior.

    And since this issue seems quite scary to me, I worked out a solution to make that date/time value customizable (as radio buttons right below Import button). So in the new version “1.1.0” you will be able to use:

    1. “Default” (current time),
    2. “File time” (as it was before) and
    3. “Smart file time” which was suggested in another support comment: https://www.ads-software.com/support/topic/addition-date/#post-11741296.

    The last one works like this: if file timestamp does not match the folder in which it is – it will construct the date/time based on the folder: {year}-{month}-01 00:00:00 or if it’s ok it will use file’s timestamp.
    So it shouldn’t put “Feb, 2019” dates your SVGs from /2019/11 folder.

    It’s not so easy to cover all use cases, but I hope these options would make it much better.

    Oh and yes, I made it so that you can write your own hook function to overwrite this functionality. So you can set that time/date to anything you want. Here is an example:

    
    function my_custom_media_sync_post_date($post_date, $file_path, $selected_date_time_option)
    {
      // Custom logic...
      // Should return date in this format: "Y-m-d H:i:s"
      return $post_date;
    }
    add_filter('media_sync_filter_post_date', 'my_custom_media_sync_post_date', 10, 3);
    
    • This reply was modified 5 years, 4 months ago by erolsk8. Reason: formatting
    Plugin Author erolsk8

    (@erolsk8)

    Hey @wpwanderer, that message is correct because that’s how it should work.

    Plugin is made so that you don’t have to be careful to select only those items which are not in Media Library, but that you can just select all and import all. And it shouldn’t make a mess with duplicate files or something like that.

    But if that’s happening for you, I would need more details on how to replicate that issue on my end. Maybe do screen recording showing which files you selected and how it ended up looking in Media Library.

    And to comment on some of your claims:

    I kind of thing that the message should read “Files already synced via Media-Sync will be skipped during import.”

    Nope, because plugin can’t differentiate between files imported normally (with Media Library) or with this plugin.

    Because the plugin doesn’t actually sense what uploads are in the Media Library and what are not when you initially start.

    There is no difference between the initial scan and subsequent scans, from the perspective of this plugin, it just doesn’t remember that.

    Maybe if you initially have duplicate files (possibly with slightly different names so only 1 shows up in Media Library), then on the first run, plugin will import those duplicates, but on subsequent runs, it will know those files are already imported.

    I hope that makes sense and clears some misunderstandings.

    • This reply was modified 5 years, 4 months ago by erolsk8.
    Forum: Plugins
    In reply to: [Media Sync] Sync problem
    Plugin Author erolsk8

    (@erolsk8)

    Hey @shkaf, I still couldn’t replicate this issue on my end, but I released 1.0.4 update which might solve this.

    Plugin Author erolsk8

    (@erolsk8)

    Hi @pornolala, image size shouldn’t matter because the images and all files stay in the same place, but I tried with 330 large images (20-30 MB each) – still couldn’t replicate this issue.

    But since I’m guessing the problem is with the number of files to process per each batch – I reduced that number to see if that might help.

    That update should now be available in 1.0.4 version.

    @remymedranda you can also try it out with 1.0.4 version.

    Please let me know if it works for you now.

    Plugin Author erolsk8

    (@erolsk8)

    Closing due to inactivity. Please reopen if more details are available.

    Plugin Author erolsk8

    (@erolsk8)

    Thanks, but that’s not giving me enough details to see what the problem is. To see the actual error, you need to enable debugging. You can do that by adding this to your wp-config.php file:

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );

    As described here:
    https://www.ads-software.com/support/article/debugging-in-wordpress/#example-wp-config-php-for-debugging

    Also, how many files are you trying to import?

Viewing 15 replies - 301 through 315 (of 341 total)