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

Content blueprint has no ContentTemplateRef with key: simplebp-template2

Christian Siemers April 10, 2017

Hi,
I'm trying to follow the tutorials writing a blueprint for confluence ( 5.10.7 )

But i got stuck at  Write an advanced blueprint plugin
at step 1: Choosing between templates.

 when i try to create a page from the second template I get the error:

We can't create that blueprint right now.
Content blueprint has no ContentTemplateRef with key: simplebp-template2

It seems like the reference between the

....
</web-item>
<!-- Template for Blueprint -->
<content-template key="simplebp-template" template-title-key="my.blueprint.title">
<resource name="template" type="download" location="/templates/mytemplate.xml" />
</content-template>

<!-- Second Template for Blueprint -->
<content-template key="simplebp-template2" template-title-key="my.blueprint.title2">
<resource name="template" type="download" location="/templates/mytemplate2.xml" />
</content-template>
</atlassian-plugin>

in the atlassian-plugin.xml and the

 

		<option value="simplebp-template2">{getText('my.blueprint.title2')}</option>

in the simplebp.soy

I think the reference between these two doesn't work...

When i change the value (simplebp-template2) of the second template in the soy file to simplebp-template it will create the first template.

 

Regards,
Christian

 

 

3 answers

1 vote
Cris Kinross July 10, 2017

This was a problem for me as well - until I cleaned out my folder and removed the baggage from previous builds. It worked beautifully once things were cleaned up a bit.

 

Try this:

clean the confluence server folder periodically
Stop it by Ctrl+C
Make sure that plugin java process exited. In linux: ps -ef | grep java or through Task Manager in windows. Kill it if needed.
in project folder run: atlas-clean
launch again atlas-run or atlas-debug

0 votes
Martin Röhrs (Tini) May 3, 2017

I got stuck at the same tutorial. Nicolas' solution wasn't applicable since the <content-template>s were already before the <blueprint>.

A colleague advised me to create a standalone confluence instance with atlas-run-standalone and use atlas-cli instead of QuickReload even though it's deprecated. That did the trick for me without changing anything in my files. I'm not sure what exactly the problem was so this is more of a workaround, but it works for me...

0 votes
Nicolas Müller April 23, 2017

Found the solution: Put the <content-template>s before their blueprint reference, like so:

 

<!-- Templates -->
<content-template key="template_version1" template-title-key="template_version1.title">
<resource name="template" type="download" location="/templates/version_1.xml" />
</content-template>

<content-template key="template_version2" template-title-key="template_version2.title">
<resource name="template" type="download" location="/templates/version_2.xml" />
</content-template>

<!-- Blueprint -->
<blueprint key="blp" index-key="indx">
<content-template ref="template_version1" />
<content-template ref="template_version2" />

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events