ElementHelper
ElementHelper copied to clipboard
element_history not updating - elements not removed
elementHelper isn't removing elements when I delete them from the filesystem.
It looks as though elementhelper.element_history can be set/saved as something like:
a:1:{s:11:"modTemplate";a:5:{i:0;s:6:"tester";i:1;s:7:"project";i:2;s:6:"collab";i:3;s:4:"home";i:4;s:5:"basic";}}
The next time getOption is called it still returns
a:0:{}
- using elementhelper 1.3.3, modx revo 2.2.12
- have cleared cache
- haven't edited element_history from the system settings
- have set auto remove to yes
HI there,
I plan on rewriting elementHelper soon to fix this bug among others. Unfortunately I don't have a fix for this at the moment but a workaround that has worked for me is to restore the element in the file system, modify the file (with some junk text) then save it and refresh the manager. At this point the element_history should get repopulated and deleting the file from the file system will remove it from the manager.
I'll hopefully have a new fixed/better/smarter version done in the next couple of weeks.
Hm, if that is implemented (auto deleting of elements from the database), I would like it to be configurable in the settings because I actually "like" that behavior (of not deleting the elements from the db when they are deleted in the filesystem...)
@roryg - that's awesome. It's a great plugin that has the ability to dramatically improve my workflow. I'm looking forward to the new version.
@exside - the "auto remove" setting should remove elements which are in the history (have been created by elementhelper) but are no longer in the filesystem. So it was always optional...