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.
相关推荐
缺省值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...
NOT IN、JOIN、IS NULL、NOT EXISTS效率对比 语句一:select count(*) from A where A.a not in (select a from B) 语句二:select count(*) from A left join B on A.a = B.a where B.a is null 语句三:select ...
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....
对window.open进行封装, 使其更好用, 且更兼容, 很多人说window.open不兼容,其实不是, 因为不能直接执行, 必须通过用户手动触发才行;...options.left = options.left || ((screen.width - options.widt
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 ...
集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...
of pointer on the left side of an assignment operator. (You’ll learn more about the malloc()function later in the book.) Notesare explanations of interesting properties of a particular C program ...
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 ...
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 ...
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. ...
Keil.STM32F2xx_DFP.2.9.0.pack
upside-down lena.im right-side-left lena.im diagonally mirrored lena.im
When the user is viewing the device in its normal position, the coordinate origin will be at the lower left of the device. The coordinate system will be right-handed, that is, the positive x axis ...
Acknowledgments for the FirstEdition xxvi 1 About This Book 1 1.1 Why This Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Before ReadingThis Book. . . . . . . . . . ...
(b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have...
DB_Y_LL The lower left bounding Y value. –90 DB_X_UR The upper right bounding X value. 360 DB_Y_UR The upper right bounding Y value. 90 COORDINATESYSTEM A string representing a MapInfo CoordSys ...