Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

pageManager.trashPage() not working properly when called from inside a schedule job.

Hello,

I have a scheduled job (<job-config>) implemented inside our inhouse developed Confluence Plugin.

Inside this job, I am trying to delete a page using pageManager.trashPage(page, DefaultDeleteContext.DEFAULT).

This line of code works perfectly from inside any other class but it is not working properly from inside the scheduled job. When called from inside the scheduled job, the pageManager.trashPage() function deletes the page from all the search functionalities but I can still see it on the UI (I can still visit the page and see it in the tree of the space).

In addition, after calling pageManager.trashPage() on the page, If we try to search for all the pages on the space using the REST API (/rest/api/content/search) or using the JAVA API (cqlSearchService.searchContent(cql, pageRequest)), the aforementioned page is not returned with the results of the search.

Did anyone face this kind of behavior or does anyone know what could be causing this problem?

Thank you,

0 answers

Suggest an answer

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

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,377 views 7 29
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