|
Thanks to everyone that helped with this one. After
much frustration I finally wanted to see what was actually making it to the
server and after downloading the file in question, found that the whole file was
not making it to the server. The file was getting cut off at the bottom
around line 290 or so every time. Solution: download a different FTP program,
upload the file in question with it and voila no more errors.
Totally non-CF error just one of the many other
silly things that can make a very long day/evening.
Steve
----- Original Message -----
Sent: Wednesday, November 21, 2001 11:45
AM
Subject: RE: Weird Bugs...
I
did see something similar to this in older versions of ColdFusion
Studio. What would happen is that it would put stray non printable
characters in code so when you looked at the source, it looked great because
you could not see the bogus character.
Here
is another thought. Run the page on each machine and then view the
source code. Yes I know that the source code is converted into HTML but it
might give you a better clue as to where the code is actually breaking.
When you view the source, you should get it up to the point of where it
breaks. Sometimes the error can be a long way from where the processor
finally throws the error. This might also help if there is some kind of
silly character buried in the code. It might also help to point out any
malformed table, form or etc. code.
Steve,
It's a long shot but....
Speaking of weird bugs...has anyone else
besides me and my team ever had the error where you run a ColdFusion
template and it produces an error. And there is simply no error in the
code on that page. So, you copy the contents of the code to clipboard,
paste into a blank file, save the new file with a different name, delete the
previous file, and re-name the new file to the previous file's name.
Run it again, and presto...no error!
I've had this happen to me and the members of
my team once or twice over the last year (and has been re-produced at our
other offices around the world with absolutely no help from me...LOL).
It was a bug in CF 4.0 and higher (can't ever remember having the problem in
2.0 or 3.0)...but I was thinking that since nothing else seems to be
working, why not just try it.
Also, there is another bug in ColdFusion with
reference to query and template caching in CF 4.0 and 4.5 which
sometimes causes (can't be exactly duplicated every time), ColdFusion to
serve a page from memory if your DATASOURCE name isn't the exact same
capitalization as the datasource name defined in your ODBC datasource.
I understand that the DATASOURCE property in ColdFusion is supposed to be
case-insensative, but it's been documented in the Allaire Forums a few times
that unless your DATASOURCE name in your CFQUERY tag is the exact same
case-sensative capitalization as defined in your ODBC connection you'll
sometimes get a cached query returned to you instead of a new one, despite
whatever overrides you try. Don't know if this applies to CF 5.0 as
well (haven't experienced the glitch yet), but thought I'd
share.
Happy Thanksgiving to all!
Chuck McLean
----- Original Message -----
Sent: Wednesday, November 21, 2001
11:17 AM
Subject: RE: differences in cf 4.5 vs
cf 5
I do not think this should be effecting your page, but I notice
that you do not have CFLOCK tags around your queries and you are using a
session variable for the datasource name. You could also convert the
datasource name to the request scope in your Application.cfm file and
avoid the need for the CFLOCK tags (which I highly recommend). My
experience says this will be a REAL problem in CF 5.0 is you have shared
scope variables without using CFLOCK tags.
Almost makes me want to recommend the Microsoft approach -
uninstall and reinstall CF 5. I have looked at your code and did not
spot anything.
With debugging on on my local box it shows
get_pgs as having one record which is correct since I added that one in
access itself.
Below are the queries that are called in
the includes.
<cfquery name="get_pgs"
datasource="#session.data#"> SELECT ID, Link_to,
Page_name FROM content ORDER BY
ID </cfquery> <!--- This query populates the linkto
select box --->
<cfquery name="mod_qry"
datasource="#session.data#"> select * from
content where ID = #url.ID# </cfquery> <!---
This page prepopulates the modify page --->
<cfquery name="get_levels"
datasource="#session.data#"> SELECT Level_num FROM
Page_levels </cfquery>
Steve
----- Original Message -----
Sent: Tuesday, November 20, 2001
8:21 PM
Subject: RE: differences in cf
4.5 vs cf 5
well since we seem to be working WAY PAST 5pm, let me throw a
thought out
here, Where is get_pgs query being run, and do we KNOW it exists
prior to
trying to get it's recordcount?
line 311 says is it a query and that seems to be the only place we
look for
it besides it's recordcount on line 293, but I don't have all
those
cfincludes, so I don't know.
Interesting - I tried running document validation against
your document and got a ton of messages. However, they do not
seem to be correct. Seems the validator does not like input
statements inside of tables and table rows inside a form and a bunch
of silly stuff. I do not see the error in your code.
Perhaps the message about the comment tag as the first thing on the
page is valid. I tried a quick little page with a cfif statement but
had a comment tag as the first item on the page and it worked
OK.
Well, the little gremlin is back. The
error is occuring in the same area as before.
Error Diagnostic Information
Context validation error in tag CFIF
The tag is not correctly positioned relative to other tags in
the template: tag CFIF must have some content. This means that
there must be at least one tag, some text, or even just whitespace
characters between the <CFIF> and </CFIF> markers.
This problem may be due to a CFML comment that has no end
comment mark.
The error occurred while processing an element with a general
identifier of (CFIF), occupying document position (293:5) to
(293:30).
Source code attached.
Steve
----- Original Message -----
Sent: Tuesday, November 20,
2001 1:31 PM
Subject: RE: differences in
cf 4.5 vs cf 5
OK - plaquate me for a second. I want
you to try the following:
<cfif
get_pgs.RecordCount> <input
type="hidden" name="change_it"
value="N"> <select
name="link_to" size="4" multiple onchange="return
change_value();"> <cfloop
query="get_pgs">
<cfoutput> <option
value="#get_pgs.Page_Name# -
#get_pgs.ID#">#get_pgs.Page_Name#</option>
</cfoutput> </cfloop> </select> <cfelse> You
will automatically be linked to page
2. <input type="hidden"
name="link_to"
value="2"> </cfif>
Notice that I have removed
the CFOUTPUT tags around the entire statement and placed
them inside the CFLOOP and made a minor change to the CFIF
statement.
I did not have Strict validation
turned on, however it is now. I am still getting the same
results with 4.5 (everything works).
----- Original Message -----
Sent: Tuesday, November
20, 2001 12:36 PM
Subject: RE:
differences in cf 4.5 vs cf 5
While I agree with Charles completely, you
should get the same error on CF 4.5
BTW: Do you have Strict Validation turned
on in the Administrator?
Steve,
Odds are that you have some
of your code nested within CFIF statements somewhere, and
one of your beginning CFOUTPUT tags falls outside your
CFIF statements, and part of it gets processed, while the
end tag does not. There is nothing wrong with the
code block you posted, but I do notice that your error
message places it at line 294. Check your logic
above line 294, and you'll probably find an error similar
to what I described. If not, post all the code, and
I'll help you track it down.
Regards,
Charles F. McLean
III
Principal Member of Technical
Staff
Northrup Grummon Information
Technologies
----- Original Message
-----
Sent: Tuesday,
November 20, 2001 12:42 PM
Subject: Re:
differences in cf 4.5 vs cf 5
Below is the error message that comes up on the cf5
server, but not on the cf4.5 box. The opening cfoutput
in the code I sent earlier is line 294.
Context validation error in tag CFOUTPUT
The tag is not correctly positioned relative to other
tags in the template: tag CFOUTPUT must have an end tag.
An explicit end tag can be provided by adding
'</CFOUTPUT>'. If the body of the tag is empty you
can use the shortcut '<CFOUTPUT .../>'.
The error occurred while processing an element with a
general identifier of (CFOUTPUT), occupying document
position (294:4) to (294:13).
----- Original Message
-----
Sent: Tuesday,
November 20, 2001 11:39 AM
Subject: RE:
differences in cf 4.5 vs cf 5
Can you
elaborate? More specifically, what exactly does
the error say and/or where does it
point?
There really should be
no differences between the two environments unless you
have (give the code below).
BTW: Your CFIF
statement can be simplified to - <CFIF
get_pgs.RecordCount> assuming that get_pgs is a
valid query name. This shortcut notation will
return true if the RecordCount is not 0. You
also do not need the #'s inside your CFIF
statement. However, they are required on the
Option statement.
Does anyone know the
magic words to say to get a cf5 server to behave the
same as cf4.5 in regards to context validation
errors?
My local dev enviro is
cf4.5 however the servers my code will ultimately
live on have cf5 installed. After verifying
everything locally I pushed to the cf5 server and am
receiving multiple context validation errors on the
cf5 server, however everthing looks great on my
local environment. Any ideas?
This block of code runs
fine on 4.5 but chokes on 5.
<cfoutput> <cfif
#get_pgs.RecordCount# GTE
1> <input
type="hidden" name="change_it"
value="N"> <select
name="link_to" size="4" multiple onchange="return
change_value();"> <cfloop
query="get_pgs"> <option
value="#get_pgs.Page_Name# -
#get_pgs.ID#">#get_pgs.Page_Name#</option> </cfloop> </select> <cfelse> You
will automatically be linked to page
2. <input
type="hidden" name="link_to"
value="2"> </cfif> </cfoutput>
Steve
Black
|