It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

PageTree problem in Confuence

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

3 answers

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.

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

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

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

Regards
Mik

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

What's New in Confluence Cloud – June 2020 Edition

Ready for the monthly rollup of what happened in May for Confluence Cloud? Improved mobile login experience (& SSO) For those of you with the Confluence mobile app, we know the login experien...

25,951 views 40 82
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you