Re: CFQUERY immediately throws blank CF error and HTTP 500 code when more than 50 records will be returned (CF6)

2013-07-10 Thread Chris Johnson

Not sure.. we don't handle much of the system software/hardware on the box.  Do 
you know what that may affect or how to check when it was updated?




Has anyone updated the java version by any chance

Russ Michaels
www.michaels.me.uk
 On 9 Jul 2013 23:11, Chris Johnson ejohn...@directalliance.com wrote:

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356161
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CFQUERY immediately throws blank CF error and HTTP 500 code when more than 50 records will be returned (CF6)

2013-07-09 Thread Chris Johnson

Really odd issue we've been having.. We have a scheduled task that hits another 
database server to get a full list of employees.  It then runs through the user 
accounts for this specific app and adds or updates accounts as needed.
 
We weren't aware that it had been broken, so we don't know exactly what change 
on the server side could have done it (virtual instance).

If the query looks like:

select TOP 5 somecolumn from employees - the query runs

If the query looks like:

select somecolumn from employees - a blank CF error (no message or details) is 
thrown immediately without trying to run the query


I've upped the TOP 5 to about ~50 and around that and above, it either throws 
the immediate CF error or attempts to run and then brings down ColdFusion.

On one of our other CF boxes with less memory (4gb vs 512mb), the query runs 
and returns the 18,000 rows within seconds.  Looking at Task Manager, I don't 
see any spikes in memory or CPU when the page is ran.  The error is thrown 
immediately, almost like the server just refused to bother.


It seems like ColdFusion is either trying to allocate resources and not liking 
the info it gets or is somehow otherwise sizing up what will be needed for the 
call.  I can't think of any other reason why it wouldn't run and time out like 
other queries.  The CF error returned is blank and thrown immediately.

We've created a new DSN using the fully qualified domain name, IP address, and 
even changed the query to a stored proc that should have resulted in less 
overhead on CF and nothing seems to help.

If we don't specify a TOP XX number or specify one that's too large (50+), we 
get this strange result.  Otherwise it runs or at least attempts to run just 
fine.

Being that we're using an long outdated version of CF, it's been hard to find 
support specific to this issue and I need to try to throw our server folks a 
bone as these issues tend to become IT hot potato games (not the server, it's 
CF... not CF, it's the database, etc.).

Anyone experience a similar issue?  I've created tons of queries in the last 10 
years, crashed tons of CF instances, and written tons of bad SQL, but this 
issue is so odd that I've never encountered it in the wild.

In the CF Admin settings, the CF version on the trouble server is showing as 
6,1,0,83762. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356143
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Need help figuring out how to bill for on-call support I provide to an ex-employer...

2009-11-21 Thread Chris Johnson

In a unique situation here (well, hopefully not)...

I've been helping a friend get his company automated and we've developed a 
damned fine management system that handles mostly everything internally.

I've been working full-time for him on a very reduced salary for the past year 
due to being in a pinch after being laid off last year and also wanting to 
finish this project we started several years ago but never had the chance to 
spend the right amount of time on.

The system is built, but being on a shared server (there's not enough in the 
budget to justify dedicated at the moment), there are occasional kick the box 
support services they need me to be on-call for.

There will also be additions and upgrades.  I have a good idea on what to 
charge for those.

But the on-call billing is throwing me for a loop.  I'm stuck between a fixed 
amount and some usage-based amount.

Anyone run into something like this?  My friend was bought by a slightly larger 
company so he's letting me be a little creative to make sure I'm fully 
compensated.  I already have a base amount I receive per month for normal 
tasks like database updates, slight changes that don't qualify as projects, etc.

The on-call would be on top of that and for the life of me I can't figure out 
how to bill it.

Thanks in advance :) 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328586
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Need help figuring out how to bill for on-call support I provide to an ex-employer...

2009-11-21 Thread Chris Johnson

Rick, that actually sounds like what I've been banging around in my head.

My friend was thinking of an emergency on call rate for that reason, but if 
it was a call saying the server was down and it involved a 10 minute call to 
the hosting center, I would have to break out that hourly rate into increments 
and it starts getting messy.

Also, for the slow months, if I rely at all on this income, I'm left needing to 
make it up and a retainer keeps me open and invested in the program.  It's 
almost completely guaranteed it'd be using it all, but these sorts of things 
don't work well when one party is assuming.

We actually deal with attorneys a good bit and a retainer should be something 
that is easy to sell on its own merit.

I think I'm going to do something like:

Retainer: XXX/month (with dev time billed against half of it like you 
mentioned).
Development: XX/hr
Maintenance: XXX/month

Maintenance includes a fixed cost for backups, some manual labor that needs to 
be done between their dev and live servers, etc.  Menial, but any shared 
hosting company charges something similar for database backups, code backups, 
etc.


For on-call service, I would have what most lawyers do for their corporate
clients...a retainer.

I would set a monthly rate to have me on-call and then, if they did
actually call me
in for some work, I would charge my normal hourly rate for service and take
the first
half of the charges out of the retainer fee *for that month*.

For instance, if I charge $50 an hour for service and they pay a retainer of
$200 per month
to keep me on-call, the first $100 or two hours of work would come from
the retainer.
After that it's an additional $50 per hour.

Of course the retainer is paid monthly and there are no roll-over hours.
Previous months'
retainers do not apply to the current month's charges.

Also, I would have different rates for after-hours on-call service than I
would for 9-5 service.
Probably double my 9-5 rate...call me at 10pm and it's $100 per hour.

Seems reasonable and fair...

Thoughts?

Rick
 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328590
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: .NET or JAVA? Which is a more natural step for a CF Developer

2009-08-12 Thread Chris Johnson

Try both, see which one you prefer.


I wish I had the time, money, and mental energy to do that, but I imagine 
getting my head around one new language/technology will be challenging enough :)

I'm a bit of a slow learner, so I'm trying to pace myself and focus on this :) 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325402
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: .NET or JAVA? Which is a more natural step for a CF Developer

2009-08-12 Thread Chris Johnson

I suppose another factor is that I've never dealt with anything other than 
MS-related products on the operating system and server level.  Always been on a 
Windows PC working with code running on IIS servers.

IIRC, when I first investigated JAVA, one of the issues was my level of 
inexperience with non-Windows servers/OS.






 With the economy and market as it is, and with current employment's 
 stability starting to wiggle, I'm being forced to investigate other 
 options.
 
 I was curious what the group's thoughts were on the two above 
 technologies and which would be easier/more natural to move into.
 
 Not intending to abandon CF at all, but this is a time where 
 flexibility will be key and I'd like to be able to spread a wider net 
 should job seeking become a factor again.  Through a couple early 
 searches, there are a few opportunities that list CF as a *PLUS*, 
 while the core competency is either .NET or JAVA.  
 
 I've looked into .NET a bit, but it seems that for someone with no 
 access to anything on a large scale (Sharepoint, etc.), there's only 
 so far you can go learning .NET in your basement.  There's also the 
 factor of .NET not being ONE language, but a combo of several techs 
 rolled into one.  I'm curious if .NET, while a web development 
 language, might just look easier to the inexperienced eye?
 
 JAVA is a different beast altogether, but seeing as I've been making 
 use of some JAVA in CF7 and CF8 a little here and there, it seems like 
 it would be somewhat familiar at least in the critical getting started 
 phase.
 
 
 Thoughts? 


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325404
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


.NET or JAVA? Which is a more natural step for a CF Developer

2009-08-11 Thread Chris Johnson

With the economy and market as it is, and with current employment's stability 
starting to wiggle, I'm being forced to investigate other options.

I was curious what the group's thoughts were on the two above technologies and 
which would be easier/more natural to move into.

Not intending to abandon CF at all, but this is a time where flexibility will 
be key and I'd like to be able to spread a wider net should job seeking become 
a factor again.  Through a couple early searches, there are a few opportunities 
that list CF as a *PLUS*, while the core competency is either .NET or JAVA.  

I've looked into .NET a bit, but it seems that for someone with no access to 
anything on a large scale (Sharepoint, etc.), there's only so far you can go 
learning .NET in your basement.  There's also the factor of .NET not being 
ONE language, but a combo of several techs rolled into one.  I'm curious if 
.NET, while a web development language, might just look easier to the 
inexperienced eye?

JAVA is a different beast altogether, but seeing as I've been making use of 
some JAVA in CF7 and CF8 a little here and there, it seems like it would be 
somewhat familiar at least in the critical getting started phase.


Thoughts? 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325365
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Getting back up to speed with things?

2009-07-07 Thread Chris Johnson

Over the past several years, work has revolved around 2 large projects for 
different companies that both used CF7.

Both being very low on funds for a developer, time has been of the essence, 
which left no time for keeping up to date with CF8, CFCs, etc.  

Finally at the point where I can take a breath, I'm amazed with how much has 
zoomed right past me.

Now moving into CF8, I've gotten a chance to play with CFPDF and other great 
tags, but still need to buy and read the latest CF8 WACK books.

I'm still horribly behind the curve, using out-dated cfapplication instead of 
Application.cfc, not using CFC's more often, etc.

I also haven't even dared venture into Flex-land yet.

For someone who's got about a decade of CF coding behind him, but with limited 
opportunities to use the latest and greatest, what would be the recommended 
course of study?

In need of some serious up-to-date immersion :)


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324316
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Using CFPDFFORM, Data going into PDF Form Fields is mis-aligned or cut off...

2009-05-28 Thread Chris Johnson

Interesting problem.


CFPDFFORM works wonderfully for the most part, except when it does what it's 
supposed to do: insert data into pdf forms.

I'm finding that often times, letters like q, y, or other letters that hang a 
bit, get cut off.

Additionally, alignment seems screwy.  Many times a form is perfect in PDF 
form, but then when CFPDFFORM inserts data into that form, the data is 
mis-aligned and has a different placement than it did in the actual PDF.

On that second issue, if you tab through those form fields when in the browser, 
they jump all over the place as you tab in and out of the fields.

I see no way to adjust this behavior in the tag's docs.  Is this a known issue?

The PDFs are created with Adobe Professional 7, but displayed in Adobe Reader 8 
via the browser.

Very curious if anyone else is having this problem.  We have a dozen or more 
forms automated and all sorts of hacks are in place like stretching form fields 
or purposely mis-aligning them so that CFPDFFORM's mis-alignment looks closer 
to how it should look, etc.

Thanks!


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322904
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: ColdFusion 8: CFDocument doesn't support differently sized headers for subsequent pages

2009-04-07 Thread Chris Johnson

Yep.  Didn't work though..

You can modify the margintop value in cfdocumentsection, but it changes 
(overrides) the top margins for the entire document, so adding 
cfdocumentsection with a different margintop attribute will only enforce that 
new height value on the first page as well, forcing CF8 to scale it or shrink 
it to fit..

If I knew exactly where page 1 would end and where page 2 would begin, I could 
use CFDOCUMENTSECTION, but when you're dealing with a recordset, you can't 
reliably know how many pages it will span.  Especially if any text wraps, you 
have sub-totals, etc.

If you could let an expression define the value of marginTop in 
CFDOCUMENTSECTION, that would work, but I've tried both 
cfdocument.currentpagenumber and cfdocument.currentsectionpagenumber and 
neither allow CFDOCUMENTSECTION to dynamically adjust it's marginTop value as 
CFDOCUMENT doesn't look at it as a loop.  It's set once and with the marginTop 
value provided.

I did find a watermark fixes this problem, but it still invalidates the use of 
any header functionality in CF8 should you not want the same sized headers on 
every single page =/




 Have you tried using the cfdocumentsection tag?
 
 http://livedocs.adobe.com/coldfusion/8/htmldocs/help.
 html?content=Tags_d-e_07.html
 
 -Mike Chabot
 
 On Sun, Apr 5, 2009 at 8:05 PM, Chris Johnson u...@askugg.com wrote:
 
  Something that I haven't been able to find anyone else talking about, 
 is that in CF8, there doesn't seem to be a way to have one header for 
 your main page (with logo, address, etc.) and then a briefer header 
 for subsequent pages (just page number, invoice #, etc.).
 
  In CF7, it's done by specifying a topmargin value that's smaller 
 than the first page's header, but the correct size for subsequent 
 pages.  Then you simply pad (via padding-top:XXXpx) the content you're 
 displaying so that it starts where the first page header ends.
 
 
  In CF8 though, using the same setup, the first page's header 
 squishes itself to fit in the topmargin value.
 
  I suppose that's correct, but I still can't find any way to have a 
 larger first page header, with smaller secondary page headers.
 
 
 
  Does anyone know of any way to do this?  It seems to be standard 
 practice for most invoicing/billing/etc., but I've yet to find a 
solutio

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321412
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


ColdFusion 8: CFDocument doesn't support differently sized headers for subsequent pages

2009-04-05 Thread Chris Johnson

Something that I haven't been able to find anyone else talking about, is that 
in CF8, there doesn't seem to be a way to have one header for your main page 
(with logo, address, etc.) and then a briefer header for subsequent pages (just 
page number, invoice #, etc.).

In CF7, it's done by specifying a topmargin value that's smaller than the first 
page's header, but the correct size for subsequent pages.  Then you simply pad 
(via padding-top:XXXpx) the content you're displaying so that it starts where 
the first page header ends.  


In CF8 though, using the same setup, the first page's header squishes itself to 
fit in the topmargin value.  

I suppose that's correct, but I still can't find any way to have a larger first 
page header, with smaller secondary page headers.



Does anyone know of any way to do this?  It seems to be standard practice for 
most invoicing/billing/etc., but I've yet to find a solution?


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321335
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: How can you have a variable topmargin height on CF8 CFDOCUMENT so that you can have 2 differently sized headers?

2008-11-03 Thread Chris Johnson
I did find one possible solution that I don't like, but should support most 
report templates that need differently sized primary and secondary headers.

I'm creating two cfdocumentsections with different topmargin values.  Each 
cfdocumentsection has their own cfdocumentitem headers.

The next step is to figure out roughly how many lines I can fit on the first 
page with all conditions met as there are a couple different formatting options 
we use for aggregate reports vs individual monthly summaries, etc.

Then loop over the output previous to the cfdocument and parse it in two so you 
have a first page set and then the rest of it.

May have to process the output twice, nearly doubling the processing time, but 
you get the dynamic headers =/

Really wish Adobe would address this.. It just seems crazy that you can't 
specify at least a 2nd level of margins.



 Another CF8 CFDocument problem here...
 
 With CF7, you could specify a cfdocument topmargin= value that was 
 shorter than the height of the value going in the cfdocumentitem 
 type=header.  The cfdocitem header would just continue past and 
 overlap the content below.
 
 This was fixed by adding a padding-top:XXX to the content so that on 
 the first page it just shifted the content down a bit to accommodate 
 for the first page having a larger header.
 
 However, in CF8, that same setup now shrinks the header so that 
 everything fits within the size set in the cfdocument topmargin value.
 
 
 The problem here is that we have been using a PDF for invoicing that 
 has a master header on the first page with our logo, company info, 
 etc.
 
 Then on each subsequent page, a much shorter header with just the 
 client name and the current page number.
 
 So in CF7, the cfdocument tag had a topmargin value of 1.5.  This 
 along with the extra padding from the top of the div holding the 
 content below worked just fine.
 
 But now, I have to change the topmargin value to about 3.5 or in 
 order to avoid the header shrinking smaller.
 
 So not a problem... until you get to the second page.  Now on every 
 following page, there is a large 2 gap between the header and content 
 because of the new larger topmargin value.
 
 
 I've tried using CSS tricks like holding the header stuff in a div 
 and trying height/padding/margin to force the content to appear 
 larger, but now it seems that none of that works and CF scales/zooms 
 the size of the header content to whatever percentage will fit in that 
 topmargin value.
 
 
 
 I did read that CF8 uses the iText libraries and that via createObject 
 you could modify margins with setMargins()... I believe this was on 
 CFSearching.com.
 
 But I have yet to be able to find an example of how I can insert my 
 cfscript code to only change the margins for the first page, or to 
 only change the margins for all non-first pages.
 
 
 
 Has anyone made this work?  This is quite a common layout design for 
 things CFDocument could be used for.. I have to imagine that someone 
 else has run into the same problem?
 
 
 Thanks in advance, I love cfpdf for its populate feature, so I 
 really want to be able to make that move to CF8 =/


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314782
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


How can you have a variable topmargin height on CF8 CFDOCUMENT so that you can have 2 differently sized headers?

2008-10-29 Thread Chris Johnson
Another CF8 CFDocument problem here...

With CF7, you could specify a cfdocument topmargin= value that was shorter 
than the height of the value going in the cfdocumentitem type=header.  The 
cfdocitem header would just continue past and overlap the content below.

This was fixed by adding a padding-top:XXX to the content so that on the 
first page it just shifted the content down a bit to accommodate for the first 
page having a larger header.

However, in CF8, that same setup now shrinks the header so that everything fits 
within the size set in the cfdocument topmargin value.

The problem here is that we have been using a PDF for invoicing that has a 
master header on the first page with our logo, company info, etc.

Then on each subsequent page, a much shorter header with just the client name 
and the current page number.

So in CF7, the cfdocument tag had a topmargin value of 1.5.  This along with 
the extra padding from the top of the div holding the content below worked just 
fine.

But now, I have to change the topmargin value to about 3.5 or in order to 
avoid the header shrinking smaller.

So not a problem... until you get to the second page.  Now on every following 
page, there is a large 2 gap between the header and content because of the new 
larger topmargin value.


I've tried using CSS tricks like holding the header stuff in a div and trying 
height/padding/margin to force the content to appear larger, but now it seems 
that none of that works and CF scales/zooms the size of the header content to 
whatever percentage will fit in that topmargin value.



I did read that CF8 uses the iText libraries and that via createObject you 
could modify margins with setMargins()... I believe this was on CFSearching.com.

But I have yet to be able to find an example of how I can insert my cfscript 
code to only change the margins for the first page, or to only change the 
margins for all non-first pages.



Has anyone made this work?  This is quite a common layout design for things 
CFDocument could be used for.. I have to imagine that someone else has run into 
the same problem?


Thanks in advance, I love cfpdf for its populate feature, so I really want to 
be able to make that move to CF8 =/


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314563
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Having a problem with XML auto-escaping HTML (even CDATA)

2008-02-14 Thread Chris Johnson
 cfsavecontent variable=myXML

Shouldn't that be ![CDATA[ instead of !CDATA[[ ??

Paul


Oops, that was my mistake.  It's set correctly, I was just in a hurry re-typing 
that.  It is ![CDATA[ :) 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299015
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Having a problem with XML auto-escaping HTML (even CDATA)

2008-02-14 Thread Chris Johnson
Hello!

This is my first run at XML and it seems to be working well, aside from this 
particular problem.

We have a SWF file that references an XML doc stored in a table in one of our 
databases.  The SWF pulls everything just fine.

However, when I'm setting new variables and re-updating the XML, no matter 
what, it automatically escapes all HTML.


For example, here is a similar example of what the XML looks like when it goes 
into the database the first time:


cfsavecontent variable=myXML
?xml version=1.0 encoding=UTF-8?
car
  price$4,000/price
  adbody!CDATA[[Wow bWhat a deal!/b ulliblah/li/ulJust 
Wow!]]/adbody
/car
/cfsavecontent

cfquery...
INSERT INTO someTable(blah)
VALUES(cfqueryparam cfsqltype=cf_sql_varchar value=#myXML#)
/cfquery




Now when I initially build the XML like that, it will pass in any and all html 
I give it.  It inserts like it should.


But on subsequent updates, I update the values like such:


cfqueryselect xml value from table/cfquery

cfxml variable=xmlVar#trim(theQuery'sXMLValue)#/cfxml

cfset xmlVar = xmlParse(trim(xmlVar))


  HERE IS THE PROBLEM  

cfset xmlVar.car.adbody.XmlText = #New Value From Form Goes Here#






After all of the cfsets, I do an update on the table and submit #xmlVar# again.


Everything else works and saves and does what it should.

But for some reason, I can confirm that:

1) The new form value holds unescaped html
2) Even referencing xmlVar.car.adbody.XmlText shows that variable holds the 
unescaped html

And yet, when I look up that row in MySQL, it shows ESCAPED html.




I dug a little further and found that:

xmlVar.car.adbody.XmlText = UNESCAPED HTML (correct)

xmlVar itself = ESCAPED HTML (incorrect)



So for some reason when I'm setting a value in the XML, it auto-escapes the 
HTML.


Is there a better way to set XML variables?  Building the tree the same way 
it's done on creation isn't as easy because not all of the info comes across in 
a single form submission.


This way works fine, except when it comes to HTML.  I've searched and searched 
and have not yet found a function that will help me keep it intact.  CDATA lets 
it store and display correctly, but even the CDATA html gets escaped rendering 
it useless =/ 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299011
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Found it!

2008-02-14 Thread Chris Johnson
Ike, thank you I appreciate that :)

I found my fix!  Everywhere I've read, everyone mentions saving data to the xml 
node's XmlText element.

Instead, there is actually an XmlCData element which not only automatically 
adds and strips the CDATA tags, but also allows unescaped HTML to be stored 
without issue.

So where I was doing:

cfset xmlVar.car.adbody.XmlText = form.addbody

I needed to be doing:

cfset xmlVar.car.adbody.XmlCData = form.addbody



Here's a link from the source (at the bottom):

http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=1512.htm





 cfxml variable=xmlVar#trim(theQuery'sXMLValue)#/cfxml
 
 cfset xmlVar = xmlParse(trim(xmlVar))


You're using one or the other of these, not both together, right? 

Other than that, it sounds less like there's something going wrong with
the XML than there just being some confusion about how XML works -- or
at least how it works in ColdFusion. 

Some basics: 

textarea = this is both a node and an element (tag) 
stuff in textarea  = this is a text node 
a href=blah= this is another element node 
anchor text= this is another text node 
lt;bgt;bold  = this is part of the same text node 
lt;/bgt; = again, still the same text node 
/a   = closing the 'a' element node 
/textarea= closing the 'textarea' element node 

Now when you create your xml packet originally using this syntax 

car
  price$4,000/price
  adbody
![CDATA[ 
  Wow bWhat a deal!/b 
  ulliblah/li/ulJust Wow!
]]
  /adbody
/car

You have your document root element (car) with two child elements (price
and adbody) and each child element contains one text node, and here's
where I think you're getting tripped up. How that text node in the CDATA
is formatted isn't really important -- what's important is that it *is*
a text node. It may be formatted with CDATA - it may be formatted by
escaping the HTML tags - but either way, it's a single text node. And
actually once you've put it into the adbody element as a text node, you
don't really have any control over how it will be formatted when it's
displayed by a given XML engine and most of them will use character
entities (escaping) instead of CDATA to represent the string. The reason
you see the CDATA after your initial creation I'm guessing is because
you're not parsing the XML prior to the initial insert, you're just
building it as a flat text string and inserting it, so the XML engine
isn't getting its hands on it. 

Now, moving on... When you look at it in MySQL you're seeing escaped
HTML with character entities -- so it's showing you that the content of
the adbody element is still a string - good, that's the way you want it.
Then when you later take the XML packet out of MySQL there are several
different ways you can get at its content within CF and the results will
look different of course dependant upon how you choose to display it.
What you really want is just to get your string back out so that it can
be used in your HTML display. So your use of xmlVar.car.adbody.XmlText
as a variable name to get that string is perfect -- once the XML has
been parsed, that variable will contain a string with unescaped HTML,
which is what you want. 

The only time you won't see the unescaped HTML is when you're viewing
that text node as a text node within the larger XML packet, for example,
if you use cfdump to display the content of your xmlVar variable. When
you dump it like that you're asking the server to show you the structure
of the XML, in which case, what it's showing you is that you have this
text node in your adbody element that contains these strings like
bwow/b -- it doesn't care what that string is or what you do with
it after you get it out, its only responsibility is to show you that the
string contains those characters. So that's also good. 

Lastly, where you're updating the XML packet with a new html adbody
should also be fine as well, as long as you're not using HTMLEditFormat
() on the string before inserting it into the packet. For example: 

cfset xmlVar.car.adbody.XmlText = form.addbody = good 

cfset xmlVar.car.adbody.XmlText = HTMLEditFormat(form.adbody) = bad 

Remember that the only job of the XML packet is to store your string in
that text node in the adbody element, so when you set the XmlText
variable this way, ColdFusion already knows that form.adbody is a string
and it will just store that string in the XmlText exactly as it is so
that when you later parse the packet and get it back out, you'll have
exactly the same string coming out, including all the unmolested HTML.
If you do any kind of editing to the HTML before you set it, then that
will change the string before being stored and the value you get back
will be whatever you've changed it to. So if you HTMLEditFormat the
value before you store it, what you'll get out on the back end after you
parse the XML later will be escaped 

Re: Having a problem with XML auto-escaping HTML (even CDATA)

2008-02-14 Thread Chris Johnson
Ike, thank you :)


Turns out the problem was much simpler.  Although to be fair to myself, I have 
to say that most of the online documentation I've found completely ignores the 
presence of a XmlCData element and only references the XmlText element.


Turns out that you don't have to add/replace the ![CDATA[ and ]] manually 
either, saving to node.XmlCData instead of node.XmlText will handle it all.

http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=1512.htm


 cfxml variable=xmlVar#trim(theQuery'sXMLValue)#/cfxml
 
 cfset xmlVar = xmlParse(trim(xmlVar))


You're using one or the other of these, not both together, right? 

Other than that, it sounds less like there's something going wrong with
the XML than there just being some confusion about how XML works -- or
at least how it works in ColdFusion. 

Some basics: 

textarea = this is both a node and an element (tag) 
stuff in textarea  = this is a text node 
a href=blah= this is another element node 
anchor text= this is another text node 
lt;bgt;bold  = this is part of the same text node 
lt;/bgt; = again, still the same text node 
/a   = closing the 'a' element node 
/textarea= closing the 'textarea' element node 

Now when you create your xml packet originally using this syntax 

car
  price$4,000/price
  adbody
![CDATA[ 
  Wow bWhat a deal!/b 
  ulliblah/li/ulJust Wow!
]]
  /adbody
/car

You have your document root element (car) with two child elements (price
and adbody) and each child element contains one text node, and here's
where I think you're getting tripped up. How that text node in the CDATA
is formatted isn't really important -- what's important is that it *is*
a text node. It may be formatted with CDATA - it may be formatted by
escaping the HTML tags - but either way, it's a single text node. And
actually once you've put it into the adbody element as a text node, you
don't really have any control over how it will be formatted when it's
displayed by a given XML engine and most of them will use character
entities (escaping) instead of CDATA to represent the string. The reason
you see the CDATA after your initial creation I'm guessing is because
you're not parsing the XML prior to the initial insert, you're just
building it as a flat text string and inserting it, so the XML engine
isn't getting its hands on it. 

Now, moving on... When you look at it in MySQL you're seeing escaped
HTML with character entities -- so it's showing you that the content of
the adbody element is still a string - good, that's the way you want it.
Then when you later take the XML packet out of MySQL there are several
different ways you can get at its content within CF and the results will
look different of course dependant upon how you choose to display it.
What you really want is just to get your string back out so that it can
be used in your HTML display. So your use of xmlVar.car.adbody.XmlText
as a variable name to get that string is perfect -- once the XML has
been parsed, that variable will contain a string with unescaped HTML,
which is what you want. 

The only time you won't see the unescaped HTML is when you're viewing
that text node as a text node within the larger XML packet, for example,
if you use cfdump to display the content of your xmlVar variable. When
you dump it like that you're asking the server to show you the structure
of the XML, in which case, what it's showing you is that you have this
text node in your adbody element that contains these strings like
bwow/b -- it doesn't care what that string is or what you do with
it after you get it out, its only responsibility is to show you that the
string contains those characters. So that's also good. 

Lastly, where you're updating the XML packet with a new html adbody
should also be fine as well, as long as you're not using HTMLEditFormat
() on the string before inserting it into the packet. For example: 

cfset xmlVar.car.adbody.XmlText = form.addbody = good 

cfset xmlVar.car.adbody.XmlText = HTMLEditFormat(form.adbody) = bad 

Remember that the only job of the XML packet is to store your string in
that text node in the adbody element, so when you set the XmlText
variable this way, ColdFusion already knows that form.adbody is a string
and it will just store that string in the XmlText exactly as it is so
that when you later parse the packet and get it back out, you'll have
exactly the same string coming out, including all the unmolested HTML.
If you do any kind of editing to the HTML before you set it, then that
will change the string before being stored and the value you get back
will be whatever you've changed it to. So if you HTMLEditFormat the
value before you store it, what you'll get out on the back end after you
parse the XML later will be escaped HTML. 

Anyway, I hope I've been at least sem-coherent here and that this
information is somewhat useful 

Re: CF Administrator won't load??

2004-08-12 Thread chris johnson
On Thu, 12 Aug 2004 13:43:47 -0400, Christy Carter [EMAIL PROTECTED] wrote:
 Ok, I went in a changed the IP to 127.0.0.1 and I couldload the Administrator page using localhost fine.But our website itself no longer loaded.
 
 So I kept the IP as the network ideentification IP, but I went into the Advanced tab and added 127.0.0.1 as an additional IP using port 80, and that seemed solve the problem - I can load both the CF Administrator and our website!
 
 Does it sound okay that I added another IP there?

Is this one a full production server? If so, this would mean that the
CF admin console is available to the general public. This is a
definite security risk. You may want to split the two sites up on the
server. Make the Admin Console accessible internally only and the
website accessible from both.

-- 
chris johnston

www.fuzzylizard.com
For millions of years, mankind lived just like the animals and
something happened which unleashed the power of our imagination, we
learned to talk.
Pink Floyd
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF Administrator won't load??

2004-08-12 Thread chris johnson
On Thu, 12 Aug 2004 14:10:29 -0400, Christy Carter [EMAIL PROTECTED] wrote:
 Okay, in going back into IIS, I see that there are 2 websites - Default website and Administration website. Maybe I should assign the 127.0.0.1 to the Admininstration website?
 

I do not use IIS, but this is what I would do on apache (it should be
similar for IIS). I would create a virtual directory/site and assign
the localhost (127.0.0.1) IP address to it. I would then move the
CFIDE and CFDOCS folders into the virtual site. (Then I would restart
apache, but I am not sure if this is needed for IIS). This, in theory,
should separate the CFMX admin console from the production site.

As for the administration and default sites, my guess is that is the
admin site for IIS and not for CFMX.

-- 
chris johnston

www.fuzzylizard.com
For millions of years, mankind lived just like the animals and
something happened which unleashed the power of our imagination, we
learned to talk.
Pink Floyd
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: OT Unix

2004-08-12 Thread chris johnson
On Thu, 12 Aug 2004 21:51:27 -0400, S. Isaac Dealey [EMAIL PROTECTED] wrote:
 I thought you only needed read rights to download it and that 777
 would provide all users with all rights (including delete)? ...
 Granted that I'm pretty sure there's no way to take advantage of
 delete privileges via a web browser, but then I'm not a unix guru
 either, so...

In part, the permissions that you place on the file will depend on how
you wish to distribute the file. If you are going to link to the file
directly, then you should allow for read only and not write or execute
(744).

If you are going to use CFMX to server up the file to your users, then
all you really need to provide is enough permissions to allow CF to
access the file. As the file should be created using the same user and
group that CF is running under, something as little as 700 should do
it.

-- 
chris johnston

www.fuzzylizard.com
For millions of years, mankind lived just like the animals and
something happened which unleashed the power of our imagination, we
learned to talk.
Pink Floyd
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




DateTime Stamp Problem

2000-10-27 Thread Chris Johnson

I have a access database and I can't get the value of ,
'#CreateODBCDateTime(Now())#', in my Insert statement to work. I get the
error:

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
operator) in query expression ''{ts '2000-10-27 14:49:50'}''.

The field type is text and a length of 100.

Is this the best way because long term I will search DateDiff of these
fields...

Any help?

-Chris
www.chris.com


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]