Hi Everyone.
Maybee anyone can help me to solve my problem. I'am creating plugin for Confluence witch adding new Pages
Page page = new Page();
page.setTitle(myTitle);
page.setSpace(getSpace());
.......
pageManager.saveContentEntity(page, null);
and this is works fine!
The problem is with PageTree, beocouse it's starting show new Pages in strukture after LONG time.
What is the reason of that? Should I call any function to render Pagetree?
Many thanks for any help.
Regards
Mik
Maybe you have to call the indexer after the "page adding" programatically to avoid your server restart problem.
Inject the ConfluenceIndexer to your class
public void setIndexer(ConfluenceIndexer indexer){ this.indexer = indexer; }
Then call the reindex after adding your page:
this.indexer.reIndex(page);
Hi Sandro
Many thanks for your tips. Unfortunately it still not works correctly.
I'm calling reindexing after save, but no pages in PageTree, I can see them only after server restart.
pageManager.saveContentEntity(page, saveContext);
this.indexer.reIndex(page);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas, many thanks for answer.
I can find them by search function.
I can find/see my pages (added by plugin) after restart server or if I for example add one more page manualy.
Regards
Mik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as I know Pagetree only shows indexed pages. Could you check if you can find your page via the Search function while it is not shown in your pagetree?
If not there is an indexing issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas, many thanks for answer.
I can find them by search function.
I can find/see my pages (added by plugin) after restart server or if I for example add one more page manualy.
Regards
Mik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.