-
Notifications
You must be signed in to change notification settings - Fork 20
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
Help with move plugin changes #233
Comments
maybe somehow DOKUWIKI_DONE event could help: like collect the events to an array, and when DOKUWIKI_DONE is invoked empty that array in memory. but from my testing, DOKUWIKI_DONE and COMMON_WIKIPAGE_SAVE are fired in different processes, so memory caching will not work. would need to store to filesystem. |
One idea could be to use an event that has the before handler called before the move happens and the after handler after the move completed. Your event handler could then ignore or summarize the events (I mean the deletion of the old and creation of the new page) that happen in between the before and after event handler. I'm not sure if such an event already exists, but if not, it could be added. |
this is dump of events fired during rename of one page
|
Are you sure that's from the move plugin and you aren't using another plugin for renaming the page? I'm asking because the move plugin fires an event before and after the move (which you could also use to combine the events as I wrote before): https://github.com/michitux/dokuwiki-plugin-move/blob/master/helper/op.php#L158 - and I cannot see that event in the log. |
I renamed via simple rename: |
The native page notification suffers the same problem, sends out two emails:
|
🚧 Never link to branches, share a permalink 🚧
NOTE: edit your post and fix it with a permalink! |
Found that PLUGIN_MOVE_PAGE_RENAME::BEFORE is called, but if an error occurs, there's no knowledge of that to the event listener. so could lose messages. EDIT: irrelevant: no move actually happens on error. for I'm running on arm64 with rosetta2 so the indexes is super slow, and rename page gets index locked errors: "Error while updating the search index locked" |
Have look: what you think? |
I'm maintaining a notification plugin:
how to handle page moves more efficiently? as currently each page move sends two events:
The plugin is listening to
COMMON_WIKIPAGE_SAVE
event:The text was updated successfully, but these errors were encountered: