youngmon/atlassian-qna huggingface dataset:
Manipulate confluence table by Java API
Asked by hongchao song:

Hi guys,

I need to insert rows into table dynamically by Java API but not Rest API.

When I implementing it through**[saveContentEntity](https://docs.atlassian.com/atlassian-confluence/latest-server/com/atlassian/confluence/core/ContentEntityManager.html#saveContentEntity-com.atlassian.confluence.core.ContentEntityObject-com.atlassian.confluence.core.SaveContext-)`(`[ContentEntityObject](https://docs.atlassian.com/atlassian-confluence/latest-server/com/atlassian/confluence/core/ContentEntityObject.html "class in com.atlassian.confluence.core")` obj, `[SaveContext](https://docs.atlassian.com/atlassian-confluence/latest-server/com/atlassian/confluence/core/SaveContext.html "interface in com.atlassian.confluence.core")` saveContext)`** or **saveContentEntity(ContentEntityObject obj, ContentEntityObject origObj, SaveContext saveContext)** , it *throws org.hibernate.HibernateException: Unable to resolve owner of loading collection \[\[com.atlassian.confluence.core.ContentEntityObject.contentProperties#819205\]\] for second level caching*.

Could somebody please give me some help? or some sample code for manipulating table dynamically by Java API

Thanks in advance.


Answers:
author: Gregor Kasmann_Actonic
body: Try this solution:

```
pageManager.saveNewVersion(targetPage, new PageModification(newPageContent), getDefaultSaveContext());
```

```
class PageModification implements Modification<Page> {
??????? private String newBody;

??????? public PageModification(String newBody) {
??????????? this.newBody = newBody;
??????? }

??????? @Override
??????? public void modify(Page page) {
??????????? page.setBodyAsString(newBody);
??????????? page.setVersionComment("Page uploaded with same templates.");
??????? }
??? }?
```

```
private SaveContext getDefaultSaveContext() {
??????? return DefaultSaveContext.builder().suppressNotifications(true).updateLastModifier(true).suppressEvents(false).build();
??? }
```


author: Gregor Kasmann_Actonic
body: If you execute any user related actions from Job Module, you have to SET some active user or will receive an Exception.

```
AuthenticatedUserThreadLocal.set(userAccessor.getUserByName("admin"));
```


author: KC Integrations
body: Did anyone resolve this issue? I'm having the same problem was random pages. Not sure the source of the error?


author: Sean Sun
body: hi hongchao, have you fixed it. I meet the same issue. Could you give me any suggestion on this. Thx!


author: hongchao song
body: thanks, but it still throw the same exception, ::\>_\<::

comments: author: Gregor Kasmann_Actonic
body: In which module do you use it?

Macro? XWork? Something else?


author: hongchao song
body: job-config module.

Is it up to module type? Could you please give me more details?


author: hongchao song
body: I implementd the same function on the Macro and Job-config module separately, and only Macro module works well.  
It seems only Macro module support this approach ,is it correct?
comment list in a page
Asked by Anderson Hsu:

Dear Support Team,

We found if there are a lot of comments in one page, user must drag browser reel to the bottom of the page , it there other suggestion or style which it can list comments in one page ? Thank you.

![5.jpg](/t5/image/serverpage/image-id/8448i6915F6CD23E47D93/image-size/large?v=v2&px=999 "5.jpg")


Answers:
author: Gregor Kasmann_Actonic
body: It is default browser behavior. Too much content for one screen - scrollbars will appear.
Image Gallery - using images from sub-pages
Asked by Muazam Rafique:

Hello all.

I was hoping that someone can help me to do the following:

On a page I want to add a gallery that displays images that are attatched to the sub pages of Page X. In my case I have created Page X called Case Studies, and each of the sub pages contains an entry and image about a single case study.

On Page X I would like to show a grid of images from the sub pages.

Any ideas?


Answers:
author: Gregor Kasmann_Actonic
body: Agree with James, Page Properties Macro + Page Properties Report Macro may be a good solution:

1. Put "Page Properties Macro" to each page with images.

2. Put images into "Page Properties Macro" table.

3. Use "Page Properties Report Macro" on the homepage to aggregate all the images in one table.

<https://confluence.atlassian.com/doc/page-properties-macro-184550024.html>

<https://confluence.atlassian.com/doc/page-properties-report-macro-186089616.html>


author: James Dellow
body: Try the page properties macros.


Tags: image
Confluence Search
Asked by SG:

Is there any way to limit the confluence search to a specific set of pages? and not the entire space in which we have the search box?


Answers:
author: James Dellow
body: The Page Tree Macro also has an option to limit search within the selected page tree.

comments: author: SG
body: Hi James,

Thank you for your answer. I think that is exactly what I want. Please tell me more about it.

I have a live search in Confluence.

Can I still limit that to a certain page tree?


author: Edwin Kyalangalilwa
body: You can use labels and then limit the search to pages with that label.


Tags: live-search

page

search

space
How do I identify which pages an attachment is associated with?
Asked by Joanne Pandya:

I would like to delete an attachment that I don't believe is used any more. However, I want to identify any other Confluence pages that reference this attachment.

How do I determine any other Confluence page that the attachment is referenced in?


Answers:
author: James Dellow
body: In most cases you should be able to find them simply by searching for the filename (including the extension) - but don't filter just for attachments, you are actually looking for where the filename appears within a page, comment, or comment.
Firefox froze and was rebooted while configureing database
Asked by Rob Collins:

Now I get a "Oops" page. I have rebooted confluence, and it is still in a bad state. No matter the url within my site for confluence, it always goes to:

<http://192.168.205.142:8090/setup/setupdb.action>

The link to the knowledge base goes to an empty page.

Here's the dump:

[![logo](http://192.168.205.142:8090/images/logo/confluence_48_white.png "Confluence")](http://192.168.205.142:8090/)System Error {#toc-hId-1764699552}
-------------------------------------------------------------------------------------------------------------------------------------------------------

A system error has occurred --- our apologies!

For immediate troubleshooting, consult our **[knowledge base](http://confluence.atlassian.com/display/CONFKB/Confluence+Knowledge+Base+Home)** for a solution.

If you would like to receive support from Atlassian's support team, ask your **[Confluence administrator](http://192.168.205.142:8090/contactadministrators.action)** to create a support issue on [Atlassian's support system](http://support.atlassian.com) with the following information:

1. a description of your problem and what you were doing at the time it occurred
2. a copy of the error and system information found below
3. a copy of the application logs (if possible).

Your Confluence administrator can use the **[support request form](http://192.168.205.142:8090/admin/raisesupportrequest.action)** to create a support ticket which will include this information.

We will respond as promptly as possible.  
Thank you!

[**Return to site homepage...**](http://192.168.205.142:8090/)

The SystemInformationService could not be retrieved from the container. Therefore very limited information is available in this error report.  
The SystemInformationService could not be retrieved due to the following error: java.lang.IllegalStateException: Spring Application context has not been set

### Cause {#toc-hId--983970914}

com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set  
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

caused by: java.lang.IllegalStateException: Spring Application context has not been set  
at com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:48)


Answers:
author: Edwin Kyalangalilwa
body: There is a lot of different things that may cause that error. Try

<https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html>
Date Range macro for Confluence
Asked by Matt Miller:

Found the date picker for including a date on a wiki page, by typing "//".

But is there a way to pull up a date range picker? Im trying to create a table of events that all have date ranges. Right now I have to type in a date range manually like "November 1-3, 2017". Would be nice to have a picker that lets you choose start and end dates.

Do not want to use the Calendar to track events because these are unconfirmed events. Just need the info on a wiki page in a table.


Answers:
author: Shannon S
body: Hi Matt,

There is no date range macro for Confluence. My recommendation would be to use the two dates at either end of the range in your table using the date picker.

Kind Regards,  
Shannon


author: Catalin Stan
body: I also need to create a table, something like:

![Screenshot from 2022-02-09 16-12-40.png](https://community.atlassian.com/t5/image/serverpage/image-id/182552i5006144092595D4C/image-size/large?v=v2&px=999 "Screenshot from 2022-02-09 16-12-40.png")

And I keep having the feeling that the row "Feb 7, 2022 Feb 11, 2022" should be highlighted with blue because the current date ( 9th Feb 2022) is between those two date fields.

And next week, the next row will be highlighted with blue.

So I won't have to manually maintain the column on the left, to make it pretty for the client.

Maybe someone can take a look at this feature? Maybe it will be valuable / appreciated :)
Confluence - Activity and People
Asked by Sony Dhillon:

I would like to use Confluence as a knowledge base for our various customers. However, I need the Activity and People tabs to only show Activity for the space the person has permissions to. Similarly, I would like the People tab to filter and show only people for the space the person has permissions to.

Is it possible to apply this type of filter and privacy settings?

Any help would be most appreciated.

Thanks!


Answers:
author: Mike Rink
body: Hi Sony,

I'm with Comalatech, one of the app vendors in the Atlassian Marketplace. Are you in server or cloud? I think we have a server app that might be a solution for you. Let me know :)

comments: author: Sony Dhillon
body: Hi Mike,

We are server based. Is there anything we can do for this.

Thanks!

Sony


author: Mike Rink
body: Sorry for the late reply Sony, but my mistake - I misunderstood what you were requesting, and we don't have an app that will assist with this. If you have two Confluence instances we have an app that can help, then you can run one public and one private, and hide the people tab on the public one.

If you only have one instance, and you're bringing anonymous users into some of the spaces, then unfortunately there is no way to do what you're requesting. You can hide those tabs, but you can't filter what is displayed. You can learn more in this Atlassian Confluence issue: [https://jira.atlassian.com/browse/CONFSERVER-7837](https://jira.atlassian.com/browse/CONFSERVER-7837?)
How do I actually contact customer support?
Asked by MHEC Support:

I have tried but could not find a contact.


Answers:
author: Nic Brough -Adaptavist-
body: Raise a request over at <https://support.atlassian.com/contact>


author: Sandy Johnson
body: Adam

Unfortunately, there is no Atlassian help that you can contact directly (phone or otherwise). Even trying to get sales help, there is no phone #.

Nic's way is the only option.

Sandy

comments: author: Nic Brough -Adaptavist-
body: Well, to be strictly correct about it, Atlassian do have premium support where you can ring them direct. (The call will still end up as a support request for logging, if nothing else). And they will arrange calls if they think it's the best way to handle a request you raise.


author: VexFX
body: Atlassian is a horrible corrupt and evil company. I've used them for well over a decade and right now opening a support ticket is effectively impossible. They just took my free confluence cloud, switched it over to paid, and because my free account had no billing information they deleted years worth of data in confluence without asking my permission. Data that there is no backup for. And with no ability to contact them, there is no path to recovery.

Little do they know that outside of my personal projects that use the free tiers, I'm a seasoned CTO who will now make it my life's mission to ensure no company I work with, consult with, or do business with in any capacity ever uses any Atlassian product ever again. There are so many alternatives now that are more modern, more agile, and better in every measurable way, and not run by a corrupt evil company that has no regard for their customers or community.

I'll be shutting down all my company's paid accounts as soon as we back up all our data. There is no reason to be in a "trusted" relationship with a company that is this heartless and out of touch.

Making their "contact" page (<https://support.atlassian.com/contact/>) so you can not actually contact them is downright evil and disgusting. After hours of trying I have found no combination of options in their horrible UI that results in the ability to open a ticket. Emailing support@atlassian.com just bounces back.

In the past, I've worked at/run large companies that used Atlassian products, but they've just burnt that bridge. Shame on you Atlassian, and everyone who works there should be ashamed too.
Confluence Space XML import
Asked by invinci:

I am trying to *export data from **instance A** and import to**instance B**.*

1. I did a sample import to instance B with the space key **SPK**, worked fine.
2. I initiated a full import to instance B with the same space key, did not work as expected.
3. I deleted the space created in the first step.
4. Now when I retry the import, it still says that there is still an existing space with the same key.
5. Do I need to perform a space index before I import?

*NOTE: - there are test instances.*

<br />

How do I go ahead and resolve this issue?

Any suggestions or pointers would help.

Thank YoU!


Answers:
author: Christo Mastoroudes _Adaptavist_
body: Hi,

This might help you out:

<https://confluence.atlassian.com/confkb/after-a-failed-space-import-it-s-not-possible-to-re-import-because-of-leftover-space-data-217743668.html>


Tags: import

questions-for-confluence
Confluence Edit page - macros display strange characters
Asked by delmario:

Since upgrading to Confluence 6.4.1, when edit a page with various types of macros, the text in the macro block are illegible characters that describe the macro.

This is an example of the Table of Contents macro as displayed in the Edit page.

![image.png](/t5/image/serverpage/image-id/8432iC44F3CBFEB04606F/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Colin Goudie
body: I ended up having to

\> sudo yum groupinstall fonts

\> `sudo fc-cache -f -v`

comments: author: delmario
body: Awesome, that solved it! Updating the fonts was the ticket!

Thank you, Colin!!


author: Andrey Aristarkhov
body: Didn't help in my case even after confluence restart/


author: Pavel Savchenko
body: Same for me, did the above mentioned guide + groupinstall fonts, nothing seems to have changed.


author: TerraTech11
body: Did not work for us either, even after font install, fc-cache, and reboot. :(


author: earlramirez
body: Have you tried this?

<https://confluence.atlassian.com/confkb/confluence-ui-shows-garbled-or-corrupt-text-on-captcha-macros-and-or-diagrams-due-to-missing-fonts-938027858.html>


author: earlramirez
body: These steps worked for me

1. Installed the required fonts

   **yum install -y ghostscript dejavu-fonts-common dejavu-sans-fonts dejavu-sans-mono-fonts motif**
2. Stop Confluence   
   **/opt/atlassian/confluence/stop-confluence.sh**
3. Rebuild font cache   
   **fc-cache -s**
4. Clear Confluence plugin cache (Confluence home is usually in /var/atlassian/application-data/confluence/, this can vary if the administrator installed it in a different location.  

   **rm -rf \<confluence-home\>/bundled-plugins**   
   **rm -rf \<confluence-home\>/plugins-cache**   
   **rm -rf \<confluence-home\>/plugins-osgi-cache**   
   **rm -rf \<confluence-home\>/plugins-temp**   
   **rm -rf \<confluence-home\>/bundled-plugins_language**
5. Rebuild content indexes.  
   As Admin navigate to General Configuration ? Administration ? Content Indexing and click Rebuild, this will take a few minutes.
6. Start Confluence   
   **/opt/atlassian/confluence/stop-confluence.sh**
7. Confirm that you are able to see the fonts for the macros.


author: David Puchosic
body: Found this helpful for Confluence 6.8.2 on CentOS 7.5. Macros didn't have crazy fonts, but they weren't correct either. This was my solution:

1. Installed fonts  
   $ yum install dejavu-fonts-common dejavu-sans-fonts dejavu-sans-mono-fonts
2. Updated Font cache  
   $ fc-cache /usr/local/share/fonts/
3. Stopped Confluence
4. Cleared Plugin cache  
   # /var/atlassian/confluence/plugins-cache  
   # /var/atlassian/confluence/plugins-osgi-cache
5. Started Confluence \& Cleared Browser History  
   (later) Rebuild content indexes


author: Colin Goudie
body: I'm chasing this to see if it's the issue

<https://confluence.atlassian.com/confkb/confluence-ui-shows-garbled-or-corrupt-text-on-captcha-macros-and-or-diagrams-due-to-missing-fonts-938027858.html>

comments: author: earlramirez
body: This worked for me, thanks.


author: Colin Goudie
body: We're getting this on some sites too. Any ideas?
Confluence Server: Cannot move/reorder page
Asked by Stephen Kairys:

**Confluence Server**

**Win10**

**Chrome**

Hi,

I have several pages at the same level. Scrubbed example:

Dogs

Collies

Basset Hounds

Poodles

Retrievers

I needed to move **Poodles** to above **Retrievers**.

I do the following.

1. Select MOVE from the drop-down menu at the top of the screen.

2. Check the REORDER box at the bottom of the screen.

3. Click MOVE at the bottom of the screen.

4. Drag **Poodles** to above **Retrievers**.

5. Click REORDER at the bottom of the screen.

The page does not move.

I thought it might be an index problem, so we re-indexed, but the problem still occurs. OTOH, if I try to move **Retrievers** to below **Poodles**.

I also copied **Poodles** to a new page (**Copy of Poodles** ), deleted **Poodles** , and renamed **Copy of Poodles** to **Poodles**, but that process did not help. Woof! :)

Has anyone seen this behavior and found a workaround?

Full disclosure: In this Confluence instance, we're currently on 5.5.2 which is past end-of-line, but will be upgrading to 6.3.2 or higher Monday.


Answers:
author: Edwin Kyalangalilwa
body: Sounds like a permission issue.

<https://confluence.atlassian.com/conf56/moving-a-page-658736990.html>

comments: author: Stephen Kairys
body: Thanks for the suggestion. But, I definitely have full permissions. I can edit the page. And, I'm not restricted from it either. What should I look for next? ![RestrictionsScreenPerInabilitToMove(Reorder)Page.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/8440i80B81FCCCF3D8E61/image-size/large?v=v2&px=999 "RestrictionsScreenPerInabilitToMove(Reorder)Page.PNG")
Creating a national holidays page in Confluence
Asked by Mohammad Ali:

I am trying to create a page in Confluence that will display the yearly holidays. I want it to be dynamic. I am very new to this can anybody guide me? Thank you.


Answers:
author: Nic Brough -Adaptavist-
body: I'd write a user macro that pokes one of the calendar servers out on the internet for data and reformats it nicely for your page.

But, what do you mean by "dynamic"?
unreadable text in the macro header
Asked by Zden?k Luke?:

Hello,  
the unreadable text appeared in our Confluence instance. (see image bellow)  
How can i fix it?  

Thank you in advance for your help.  

<br />

Confluence 6.4.3 server, linux Centos 7, PostgreSQL 9.6  
------------------------------------------------------------------------------

![obrazek.png](/t5/image/serverpage/image-id/8429i3CB00BA87C75AFA9/image-size/large?v=v2&px=999 "obrazek.png")


Answers:
author: Andy Heinzer
body: Hi,

Does this strange text only appear when editing a page in Confluence? I have seen this behavior on a few different Confluence installations running on Linux environments. This tends to happen because the system is missing specific fonts that Confluence is expecting to use here. It might be possible that recent updates to certain Linux distros might have removed these fonts.

You can try to add these back with a the series of commands such as:

```
yum install dejavu-fonts-commonyum install dejavu-sans-fontsyum install dejavu-sans-mono-fonts
```

Regards,

Andy

comments: author: Zden?k Luke?
body: Hi Andy,  
problem solved!  

you're right, the problem appeared after the upgrade to Centos 7.4.  
What was confusing was that the problem occurred within a few days after recovering from backup.zip randomly on our many Confluence instances. ...of course, i have cleaned cache on browsers and in Confluence.  

Thank you very much,  
Hanz


Tags: font