Live-Template Error
When using the live-template macro, I am getting the following error message: Live-template:No template named 'template name' is accessible.
What is interesting is that it worked the first time I used it but I cannot get it to work in a new page.
Thank you and regards,
Kay
What is interesting is that it worked the first time I used it but I cannot get it to work in a new page.
Thank you and regards,
Kay
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Hi Kay,
Some templates are space specific and thus will exist in certain spaces but not others, can you please make sure that the template you specified in the live-template macro exists in the space that you are using the macro in? You can try to find out by going to create a new page and then click the link to select a template (this appears on the create page screen just underneath the title input box).
Regards,
Bo Wang -
Inappropriate?Bo,
Yes, the template is in the space where I have created the page using the live macro.
Thank you and regards,
Kay -
Inappropriate?Hmmm, that is quite odd, can you provide the template (both the name of the template as well as the contents) and the wiki markup you are trying to use so that I can try replicating your problem on my side? (if there is any confidential information in the template then please remove it before posting it here)
-
Inappropriate?The name of the template is: HVCA Test Template
{section}
{column:width=30%}
h4. Client Manager
@INFO|textarea@
{column}
{column:width=30%}
h4. TFCC and Bureau Rates
*TFCC*
@TFCC@
*Bureau*
@Bureau@
{column}
{column:width=30%}
h4. Bureau Account Manager
@INFO|textarea@
{column}
{section}
{section:border=true}
{section}
{section}
{column:width=50%}
h4. Program Overview
@INFO|textarea(5,50)@
{column}
{column:width=50%}
h4. Telecom Overview
@INFO|textarea(5,50)@
{column}
{section}
{section}
Contacts: {color:red}(additional contacts can be found in attached document){color}
{column:width=30%}
h4. 24/7 Contact
@INFO|textarea(5,25)@
{column}
{column:width=30%}
h4. Primary contact (business day)
@INFO|textarea(5,25)@
{column}
{column:width=30%}
h4. Other Contact
@INFO|textarea(5,25)@
{column}
{section}
{section}
{column:width=30%}
h4. Customer Size
@VAR@
{column}
{column:width=30%}
h4. Go Live Date
@VAR2@
{column}
{column:width=30%}
h4. Billing Contact
@VAR3|textarea(2,25)@
{column}
{section}
{section}
{column:width=100%}
h4. Testing Overview
@INFO|textarea(5,70)@
{column}
{section}
{section}
{column:width=100%}
h4. Weather Zones
@INFO|textarea(5,70)@
{column}
{section}
{section}
{column:width=100%}
h4. Equiment Info
@INFO|textarea(5,70)@
{column}
{section}
{section}
h4. HVCA Features
{column:width=20%}
h4. Inbound HVCA
@VAR|list(yes,no)@
{column}
{column:width=20%}
h4. Outidal
@VAR|list(yes,no)@
{column}
{column:width=20%}
h4. ASM
@VAR|list(yes,no)@
{column}
{column:width=20%}
h4. ASR
@VAR|list(yes,no)@
{column}
{column:width=20%}
h4. Broadcast
@VAR|list(yes,no)@
{column}
{column:width=20%}
h4. Interface
@VAR|list(DirConnect,DirDelivery,DirASMonly,WebFTP,LegacyBatch)@
{column}
{section}
{section}
{column:width=20%}
h4. Foreing Lang.
@VAR|list(yes,no)@
{column}
{column:width=20%}
h4. Redirect
@VAR|list(Network,Sonus)@
{column}
{column:width=20%}
h4. Admin program
@VAR|list(Phone,Web,PhoneAndWeb)@
{column}
{column:width=20%}
h4. Repeat Caller
@VAR|list(yes,no)@
{column}
{column:width=20%}
h4. OMS
@VAR|textarea(2,35)@
{column}
{section} -
Inappropriate?Bo,
Have you had any luck diagnosing the problem with my template?
Thank you and regards,
Kay -
Inappropriate?I can recommend looking to see if there is a 'space' before or after the template name (in both the template, and on the page that is calling it). I have noticed at my company, this can happen and it will yield the same error you are receiving.
Ex: If my template name is "Team Name - Projects", and on the page it says it can't find "Team Name - Projects " <-- Notice the space at the end. This is what I have seen happen. Try removing the spaces.
If you have the Linking Plug-in installed you can write a link for adding new page that call this template, so that there is no confusion.
{add-page:template=Team Name - Projects|live=false}Click here to add a new Project{add-page}
But check the for the extra space 1st, I am 99% sure this is it. -
Inappropriate?Hi Kay,
I agree with kykorner that this might be the cause as I am unable to replicate the problem using my local Confluence when referencing the template name exactly, however, with the excess white space, it is unable to find the template, make sure that your live template macro does not have any excess white space and also make sure that the template name itself does not have any leading or trailing white spaces, please let us know if you are still experiencing the problem after trying these things.
If possible, can you please raise an issue in http://jira.adaptavist.com/browse/SCAFF if one does not exist, trimming the template name to remove excess white space should be quite simple and avoid future confusion when using live templates.
Regards,
Bo Wang -
Inappropriate?Now my original problem with the live-template macro has magically gone away without me doing anything at all. But, I do not have an option to save data in the template once I enter it. I don't think it is functioning fully.
Thanks in advance,
Kay -
Inappropriate?Hi Kay,
Good to hear that one problem is resolved :)
In regards to updating the data, this is because the fields you are using in your template is the Confluence default template input fields which does not work in conjunction with live-template, to have updatable fields, please use the ones that come with the scaffolding plugin such as text-data (or any other xxx-data macro).
Please visit http://www.customware.net/repository/... to see a full list of possible macros you can use to generate the different xxx-data fields.
Regards,
Bo Wang -
Inappropriate?To complement what Bo is telling you, basically the two '@' symbols allows you to enter a form-like value one time, this is saved directly to the page. Live Templates are designed to work with the Scaffolding Plug-in, not the '@' symbol. Meaning, for rather than having the '@' sybol for "Enter your Name Here", you would have {text-data:name|width=200px|other parameters...}{text-data}
You the link above that Bo sent you, and this will work. Any questions, just ask, but I think you are on the right track. -
Inappropriate?When I attempted to add the the following macro to the live template:
{text-data:name|type=area}{text-data}
I received this error: Error formatting macro: text-data: java.lang.NullPointerException
Thank you and regards,
Kay -
Inappropriate?The log Info is below.
{noformat}
2009-08-03 15:31:41,965 ERROR [http-9443-4] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error formatting macro: text-data
-- referer: https://wiki
url: /pages/templates/doeditpagetemplate.action | userName: kbrown | action: doeditpagetemplate java.lang.NullPointerException
at org.randombits.confluence.metadata.MetadataManager.loadReadableData(MetadataManager.java:225)
at net.customware.confluence.plugin.scaffolding.ScaffoldInfo.findSavedFields(ScaffoldInfo.java:253)
at net.customware.confluence.plugin.scaffolding.ScaffoldInfo.findFields(ScaffoldInfo.java:229)
at net.customware.confluence.plugin.scaffolding.ScaffoldInfo.initFields(ScaffoldInfo.java:133)
at net.customware.confluence.plugin.scaffolding.ScaffoldInfo.<init>(ScaffoldInfo.java:142)
at net.customware.confluence.plugin.scaffolding.macro.AbstractDataMacro.createScaffoldInfo(AbstractDataMacro.java:148)
at net.customware.confluence.plugin.scaffolding.macro.AbstractDataMacro.createMacroInfo(AbstractDataMacro.java:130)
at org.randombits.confluence.support.ConfluenceMacro.execute(ConfluenceMacro.java:54)
{noformat}
</init> -
Inappropriate?Hi Kay....I spend 10 mins trying to convert your mark-up above with the @ symbols to a scaffold page. I just tried this code and it works. I left your section and columns alone, you can specify the parameters on the code below.
------
{section}
{column:width=30%}
h4. Client Manager
{text-data:ClientManager|type=area}{text-data}
{column}
{column:width=30%}
h4. TFCC and Bureau Rates
*TFCC*
{text-data:tfcc}{text-data}
*Bureau*
{text-data:bureau}{text-data}
{column}
{column:width=30%}
h4. Bureau Account Manager
{text-data:BAM}{text-data}
{column}
{section}
{section}
{column:width=50%}
h4. Program Overview
{text-data:PO|type=area}{text-data}
{column}
{column:width=50%}
h4. Telecom Overview
{text-data:TO|type=area}{text-data}
{column}
{section}
{section}
Contacts: {color:red}(additional contacts can be found in attached document){color}
{column:width=30%}
h4. 24/7 Contact
{text-data:contact}{text-data}
{column}
{column:width=30%}
h4. Primary contact (business day)
{text-data:PC}{text-data}
{column}
{column:width=30%}
h4. Other Contact
{text-data:otherContact|type=area}{text-data}
{column}
{section}
{section}
{column:width=30%}
h4. Customer Size
{text-data:custSize}{text-data}
{column}
{column:width=30%}
h4. Go Live Date
{text-data:goLiveDate}{text-data}
{column}
{column:width=30%}
h4. Billing Contact
{text-data:billingContact|type=area}{text-data}
{column}
{section}
{section}
{column:width=100%}
h4. Testing Overview
{text-data:testingOverview|type=area}{text-data}
{column}
{section}
{section}
{column:width=100%}
h4. Weather Zones
{text-data:WZ|type=area}{text-data}
{column}
{section}
{section}
{column:width=100%}
h4. Equiment Info
{text-data:equipInfo|type=area}{text-data}
{column}
{section}
{section}
h4. HVCA Features
{column:width=20%}
h4. Inbound HVCA
{list-data:inboundHVCA|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Outidal
{list-data:outidal|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. ASM
{list-data:asm|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. ASR
{list-data:asr|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Broadcast
{list-data:broadcast|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Interface
{list-data:interface|blank=true}
{list-option}DirConnect{list-option}
{list-option}DirDelivery{list-option}
{list-option}DirASMonly{list-option}
{list-option}WebFTP{list-option}
{list-option}LegacyBatch{list-option}
{list-data}
{column}
{section}
{section}
{column:width=20%}
h4. Foreing Lang.
{list-data:foreignLang|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Redirect
{list-data:redirect|blank=true}
{list-option}Network{list-option}
{list-option}Sonus{list-option}
{list-data}
{column}
{column:width=20%}
h4. Admin program
{list-data:AdminProgram|blank=true}
{list-option}Phone{list-option}
{list-option}Web{list-option}
{list-option}Phone And Web{list-option}
{list-data}
{column}
{column:width=20%}
h4. Repeat Caller
{list-data:repeatCaller|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. OMS
{text-data:OMS|type=area}{text-data}
{column}
{section}
-----
If this code does work for you and yielding the same error, please make sure you have the Confluence (what version are you running?) and the Scaffold Plugin (make sure this version is compatatible with your version of Confluence). -
Inappropriate?Kykorner,
The template you created works for both 2.10 and 3.0 (which we are running in a test environment). Thank you so much. I really appreciate it.
Regards,
Kay
I’m Very Happy and Thankful
-
Inappropriate?I have two area text boxes that are too close together. Is there a way to put some space between them?
Thank you and regards,
Kay -
Inappropriate?A few quick questions before I can answer:
- Are we talking about the same template that I created you above? (If so, between which two fields?)
- Are we talking vertical spacing or horizontal(text-areas are side by side, or on top of one another)?
Give a quick example if you can, so I can quickly determine what you are trying to do. -
Inappropriate?Hi Kyle,
Yes, it is the same template that you created above. The two fields are Program Overview and Telecom Overview. And I would like to create more space between them horizontally.
Thank you and regards,
Kay -
Inappropriate?Since this is done with Sections and Columns, the 'Program' and 'Telcom' are in their own {Section}. Meaning, you can do this by changing the column sizes. Above it is 3 sections, each 30%, and the Program and Telcom is 1 section w/ 2 columns (each 50%). Try replacing the code for the Program and Telcom section with this:
{section}
{column:width=60%}
h4. Program Overview
{text-data:PO|type=area}{text-data}
{column}
{column:width=30%}
h4. Telecom Overview
{text-data:TO|type=area}{text-data}
{column}
{section} -
Inappropriate?Hi Kyle,
I made the changes as you suggested and the two fields are still too close together after text is added. I have a jpeg I caN e-mail you if you would like to see it.
Thank you and regards,
Kay -
Inappropriate?Hmmm....that's odd..I tried it before giving you the code.
You can play with the column widths in the code I gave you (my last reply).
Here is the entire code with the changes I made for you (above), but added into the code:
{section}
{column:width=30%}
h4. Client Manager
{text-data:ClientManager|type=area}{text-data}
{column}
{column:width=30%}
h4. TFCC and Bureau Rates
*TFCC*
{text-data:tfcc}{text-data}
*Bureau*
{text-data:bureau}{text-data}
{column}
{column:width=30%}
h4. Bureau Account Manager
{text-data:BAM}{text-data}
{column}
{section}
{section}
{column:width=60%}
h4. Program Overview
{text-data:PO|type=area}{text-data}
{column}
{column:width=30%}
h4. Telecom Overview
{text-data:TO|type=area}{text-data}
{column}
{section}
{section}
Contacts: {color:red}(additional contacts can be found in attached document){color}
{column:width=30%}
h4. 24/7 Contact
{text-data:contact}{text-data}
{column}
{column:width=30%}
h4. Primary contact (business day)
{text-data:PC}{text-data}
{column}
{column:width=30%}
h4. Other Contact
{text-data:otherContact|type=area}{text-data}
{column}
{section}
{section}
{column:width=30%}
h4. Customer Size
{text-data:custSize}{text-data}
{column}
{column:width=30%}
h4. Go Live Date
{text-data:goLiveDate}{text-data}
{column}
{column:width=30%}
h4. Billing Contact
{text-data:billingContact|type=area}{text-data}
{column}
{section}
{section}
{column:width=100%}
h4. Testing Overview
{text-data:testingOverview|type=area}{text-data}
{column}
{section}
{section}
{column:width=100%}
h4. Weather Zones
{text-data:WZ|type=area}{text-data}
{column}
{section}
{section}
{column:width=100%}
h4. Equiment Info
{text-data:equipInfo|type=area}{text-data}
{column}
{section}
{section}
h4. HVCA Features
{column:width=20%}
h4. Inbound HVCA
{list-data:inboundHVCA|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Outidal
{list-data:outidal|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. ASM
{list-data:asm|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. ASR
{list-data:asr|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Broadcast
{list-data:broadcast|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Interface
{list-data:interface|blank=true}
{list-option}DirConnect{list-option}
{list-option}DirDelivery{list-option}
{list-option}DirASMonly{list-option}
{list-option}WebFTP{list-option}
{list-option}LegacyBatch{list-option}
{list-data}
{column}
{section}
{section}
{column:width=20%}
h4. Foreing Lang.
{list-data:foreignLang|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Redirect
{list-data:redirect|blank=true}
{list-option}Network{list-option}
{list-option}Sonus{list-option}
{list-data}
{column}
{column:width=20%}
h4. Admin program
{list-data:AdminProgram|blank=true}
{list-option}Phone{list-option}
{list-option}Web{list-option}
{list-option}Phone And Web{list-option}
{list-data}
{column}
{column:width=20%}
h4. Repeat Caller
{list-data:repeatCaller|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. OMS
{text-data:OMS|type=area}{text-data}
{column}
{section}
My understanding was that you wanted the Program Overview to align vertically with the box above it (notated by my red line I drew). If you were trying to move it closer horizontally, then change the column widths from 60/30, to 30/60, or any other combination. If you are trying to add more vertical space, you can
if between {section} tags, add back slashes
\\ \\
Or add them above or below any individual field to move it down.
I hope this helps. -
Inappropriate?I see....I didn't have any text populated in the boxes when I replied, I was simply looking at edit mode. The solution is for you to look at that section (has 2 columrns). The simple solution is to add a middle section (with not content).
Also, I did not realize the amount of text you were potentially typing in those boxes, so I added height and width parameters (which you can do to any text-data that has a type=area).
So I split the 2 columns (60/30) into 3 columns (40/20/40), and gave the text boxes heights of 80px and widths of 350px. Try this code:
{section}
{column:width=30%}
h4. Client Manager
{text-data:ClientManager|type=area}{text-data}
{column}
{column:width=30%}
h4. TFCC and Bureau Rates
*TFCC*
{text-data:tfcc}{text-data}
*Bureau*
{text-data:bureau}{text-data}
{column}
{column:width=30%}
h4. Bureau Account Manager
{text-data:BAM}{text-data}
{column}
{section}
{section}
{column:width=40%}
h4. Program Overview
{text-data:PO|type=area|width=350px|height=80px}{text-data}
{column}
{column:width=20%}
{column}
{column:width=40%}
h4. Telecom Overview
{text-data:TO|type=area|width=350px|height=80px}{text-data}
{column}
{section}
{section}
Contacts: {color:red}(additional contacts can be found in attached document){color}
{column:width=30%}
h4. 24/7 Contact
{text-data:contact}{text-data}
{column}
{column:width=30%}
h4. Primary contact (business day)
{text-data:PC}{text-data}
{column}
{column:width=30%}
h4. Other Contact
{text-data:otherContact|type=area}{text-data}
{column}
{section}
{section}
{column:width=30%}
h4. Customer Size
{text-data:custSize}{text-data}
{column}
{column:width=30%}
h4. Go Live Date
{text-data:goLiveDate}{text-data}
{column}
{column:width=30%}
h4. Billing Contact
{text-data:billingContact|type=area}{text-data}
{column}
{section}
{section}
{column:width=100%}
h4. Testing Overview
{text-data:testingOverview|type=area}{text-data}
{column}
{section}
{section}
{column:width=100%}
h4. Weather Zones
{text-data:WZ|type=area}{text-data}
{column}
{section}
{section}
{column:width=100%}
h4. Equiment Info
{text-data:equipInfo|type=area}{text-data}
{column}
{section}
{section}
h4. HVCA Features
{column:width=20%}
h4. Inbound HVCA
{list-data:inboundHVCA|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Outidal
{list-data:outidal|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. ASM
{list-data:asm|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. ASR
{list-data:asr|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Broadcast
{list-data:broadcast|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Interface
{list-data:interface|blank=true}
{list-option}DirConnect{list-option}
{list-option}DirDelivery{list-option}
{list-option}DirASMonly{list-option}
{list-option}WebFTP{list-option}
{list-option}LegacyBatch{list-option}
{list-data}
{column}
{section}
{section}
{column:width=20%}
h4. Foreing Lang.
{list-data:foreignLang|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. Redirect
{list-data:redirect|blank=true}
{list-option}Network{list-option}
{list-option}Sonus{list-option}
{list-data}
{column}
{column:width=20%}
h4. Admin program
{list-data:AdminProgram|blank=true}
{list-option}Phone{list-option}
{list-option}Web{list-option}
{list-option}Phone And Web{list-option}
{list-data}
{column}
{column:width=20%}
h4. Repeat Caller
{list-data:repeatCaller|blank=true}
{list-option}Yes{list-option}
{list-option}No{list-option}
{list-data}
{column}
{column:width=20%}
h4. OMS
{text-data:OMS|type=area}{text-data}
{column}
{section}
-
Inappropriate?my next project is to create a report that will pull info from the documents we create with the above template. I tried the code below, but it is not working.
{report-table}
{content-reporter:space=HVCA|types=page|scope=HVCA Client Services Home>children}
{content-reporter}
{report-column:title=Client Manager}
{report-info:text-data:ClientManager}
{report-column}
{report-table}
{section}
Thanks again for all of your help.
Regards,
Kay -
Inappropriate?Hi Kay,
A couple of things to note:
1. To access Scaffolding data from reporting you need to use the "data" prefix, not "text-data". In fact you use 'data:' for all types of scaffold fields (number, dates, etc), not just text. See here for more info.
2. In general, try to use {local-reporter} instead of {content-reporter} where you can. It will be much more efficient. Any time your pages are children or descendents of one other page, it will be much faster.
I've updated your report with the above in mind.
{report-table}
{local-reporter:page:children|source=HVCA Client Services Home}
{local-reporter}
{report-column:title=Client Manager}
{report-info:data:ClientManager}
{report-column}
{report-table}
Hope that works for you.
P.S. Kudos to Kyle for the big assist here!
-
Inappropriate?My report is working beautifully. Thanks.
I have a table in a live template and when I enter numbers into it, it only allows me one decimal place. I need two decimal places. Here is the code:
| Minimum | ${number-data:XXXXMinRate|decimal=true}/hr | ${number-data:XXXMinRate|decimal=true}/hr |
| Hourly | ${number-data:XXXXHourlyRate|decimal=true}/hr | ${number-data:XXXHourlyRate|decimal=true}/hr |
Thanks,
Kay -
Inappropriate?Have you tried setting the number format? Eg:
{number-data:XXXXMinRate|decimal=true|format=#,##0.00}
By default, if your number will just display on decimal. If you enter more, they will all be displayed, which is probably not what you're after either. Specifying the format means it will be displayed consistently.
-
Inappropriate?David,
Thank you very much.
Regards,
Kay
Loading Profile...



EMPLOYEE


EMPLOYEE