Highlighted

Variables scope variable suddenly not working

LEGEND ,
Oct 19, 2015

Copy link to clipboard

Copied

Hello, all,

Can anyone suggest reasons as to why, after 8 months of working fine, a variable set specifically in the VARIABLES scope would suddenly stop working?

In my Application.cfc file, within the "onRequestStart" function, I have the following line:

<cfset variables.praglink = "//" & cgi.server_name />

It's been working since March of this year.  This morning, I open a page in the browser (my DEV environment uses one physical machine for CF, one physical machine for DB, and my development system), and get the following error message:

Element PRAGLINK is undefined in VARIABLES

The error occurred in {dev path}/wwwroot/public/header.cfm: line 20

header.cfm line 20 is:

<link rel="stylesheet" type="text/css" href="<cfoutput>#variables.praglink#</cfoutput>/style/public.css" />

It was working fine, Friday; today, not at all.

All the other variables set in the variable scope are present.  CFDUMP shows the rest are working.  Just not PRAGLINK.

I've reboot the server, restarted the CF service, no change.

Thoughts?

V/r,

^_^

Views

196

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Variables scope variable suddenly not working

LEGEND ,
Oct 19, 2015

Copy link to clipboard

Copied

Hello, all,

Can anyone suggest reasons as to why, after 8 months of working fine, a variable set specifically in the VARIABLES scope would suddenly stop working?

In my Application.cfc file, within the "onRequestStart" function, I have the following line:

<cfset variables.praglink = "//" & cgi.server_name />

It's been working since March of this year.  This morning, I open a page in the browser (my DEV environment uses one physical machine for CF, one physical machine for DB, and my development system), and get the following error message:

Element PRAGLINK is undefined in VARIABLES

The error occurred in {dev path}/wwwroot/public/header.cfm: line 20

header.cfm line 20 is:

<link rel="stylesheet" type="text/css" href="<cfoutput>#variables.praglink#</cfoutput>/style/public.css" />

It was working fine, Friday; today, not at all.

All the other variables set in the variable scope are present.  CFDUMP shows the rest are working.  Just not PRAGLINK.

I've reboot the server, restarted the CF service, no change.

Thoughts?

V/r,

^_^

Views

197

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 19, 2015 0
Adobe Community Professional ,
Oct 19, 2015

Copy link to clipboard

Copied

Even if it worled, you would have been taking chances. The scope to use in onRequestStart is request.praglink. What's in a name? Then again, I am sure you know that already.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 19, 2015 0
LEGEND ,
Oct 19, 2015

Copy link to clipboard

Copied

Hi, BKBK‌,

(shrug) I was in a hurry when I wrote it; I can change it. 

And I figured out what was wrong, and it really annoys me that CF couldn't point-blank TELL me what the issue was.

As it turns out, there is a query that runs on every page load.  The database backup folders were taking up all the disk space on the database.  So, the DSN was breaking because of "ORA-00257; archiver error.  Connect internal only, until freed."  Instead of the error page being displayed, which also emails me the error details, it just decided to not set that variable (just that ONE variable) and break my stuff.

I manually set the variable in my header.cfm document.  That's when I finally got my error message with details emailed to me.

WTF???  Nothing in the logs to indicate why the error template was not triggered.

V/r,

^_^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 19, 2015 0
Advocate ,
Oct 20, 2015

Copy link to clipboard

Copied

Request is a better scope to use but this may be a secondary error you are seeing here. If you have code executing before the cfset that throws an exception, and you have an error trap that uses a common output template, this may be a case where variables.praglink really is not set (I know, I have had similar issue like this).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 20, 2015 0