TAMAN Posted July 6, 2021 Posted July 6, 2021 (edited) I have created a reusable widget in my plugin and im using translatable form fields to save a title and content. and i do it just like how ips does it for example in Most Contributions widget ...\core\widgets\mostContributions it is a reusable widget with a translatable form i have added the delete method in my widget like this public function delete() { \IPS\Lang::deleteCustom( 'core', $this->configuration['tacw_title_lang'] ); \IPS\Lang::deleteCustom( 'core', $this->configuration['tacw_content_lang'] ); } $this->configuration['tacw_title_lang'] returns the unique language key to delete but it does not delete anything and the key is still in the core_sys_lang_words in the database table @Daniel F the default ips Most Contributions widget seem to have the same issue. the language string used for the title is not deleted in the database when the widget is removed! can you please help Edited July 6, 2021 by TAMAN Sonya* 1
Daniel F Posted July 7, 2021 Posted July 7, 2021 8 hours ago, TAMAN said: the default ips Most Contributions widget seem to have the same issue. the language string used for the title is not deleted in the database when the widget is removed! can you please help I can't reproduce this! 1. we have the cleanup code in the Widgets delete method 2. I can confirm that it's called Please don't forget that it won't be removed immediately, there's a cleanup task which calls this frequently. As far as I remember your widget didn't have a delete method? Sonya* and TAMAN 1 1
TAMAN Posted July 7, 2021 Author Posted July 7, 2021 3 hours ago, Daniel F said: Please don't forget that it won't be removed immediately, there's a cleanup task which calls this frequently. That's it then 😅 no problems I will re-upload the plugins later. Thank you. And i wish to disable this kind of tasks when Dev mod is enabled! it creates a headache for newbies like me lol Sonya* 1
Recommended Posts