tracker issue : CF-4205635

select a category, or use search below
(searches all categories and all time range)
Title:

CFCLIENTSETTINGS error

| View in Tracker

Status/Resolution/Reason: To Track//PRHaveInfo

Reporter/Name(from Bugbase): Randall L. / ()

Created: 10/25/2019

Components: General Server, Mobile Support, Device Detection

Versions: 2018

Failure Type: Non Functioning

Found In Build/Fixed In Build: 2018,0,05,315699 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description:

<!--- detect device size --->
<cfclientsettings detectDevice=true />

<!--- retrieve properties --->
<cfclient>
	
<!--- mobile --->
<cfif cfclient.properties.width lte 480 >

<!--- tablet --->
<cfelseif cfclient.properties.width gte 480 AND cfclient.properties.width lte 760>

<!--- desktop --->
<cfelse>



</cfif>
</cfclient>

<!--- = = = = = = = = = = = = = = = = = = = =

THE ABOVE CODE FUNCTIONS FINE, WITHOUT ERROR. WHEN ANY HTML IS ADDED THE ERROR OCCURS.

IT CAN BE ANYTHING AS SIMPLE AS:

<!DOCTYPE HTML>

<html>
<head>
<title></title>

</head>

<body>

</body>
</html>


Steps to Reproduce: add above code to a webpage

Actual Result: error

Expected Result: display based on size

Any Workarounds: nope

Attachments:

Comments:

Hi,   I was able to successfully run the code shared below. I even tried it with different screen sizes. Also tried it on different versions of ColdFusion and am unable to see the error. Can you check your code to see if there is something incorrect? Also, can you share the error you are seeing?   Code used by me: {code:java} <html> <head> <title>My Title</title> </head> <body> <cfclient> <cfif cfclient.properties.width lte 480 > <div>Abc</div> <cfoutput>#now()#</cfoutput> <cfelseif cfclient.properties.width gte 480 AND cfclient.properties.width lte 760> <div>Def</div> <cfoutput>#now()#</cfoutput> <cfelse> <div>Ghi</div> <cfoutput>#now()#</cfoutput> </cfif> </cfclient> </body> </html> {code}   Thanks, Kailash
Comment by Kailash B.
31709 | October 31, 2019 05:29:37 AM GMT