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

My Space Blueprint creates a page without a title.

Mads S July 7, 2015

I've been working on developing a space blueprint for Confluence. To learn how to do it, I've essentially copied and pasted the code from 'Write a simple Confluence space blueprint', however, when I create my space the page that's created as the homepage has no title. (See below)

Testing Space.PNG

If I make it so that there's a child page (with the same homepage template) the child page gets the title that was specified as confluence.blueprints.space.example.homepage.name in the properties file.

I've tried looking for hidden characters which I could've copied from the website accidentally, but I think I've already got them all. (I'm using Notepad++ so I've just gone to View- Show Symbol- Show All Characters.) Anyone have any ideas about what's not working? Here's my js file, let me know if you want me to post other bits of code.

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.example.example: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);
		});
});

As a side question, I tried doing less copy/pasting as another attempt to create a functional space blueprint and ended up with the Create Space dialog hanging after I entered the space details - it seems to think there's already a page created with the same title in that space as it's creating it (the page title being the space name with a suffix, like in the above file - js is nearly identical save for some names). I've tried clearing cache in my browser, and I've definitely tried using space names that I haven't used before. Anything else I should try?

 

Thanks,

Mads

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Tim Eddelbüttel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2015

Hello Mads,

running into the same problem and after some testing i found this line is the problem:

<resource type="download" name="dialog-page.js" location="/soy/dialog-page.soy"/>

I've change it to

<resource type="download" name="create-space-dialog-page.soy.js" location="/soy/create-space-dialog-page.soy"/>
        <resource type="download" name="create-space-dialog-page.js" location="/js/create-space-dialog-page.js"/>

I use different file names so i hope this helps you.

I think the problem with the sample code is, that only the .soy file is added as ressource and not the .js file which to the wizard stuff (submit, pre-render, post, render).

Regards,
Tim 

Mads S July 16, 2015

Hmm I'd tried messing around with adding the .soy bit and didn't have any success. Looking at my code again, I think I've found the issue - I forgot to take out 'tutorial' because I didn't use that in the ids when I created the project. I still don't know what's wrong with the other space blueprint though...

0 votes
Francis Woon May 11, 2017

This resolve the issue whereby the .js wasn't able to get the AJS.I18n.getText().

The Write a simple Confluence Space Blueprint has it all wrong...very simple indeed

<transformation extension="js">
<transformer key="jsI18n"/>
</transformation>

<transformation extension="soy">
<transformer key="soyTransformer">
<functions>com.atlassian.confluence.plugins.soy:soy-core-functions</functions>
</transformer>
</transformation>

Caela Northey August 10, 2017

Thanks, this worked for me. Sure wish they'd keep these tutorials more up to date...

0 votes
Mads S August 22, 2015

My recommendation would be to double check all of the ids in your js file to make sure they line up with what you entered when you created the plugin (ie what's in the pom.xml file) - that's the one step I found where it's easy to end up with misreferenced ids when you compare with the Atlassian blueprints.

0 votes
Caroline Adams August 10, 2015

I'm still having the same problem, and oddly enough, every comparison that I've done to date with other Atlassian Space Blueprints (https://bitbucket.org/atlassian/confluence-knowledge-base), I don't see any difference that would cause this behavior. Spun on this for a long time. Adding a Context Provider like the one in Hello Blueprint prefixes all my pages with whatever I pass there.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events