1
2
|
[18/10/10
02:19:45:045 EST] ERROR app.VelocityEngine: Left side ($queryType) of '==' operation has null value. Operation not possible. /usr/local/dotcms/webap
ps/../dotCMS/assets/1/4/14777.vtl
[line 5, column 25]
|
This results from code such as:
1
|
#if
($queryType == "$expectedValue" )
|
I thought this was strange because the macro this code belonged to wasn't even being executed - so the variable never gets a value anyway. It turns out the fix is to quote the variable, as per below.
1
|
#if
("$queryType" == "$expectedValue" )
|
That's fine for string values, but won't stop an error on anything involved in a numerical operation.
1
|
#if
($totalResults > 0 )
|
The above code results in this error:
1
2
|
[18/10/10
02:46:43:043 EST] ERROR app.VelocityEngine: Left side ($totalResults) of '>' operation has null value. Operation not possible. /usr/local/dotcms/webap
ps/../dotCMS/assets/1/4/14777.vtl
[line 1, column 24]
|
The fix is to make sure it is a number under any circumstances.
1
2
3
4
|
#if
(!$UtilMethods.isSet($totalResults))
#set($totalResults
= 0)
#end
#if
($totalResults > 0 )
|
It seems Velocity is a bit like bash or DOS shell scripts in this respect; unless you quote a variable name, it will see null as the value and output an error.
My dotCMS notes.
相关推荐
Left Side Arm.sldasm.svlx
缺省值pd.isna pd.isnull pd.notna pd.notnull np.nan isnull = isna _isna_new(obj) _isna_old(obj) _isna = _isna_new _use_inf_as_na(key) _isna_ndarraylike(obj) _isna_ndarraylike_old(obj) notna(obj) not...
MySQL中的`NOT IN`, `LEFT JOIN`, `IS NULL`, 和 `NOT EXISTS` 是四种不同的SQL查询方式,它们在特定情况下可以实现相似的功能,但实际执行效率可能会有很大差异。本文主要探讨这四种方法在处理大数据量时的性能表现...
Keil.STM32F4xx_DFP.2.17.1是Keil Microcontroller Development Kit (MDK)中的一个设备支持包(Device Family Pack,简称DFP),专门用于STM32F4系列微控制器。 主要包含内容: 设备描述文件:提供了STM32F4系列微...
Seperates string to the left of a certain character (ex. comma) or to the right and adds them to list boxes!
// of the data once it is returned. Those properties have their own // methods. switch (exifCode) { case Definitions.exifCode.ImageDescription: returnValue = ParsedString(Definitions.exifCode....
I wanted a control that will display more information about the progress of the task - the time passed since the start of the task, the time left to the end of the task and the percent of passed time...
connector's end point moving, the link is breaks if the move was not on one of the flex-controls connection points. Contain False as default. - ADD Added ControlDocRect parameter in event ...
对window.open进行封装, 使其更好用, 且更兼容, 很多人说window.open不兼容,其实不是, 因为不能直接执行, 必须通过用户手动触发才行;...options.left = options.left || ((screen.width - options.widt
集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...
+ The structure of the code has been undergone some major changes to ease porting to Windows 95 and Windows NT. I was exceedingly careful, but I hope this didn't introduce new bugs! :-) + For ...
Keil.STM32F4xx_DFP.2.17.1
SQL语句优化——in,not in,exists,not exists, left join...on博客所需SQL语句.txt欢迎下载!
as the digits of x are read, the set of possible y satisfying (1) is restricted to an increasingly narrow lexicographical range containing y. All of the strings in this range will share a growing ...
这篇文档是关于小学英语三年级下册接力版Lesson 5的教学设计,主题是"Who is on the left of Mary?"。这个教学设计旨在帮助学生掌握与左右位置相关的英语句型,包括"Who is on the left/right of...?"以及"...is on ...
For an example of how to decode value from this column using the information above, let us assume we have the following value: 0x000705001F83D775010002014F0BEC4E With byte swapping within each ...
y.left.parent = x; } y.parent = x.parent; if (x.parent == null) { root = y; } else if (x == x.parent.left) { x.parent.left = y; } else { x.parent.right = y; } y.left = x; x.parent = y; } ...
They are marked by the triangle icon, which you see here on your left. Click it now. You should see "Hooray" appear below. Hooray! Now you know you can expand points to get more details. ...