?
Solved

Invalid CFML Construct - setting a variable to equal two or more coldfusion variables

Posted on 2006-06-19
5
Medium Priority
?
983 Views
Last Modified: 2013-12-24
Here's what I'm trying to do:

In the Application.cfm, set variables as
<cfparam name='FolderLevelOne'default='Corporate'>
<cfparam name='FolderLevelTwo'default='AETIA'>

Then use that to create more variables...
<cfparam name='docs'default='#FolderLevelOne#/#FolderLevelTwo/docs/'>

Here is the full example and the error. I just noticed that it seems to pass by line 16 but error on line 18...??
<cfparam name='Level'default='2'><!--- Level off of root --->
<cfparam name='FolderLevelOne'default='Corporate'><!--- Determined by value for Level. Corresponds to names of folder sublevels from wwwroot --->
<cfparam name='FolderLevelTwo'default='AETIA'><!--- Folder Level Two in the AETIA folder under Corporate --->
<cfparam name='sUrl'default='AKTitleHome.cfm'><!--- .CFM of Home Site --->
<cfparam name='sf1'default='#FolderLevelOne#\'><!--- sf[n] where n=number of directory folder levels files are held off of the wwwroot folder --->
<cfparam name='sf2'default='#FolderLevelTwo#\'><!--- sf[n] where n=number of directory folder levels files are held off of the wwwroot folder --->
<cfapplication name="CMS AETIA"sessionmanagement="yes"setclientcookies="yes"sessiontimeout="#createtimespan(0,1,0,0)#"loginstorage="session"><!--- Application Variables --->
<cfparam name="session.auth.isloggedin"default="no"><!--- Sets the default value that a user is not logged in --->
<cfparam name="db"default='testemp'><!--- Value of the database --->
<cfparam name='siteID'default='17'><!--- Used to default a selected site. Value comes from the sID (Site ID) from the Sites table in the Employee Database (Emp.mdb) --->
<cfparam name="fail"default="none"><!--- Variable used during the login process --->
<cfparam name='PageEditor'default='406'><!--- Default Page Editor for site. Should always be active WebMaster --->
<cfparam name="root"default="CMS.cfm"><!--- Root file of the CMS Application --->
<cfparam name="siteroot"default='AETIA'><!--- Root of the site being Administered. All sites under this value appear on the page when navigating to the defined 'sUrl' --->
<cfparam name='domain'default='http://test-intranet.firstbankak.com/'><!--- Variable to hold domain name in case value changes --->
<cfparam name='docs'default='#FolderLevelOne#/#FolderLevelTwo/docs/'><!--- Web Address after domain value to documents folder --->
<cfparam name="pre"default="../../../"><!--- Navigates back to wwwroot from CMS --->
<cfparam name='parent'default='#FolderLevelOne#/#FolderLevelTwo#/#sUrl#'><!--- Path to Site Root of Site being administered. --->
<cfparam name="path"default='C:\InetPub\wwwroot\#FolderLevelOne#\#FolderLevelTwo#\docs\'><!--- Path on server to document folder of the Site Root --->
<cfparam name="temppath"default='C:\InetPub\wwwroot\#FolderLevelOne#\#FolderLevelTwo#\docs\Temp\'><!--- Path on server to the temp folder used when uploading new files to check for existance --->
<cfparam name="delSiteLog"default="C:\InetPub\wwwroot\#FolderLevelOne#\#FolderLevelTwo#\CMS\Logs\DeletedSites.log"><!--- Path to Deleted Sites log --->
<cfparam name="delHeadLog"default="C:\InetPub\wwwroot\#FolderLevelOne#\#FolderLevelTwo#\CMS\Logs\DeletedHeadings.log"><!--- Path to Deleted Headings log --->
<cfparam name="delFileLog"default="C:\InetPub\wwwroot\#FolderLevelOne#\#FolderLevelTwo#\CMS\Logs\DeletedFiles.log"><!--- Path to Deleted Files log --->
<cfparam name="delLinkLog"default="C:\InetPub\wwwroot\#FolderLevelOne#\#FolderLevelTwo#\CMS\Logs\DeletedLinks.log"><!--- Path to Deleted Links log --->
<cfparam name='search'default='#pre#Search/SearchHome.cfm'><!--- Path to Shared Search Home page --->


Error:
Invalid CFML construct found on line 18 at column 16.  
ColdFusion was looking at the following text:
parent

The CFML compiler was processing:

An expression that began on line 16, column 47.
Your expression might be missing an ending "#" (it might look like #expr ).
the tag attribute "default", on line 16, column 21.
a cfparam tag beginning on line 16, column 2.
 
 
The error occurred in C:\Inetpub\wwwroot\corporate\AETIA\CMS\Application.cfm: line 18
 
16 : <cfparam name='docs'default='#FolderLevelOne#/#FolderLevelTwo/docs/'><!--- Web Address after domain value to documents folder --->
17 : <cfparam name="pre"default="../../../"><!--- Navigates back to wwwroot from CMS --->
18 : <cfparam name='parent'default='#FolderLevelOne#/#FolderLevelTwo#/#sUrl#'><!--- Path to Site Root of Site being administered. --->
19 : <cfparam name="path"default='C:\InetPub\wwwroot\#FolderLevelOne#\#FolderLevelTwo#\docs\'><!--- Path on server to document folder of the Site Root --->
20 : <cfparam name="temppath"default='C:\InetPub\wwwroot\#FolderLevelOne#\#FolderLevelTwo#\docs\Temp\'><!--- Path on server to the temp folder used when uploading new files to check for existance --->
 




0
Comment
Question by:firstbankak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Author Comment

by:firstbankak
ID: 16939062
Or no, it looks like Line 16 is causing the error. How do I set the parameters the way I'm intending?
0
 
LVL 18

Expert Comment

by:Plucka
ID: 16939287
firstbankak,

<cfparam name='domain'default='http://test-intranet.firstbankak.com/'>

Should be

<cfparam name="domain" default="http://test-intranet.firstbankak.com/" />

NOTE: Double quotes and a space between the paramater names.

Regards
Plucka
0
 
LVL 18

Expert Comment

by:Plucka
ID: 16939293
So,

<cfparam name='docs'default='#FolderLevelOne#/#FolderLevelTwo/docs/'>

Should be

<cfparam name="docs" default="#FolderLevelOne#/#FolderLevelTwo/docs/" />
0
 
LVL 7

Accepted Solution

by:
aseusainc earned 2000 total points
ID: 16939620
You're missing a #.

Try:

<cfparam name="docs" default="#FolderLevelOne#/#FolderLevelTwo#/docs/">
0
 

Author Comment

by:firstbankak
ID: 16944218
Thanks aseusainc, those things start disappearing when you've been staring at it forever! That fixed it perfectly.

Plucka, I don't think the single and double quotes matter; they can be used interchangeably. At least for me it has been working that way. Opening and closing marks just need to match....
0

Featured Post

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question