• Hi! I’m importing many files (most of them videos) that I have upload through FTP. Media Sync has recognized most of them, but for some of them I’m getting the next error (in spanish, I have traslated it so maybe the translation is not exactly the same to the original english error message):

    “The attachment ID for the inserted attachment ( wp_post table) for the file has not been received”

    What could be the reason for this? Most of the files have quite long names and are in several folders, for example:

    “/wp-content/uploads/course/06-06_Anatomy_and_parts_of_the_human_figure_Intermediate_Level/02-02_The_anatomy_of_the_arm/05-How_to_sintetize_structures_of_the_arm.mp4”

    Media Sync somehow syncronizes some of the files and some others not, and I can′t find a pattern in terms of the many levels of folders, the lenght of the file names, the numbers, the underscores, the file weight…

    I have tried to delete and upload again the files through FTP without result, but if I change the name of one of the files to “example.mp4” instead of the longest file name like “01-How_to_sintetize_structures_of_the_arm_PART01.mp4”, somehow Media Sync is able to detect the file and add it correctly to my WordPress Library. But I need my files to be named “the longer version”.

    The fact than just by changing the name of the file makes Media Sync to recognize the file leaves me confused. Where could be the issue?

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Plugin Author erolsk8

    (@erolsk8)

    Hi @thedigitalzone, thank you for a detailed explanation. First of all, that error happens when this WordPress function fails to return the ID of a new attachment (Media Library item): https://developer.www.ads-software.com/reference/functions/wp_insert_attachment/
    But I just realized I didn’t tell it to throw an error explaining why it failed. So I made a small change and if you now delete the plugin and download it again (because it’s the same 1.4.3 version but code is slightly different) – you should see a more detailed error: “Error inserting attachment (wp_posts table) for file…” + reason why that WordPress function failed. And this should hopefully give us more clues. Please let me know if I you are able to get this new error.

    Also, these are the things that shouldn’t be an issue (in my experience, but I might be wrong):

    • Length of the path (file or folder) – it doesn’t seem too long,
    • Levels of folders – I’ve tested it with many levels,
    • Numbers, underscores, etc. – I’ve tested it with all special characters I could think of and it will work if your database supports saving special characters,
    • File weight/size – shouldn’t matter, especially for videos which don’t need thumbnails or other resizing done by WordPress.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.