I've tried all the usual methods of reloading a page in OnDocFormSave. So far, none have worked.
I know how to do it in JavaScript, but in this use-case, I need to do it with PHP.
The problem seems to be that the action goes to the connector, rather than straight to the browser. I've tried stuff that works in JS (e.g., sending ?a=resource/update&id=12), but it doesn't work.
Has anyone figured out a way?
Hi BobRay,
did you find a solution for this problem?
I am changing the content in the OnDocFormSave event and need to reload
the page to view the changes in the TinyMCE RTE.
A funny thing is, that this works automatically with new resources, so
the reload functionality seems to be included in Revo (Version 2.6.5),
but I don't know how to activate it with existing resources which only
should be updated ..
Thanks
Martin
This was what I finally came up with:
https://bobsguides.com/blog.html/2017/08/30/updating-manager-pages-in-a-plugin-viii/
You may have to modify it to meet your needs.
I can't remember if there's a way to get the ID in OnBeforeDocFormSave, but you can also connect the plugin to OnDocFormSave where the ID should be available as $id.