The before publish handler writes a dynamic entry into urlRewriting.config.
I have no issues with the handler from the GUI (regular publish button), but only when invoking .Publish() in the manner above.
I'm assuming .Publish() is syncronous, but I could see an issue if it were async.
I'm presently going with the:
umbraco.library.RefreshContent();
code, but it feels expensive on our very large site.
IMHO I don't see how anything in the before_publish event handler would affect downstream static methods that are simply just supposed to refresh the cache (other than a cancel of the event itself).
Even so, if I refresh the entire site, the new node shows up implying that the node DID publish.
Topic author was deleted
Strange Publish\Cache behavior in 4.11.x
Any had any issues with 4.11.x regarding the following?
- Document is created dynamically (Document.MakeNew...)
- Document.publish() is called.
- Custom before_publish event is run.
- Cache does not update.
- Tried to use umbraco.library.UpdateDocumentCache after .publish() to try to motivate it to update. Does not update cache.
- umbraco.library.refreshContent() DOES work, but it updates the entire site (slow)
----
If I use the GUI, it works just fine. Only when I programattically create the docs and publish. Using the GUI defats the purpose.
Can you post the entire code ?
Comment author was deleted
Here are the relavent parts:
The following does not work in lieu of umbraco.library.RefreshContent():
What does the beforepublish handler do ? Because the second code sample should work, even without publishing the parent node.
Comment author was deleted
The before publish handler writes a dynamic entry into urlRewriting.config.
I have no issues with the handler from the GUI (regular publish button), but only when invoking .Publish() in the manner above.
I'm assuming .Publish() is syncronous, but I could see an issue if it were async.
I'm presently going with the:
code, but it feels expensive on our very large site.
IMHO I don't see how anything in the before_publish event handler would affect downstream static methods that are simply just supposed to refresh the cache (other than a cancel of the event itself).
Even so, if I refresh the entire site, the new node shows up implying that the node DID publish.
Not a show stopper, but noted as an oddity.
is working on a reply...