Hello
I am trying to do the space-blueprint tutorial. But the plugin does not run properly. The space creation wizard does not appear.
In my browser console I have this error, when I create a new space using my blueprint :
Uncaught Error: wizard points to a non-existent Soy template ‘Confluence.SpaceBlueprints.Example.dialogForm’. Check your web-resources or server logs.
Here is my space-blueprint.js:
AJS.bind("blueprint.wizard-register.ready", function () {
function submitExampleSpace(e, state) {
state.pageData.ContentPageTitle = state.pageData.name + " " + AJS.I18n.getText("confluence.blueprints.space.example.home.title.suffix");
return Confluence.SpaceBlueprint.CommonWizardBindings.submit(e, state);
}
function preRenderExampleSpace(e, state) {
state.soyRenderContext['atlToken'] = AJS.Meta.get('atl-token');
state.soyRenderContext['showSpacePermission'] = false;
}
Confluence.Blueprint.setWizard('com.example.plugins.tutorial.confluence.space-blueprint:example-space-blueprint-item', function(wizard) {
wizard.on("submit.exampleSpaceId", submitExampleSpace);
wizard.on("pre-render.exampleSpaceId", preRenderExampleSpace);
wizard.on("post-render.exampleSpaceId", Confluence.SpaceBlueprint.CommonWizardBindings.postRender);
});
});
my dialog-page.soy:
{namespace Confluence.SpaceBlueprints.Example}
/**
* Dialog form template
*
* @param atlToken the XSRF token to send with the form
* @param? fieldErrors the map of errors to display keyed by field name
* @param? name initial value for the name field
* @param? key initial value for the key field
*/
{template .dialogForm}
<form action="#" method="post" id="decisions-form" class="common-space-form aui">
{call Confluence.Templates.Blueprints.CreateSpace.createSpaceFormFields}
{param showSpacePermission: false /}
{param fieldErrors: $fieldErrors /}
{param name: $name /}
{param key: $key /}
{/call}
<input type="hidden" name="atl_token" value="{$atlToken}" />
</form>
{/template}
my pom.xml
<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}" />
<param name="plugin-icon">images/pluginIcon.png</param>
<param name="plugin-logo">images/pluginLogo.png</param>
</plugin-info>
<!-- add our i18n resource -->
<resource type="i18n" name="i18n" location="space-blueprint"/>
<!-- add our web resources -->
<web-resource key="space-blueprint-resources" name="space-blueprint Web Resources">
<transformation extension="soy">
<transformer key="soyTransformer">
<functions>com.atlassian.confluence.plugins.soy:soy-core-functions</functions>
</transformer>
</transformation>
<transformation extension="js">
<transformer key="jsI18n"/>
</transformation>
<resource type="download" name="dialog-page.js" location="/soy/dialog-page.soy"/>
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="space-blueprint.css" location="/css/space-blueprint.css"/>
<resource type="download" name="space-blueprint.js" location="/js/space-blueprint.js"/>
<resource type="download" name="images/" location="/images"/>
<context>space-blueprint</context>
</web-resource>
<web-item key='example-space-blueprint-item' i18n-name-key='confluence.blueprints.space.example.name'
section='system.create.space.dialog/content'>
<description key='confluence.blueprints.space.example.description'/>
<param name='blueprintKey' value='example-space-blueprint'/>
</web-item>
<space-blueprint key="example-space-blueprint" i18n-name-key="confluence.blueprints.space.example.name" category="examples">
<content-template ref="example-space-homepage-template"/>
<dialog-wizard key="example-space-blueprint-wizard">
<dialog-page id="exampleSpaceId"
template-key="Confluence.SpaceBlueprints.Example.dialogForm"
title-key="confluence.blueprints.space.example.dialog.create.title"
description-header-key="confluence.blueprints.space.example.dialog.create.heading"
description-content-key="confluence.blueprints.space.example.dialog.create.description"
last="true"/>
</dialog-wizard>
</space-blueprint>
<content-template key="example-space-homepage-template" i18n-name-key="confluence.blueprints.space.example.homepage.name">
<description key="confluence.blueprints.space.example.homepage.desc"/>
<resource name="template" type="download" location="/xml/example-space-home.xml"/>
</content-template>
</atlassian-plugin>