• Resolved DaSoMa

    (@dasoma)


    Hi,

    I have a customer who used wise chat. He ran into some problems. Occasionally all mediafiles vanished, you cant find them in the filesystem nor in the database!

    It is triggered by:
    POST /wp-admin/admin-ajax.php?action=wise_chat_delete_message_endpoint

    I checked it now several times, deleteing any kind of message from wise chats, deletes also ALL media images!

    Please fix this!

    Thank you!

    https://wordpress.org/plugins/wise-chat/

    EDIT:
    I checked your code and I think you have some serious problems generating a good query to get those connected attachement.

    I deleted a message written by me, it was just a “test”, with debugging enabled, I got this:

    View post on imgur.com

    getAttachmentsByMessageIds() needs to be rewritten – thats what my first thought was! Take a look at “OR mt1.post_id IS NULL”. So basically we have:
    (SELECT something based on the metavalue OR post_id=NULL) AND (file is of any kind)

    If you have any questions: https://www.damianschwyrz.de, just hit me!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marcin

    (@marcinlawrowski)

    Hi,

    thank you for reporting this! The plugin should delete only its media and leave the others. I don’t know why it is happening. The feature was tested by me many times. Maybe some specific version of WordPress is doing this? What is your version?

    Thanks!

    Thread Starter DaSoMa

    (@dasoma)

    My client is using the current version (4.4.2) and everything is up to date.

    Plugin Author Marcin

    (@marcinlawrowski)

    In version 2.2 I added additional checks for this. Wise Chat deletes now only media it created and nothing more.

    Thread Starter DaSoMa

    (@dasoma)

    thank you

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Wise Chat deletes all media!’ is closed to new replies.