• Hi there,

    thank you for this great plug-in that solve many issue at once.

    I’m facing a bug, or rather a blocking situation.
    In some cases, the file upload fails, in the media library, on the right, insted of the media detail there is an error message saying “impossible to insert the attachement into the database” (my wp is in french so I translated the error message)

    I assume this might be due to file name lenght, as using post title plus file name might create long names.

    I thus have added a value to truncate names, but the issue persist.

    if I disable your plug-in I can successfully upload my file.

    Do you have any clues what may cause that ?
    is there a recomended setting for file name lenght to truncate ?

    for admin, it’s anoying, but one might disable the plug-in for the time of upload, but for editors it is totally blocking, and thus a huge issue

    Any help would be greatly appreciated.

    Regards

    • This topic was modified 3 years, 1 month ago by jbonlinea.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pablo Pacheco

    (@karzin)

    Hi @jbonlinea ,

    Thanks ??

    Can you please tell me exactly what is your filename structure option?
    And can you also tell me what is the filename that fails on upload?

    Thread Starter jbonlinea

    (@jbonlinea)

    Hi,

    I think it was {siteurl}{posttitle}{filename}, with - as separator.
    I then changed it to {posttitle}{filename} but I don’t think it has solved the issue with a specific file…

    Speaking of file… which one was it ? hum
    I just tried again with this one and it failed :
    “politique-de-la-terre-et-de-lappartenance-droits-fonciers-et-citoyennete-dans-les-societes-du-sud.jpg”

    on a post named
    “Politique de la terre et de l’appartenance. Droits fonciers et citoyenneté locale dans les sociétés du Sud”

    I know it failed a couple of times but could only dificultly retrive each of them

    regards

    Plugin Author Pablo Pacheco

    (@karzin)

    It seems that there is a limit indeed. I wasn’t aware of that.
    I was able to reproduce the issue here when I tried to upload a file following your example.

    I realized there is a limit on WordPress for the post_name in the posts table. The max length is 200. If you try to upload a filename longer than that it fails.

    I created a new option for you:
    Filename structure > Max length

    It will be set as 200 by default. It will truncate the filename at this limit. Any characters longer than that will be wiped out. I believe you don’t need to change anything

    Please update the plugin to version 1.3.2, try again and let me know if it works for you ??

    Plugin Author Pablo Pacheco

    (@karzin)

    Actually the correct version would be 2.4.8.
    1.3.2 is from Pro version ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[BUG / BLOCKING] “database error”’ is closed to new replies.