Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

element_history not updating - elements not removed #23

Open
leviwheatcroft opened this issue Mar 8, 2014 · 3 comments
Open

element_history not updating - elements not removed #23

leviwheatcroft opened this issue Mar 8, 2014 · 3 comments

Comments

@leviwheatcroft
Copy link

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
@roryg
Copy link
Owner

roryg commented Mar 9, 2014

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.

@exside
Copy link
Contributor

exside commented Mar 10, 2014

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...)

@leviwheatcroft
Copy link
Author

@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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants