), elements using an ID, and classes if you use a '.' to prefix the class name.
Usage to remove our postData tag that indicates that LD+Json is being used: removeStr(value, "postData")
Usage to remove the 'foo' class from a string: removeStrBetween(str, '.foo');
*/
var removeStrBetween = function(str, selector) {
// Create a new container to operate on
var wrapped = $(" " + str + " ");
// Remove the content between the tags.
wrapped.find(selector).remove();
// Return it
return wrapped.html();
}
// Function to truncate and add an elipsis if the text exceeds a certain value
function truncateWithEllipses(text, max) {
return text.substr(0,max-1)+(text.length>max?'...':'');
}
function stripHtml(html){
html.replace(/<[^>]*>?/gm, '');
return html;
}
// Determine if a string has a space
function hasWhiteSpace(s) {
const whitespaceChars = [' ', '\t', '\n'];
return whitespaceChars.some(char => s.includes(char));
}
// ColdFusion like string functions
// ReplaceNoCase, scope is either 'all' or 'one'.
// Gregory Alexander
function replaceNoCase(string,subString,replacement, scope){
if (scope == 'all'){
// i is a RegEx ignore case flag, g is global flag
var regEx = new RegExp(subString, "ig");
} else {
// i is an RegEx ignore case flag
var regEx = new RegExp(subString, "i");
}
// i is an ignore case flag, g is global flag
var regEx = new RegExp(subString, "ig");
var result = string.replace(regEx, replacement);
return result;
}
// ColdFusion like list functions
function listLen(list, delimiter){
// Gregory Alexander
if(delimiter == null) { delimiter = ','; }
var thisLen = list.split(delimiter);
return thisLen.length;
}
function listGetAt(list, position, delimiter, zeroIndex) {
// Gregory Alexander
if(delimiter == null) { delimiter = ','; }
if(zeroIndex == null) { zeroIndex = true; }
list = list.split(delimiter);
if(list.length > position) {
if(zeroIndex){
// Better handling for JavaScript arrays
return list[position];
} else {
// Handles like the CF version without a zero-index
return list[position-1];
}
} else {
return 0;
}
}
function listFind(list, value, delimiter) {
// Adapted from a variety of sources by Gregory Alexander
var result = 0;
if(delimiter == null) delimiter = ',';
list = list.split(delimiter);
for ( var i = 0; i < list.length; i++ ) {
if ( value == list[i] ) {
result = i + 1;
return result;
}
}
return result;
}
// Compares two lists of comma seperated strings. Used to determine if the selected capabilities match the default capabilities for a given role. Function based on the listCompare method found in cflib.
function listCompare(string1, string2){
// Adapted from a variety of sources by Gregory Alexander
var s = string1.split(",");
for(var k = 0 ;k < s.length; k++){
if(string2.indexOf("," + s[k] + ",") ){
return true;
}
}
return false;
}
// Adds a value to a comma separated list. Will not add the value if the list already contains the value.
function listAppend(list, value) {
// Adapted from a variety of sources by Gregory Alexander
var re = new RegExp('(^|\\b)' + value + '(\\b|$)');
if (!re.test(list)) {
return list + (list.length? ',' : '') + value;
}
return list;
}
// Removes a value to a comma separated list. Based on the ListDeleteValue function by Ben Nadel CF fuction https://gist.github.com/bennadel/9753040
var listDeleteValue = function(list, value){
// Adapted from a variety of sources by Gregory Alexander
var values = list.split(",");
for(var i = 0 ; i < values.length ; i++) {
if (values[i] == value) {
values.splice(i, 1);
return values.join(",");
}
}
return list;
}
// URL functions
//
// parseUri 1.2.2
// (c) Steven Levithan
// MIT License
/*
Splits any well-formed URI into the following parts (all are optional):
----------------------
- source (since the exec method returns the entire match as key 0, we might as well use it)
- protocol (i.e., scheme)
- authority (includes both the domain and port)
- domain (i.e., host; can be an IP address)
- port
- path (includes both the directory path and filename)
- directoryPath (supports directories with periods, and without a trailing backslash)
- fileName
- query (does not include the leading question mark)
- anchor (i.e., fragment) */
function parseUri (str) {
var o = parseUri.options,
m = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
uri = {},
i = 14;
while (i--) uri[o.key[i]] = m[i] || "";
uri[o.q.name] = {};
uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
if ($1) uri[o.q.name][$1] = $2;
});
return uri;
};
parseUri.options = {
strictMode: false,
key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
q: {
name: "queryKey",
parser: /(?:^|&)([^&=]*)=?([^&]*)/g
},
parser: {
strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
}
};
An unexpected error occurred.
Please provide the following information to technical support:
Error Event:
Error details:
struct |
Detail |
The expression has requested a variable or an intermediate expression result as a simple value. However, the result cannot be converted to a simple value. Simple values are strings, numbers, boolean values, and date/time values. Queries, arrays, and COM objects are examples of complex values. <p> The most likely cause of the error is that you tried to use a complex value as a simple one. For example, you tried to use a query variable in a cfif tag.
|
ErrNumber |
0
|
Message |
Complex object types cannot be converted to simple values.
|
StackTrace |
coldfusion.runtime.CfJspPage$ComplexObjectException: Complex object types cannot be converted to simple values.
at coldfusion.runtime.Cast._String(Cast.java:1414)
at coldfusion.runtime.Cast._String(Cast.java:1352)
at coldfusion.runtime.CFPage.Len(CFPage.java:6020)
at cfblog2ecfc1294178816$funcGETPARENTCATEGORYQUERY.runFunction(C:\inetpub\wwwroot\gregoryalexander.com\blog\org\camden\blog\blog.cfc:3983)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:660)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:553)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:476)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:449)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:321)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4894)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4874)
at cfblog2ecfc1294178816$funcGETPARENTCATEGORYQUERY.runFunction(C:\inetpub\wwwroot\gregoryalexander.com\blog\org\camden\blog\blog.cfc:4006)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:660)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:553)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:476)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:449)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:321)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4137)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4100)
at cfblogContentHtml2ecfm1565192834._factor14(C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm:350)
at cfblogContentHtml2ecfm1565192834._factor39(C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm:283)
at cfblogContentHtml2ecfm1565192834._factor41(C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm:281)
at cfblogContentHtml2ecfm1565192834.runPage(C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:251)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:5083)
at cfindex2ecfm127566324.runPage(C:\inetpub\wwwroot\gregoryalexander.com\blog\index.cfm:140)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:251)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:749)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:578)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:573)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)
at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:231)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:57)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at jdk.internal.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:134)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:698)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:256)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:119)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:736)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
at jdk.internal.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:71)
at jdk.internal.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:54)
at com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:50)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:447)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:935)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1826)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1189)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:658)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:833)
|
Suppressed |
|
TagContext |
array
|
1 |
struct |
COLUMN |
0
|
ID |
CF_CFPAGE
|
LINE |
3983
|
RAW_TRACE |
at cfblog2ecfc1294178816$funcGETPARENTCATEGORYQUERY.runFunction(C:\inetpub\wwwroot\gregoryalexander.com\blog\org\camden\blog\blog.cfc:3983)
|
TEMPLATE |
C:\inetpub\wwwroot\gregoryalexander.com\blog\org\camden\blog\blog.cfc
|
TYPE |
CFML
|
|
2 |
struct |
COLUMN |
0
|
ID |
CF_UDFMETHOD
|
LINE |
4006
|
RAW_TRACE |
at cfblog2ecfc1294178816$funcGETPARENTCATEGORYQUERY.runFunction(C:\inetpub\wwwroot\gregoryalexander.com\blog\org\camden\blog\blog.cfc:4006)
|
TEMPLATE |
C:\inetpub\wwwroot\gregoryalexander.com\blog\org\camden\blog\blog.cfc
|
TYPE |
CFML
|
|
3 |
struct |
COLUMN |
0
|
ID |
CF_TEMPLATEPROXY
|
LINE |
350
|
RAW_TRACE |
at cfblogContentHtml2ecfm1565192834._factor14(C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm:350)
|
TEMPLATE |
C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm
|
TYPE |
CFML
|
|
4 |
struct |
COLUMN |
0
|
ID |
CF_BLOGCONTENTHTML
|
LINE |
283
|
RAW_TRACE |
at cfblogContentHtml2ecfm1565192834._factor39(C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm:283)
|
TEMPLATE |
C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm
|
TYPE |
CFML
|
|
5 |
struct |
COLUMN |
0
|
ID |
CF_BLOGCONTENTHTML
|
LINE |
281
|
RAW_TRACE |
at cfblogContentHtml2ecfm1565192834._factor41(C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm:281)
|
TEMPLATE |
C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm
|
TYPE |
CFML
|
|
6 |
struct |
COLUMN |
0
|
ID |
CF_BLOGCONTENTHTML
|
LINE |
1
|
RAW_TRACE |
at cfblogContentHtml2ecfm1565192834.runPage(C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm:1)
|
TEMPLATE |
C:\inetpub\wwwroot\gregoryalexander.com\blog\includes\templates\blogContentHtml.cfm
|
TYPE |
CFML
|
|
7 |
struct |
COLUMN |
0
|
ID |
CFINCLUDE
|
LINE |
140
|
RAW_TRACE |
at cfindex2ecfm127566324.runPage(C:\inetpub\wwwroot\gregoryalexander.com\blog\index.cfm:140)
|
TEMPLATE |
C:\inetpub\wwwroot\gregoryalexander.com\blog\index.cfm
|
TYPE |
CFML
|
|
|
Type |
Expression
|
URL - struct |
CATEGORYID |
22
|
MODE |
category
|
PAGE |
0
|
STARTROW |
1
|
standalone |
[empty string]
|
|