delete call on simple change

About this forum
These forums have not been active for several years. They're available for search and reference, but a lot of this information is likely out of date.

For current information, try visiting our Knowledge Base.

Home / Support / Custom Module Development / delete call on simple change

This topic is: not resolved
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #105917

    Jean-David Rivard
    Participant

    Hi,

    Is it normal that the function delete() override in my custom module is being call each time a settings is changed?
    I thinked that delete() was call only if module is remove from page.

    Thanks,

    Jean-David Rivard

    #106036

    Ben Carlo
    Keymaster

    Hey Jean-David,

    I’ve already assigned another member of the team to assist you with your concern.

    Ben

    #106249

    Justin Busa
    Keymaster

    Hey Jean-David,

    That is normal as many modules use that to clear their cache when the module settings are saved or the module is deleted from the paged. Is that causing you issues somehow?

    Justin

    #106268

    Jean-David Rivard
    Participant

    Hi,

    Effectively. To make a short story, I have a database entry synchronized with my module.
    On update, I create my database entry and assign the ID in module settings. I bypass the frequent update with a verification on ID value. -1, seem that the object isn’t create.
    On delete, I must remove database entry and delete some files. If it was just a database story, i would use the settings of the module to store the information, but I need to know when the module is really remove from page to delete file.
    Maybe I can use an action on the save button. Or something on the save and publish?

    Thanks,

    Jean-David

    #106270

    Jean-David Rivard
    Participant

    In fact, I think I better use the save and publish button, because before this stage, the module deletion is not official.

    #106273

    Jean-David Rivard
    Participant

    But I still question why the delete and update function is call if I juste type a letter in a module setting textbox? In my comprehension of the function, update must be call on save button click and delete call on remove button click of the module… Maybe a future feature : a save function and a remove function…

    #106484

    Justin Busa
    Keymaster

    Hi Jean-David,

    I agree that we need to do something here. I have filed an issue to look into adding what you have recommended. I’ll follow up when that is done.

    Thanks,
    Justin

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘Custom Module Development’ is closed to new topics and replies.