Jan 15, 2013; 10:05
Fletcher Sandbeck
Lasso 9 Notes
These are works in progress and somewhat shorthand, but may be useful. First are the Lasso 9 Issues that I've encountered upgrading sites from 8.6 to 9. And second are some notes about installing Lasso 9 on Ubunto 12 on AWS.
[fletcher]
===============================================================Lasso 9 Issues
Undefined Variable in Conditional
Important - This change is subtle and requires some care to ensure that the change in behavior doesn't affect existing code.
Fails if var('x') is undefined since $x == null and null != ''
Examples:
if(var('x') == ''); ... /if;
if(var('x') != ''); ... /if;
Workarounds:
if(string(var('x') == ''); ... /if;
if(var('x') != null && var('x') != ''); /if;
[Protect] ... [/Protect]
Important - Must check every protect block.
Move handle block as first statement in container
Encoding Keywords
Error Msg: Unexpected: KEYWORD
Not supported
[var('x', -encodebreak)] -> [Encode_Break($x)]
Numerous Type Casting Issues
Error Msg: Definition Not Found: null->split(string)
field('name')->split(' ') -> string(field('name'))->split(' ')
field('name') >> ' ' -> string(field('name')) >> ' '
if field might be NULL cast to string before using string methods
Trailing Comma in array and map definitions
Only seems to cause a problem in some cases
Sloppy Local References
Error Msg: The local variable "lists" has not been defined
Change #lists to $lists
Skip Records
Error Msg: Definition Not Found: dsinfo->skipRows=(string) Candidates were: dsinfo->skipRows=(p0::integer)
-SkipRecords='10' -> -SkipRecords=10
-SkipRecords=integer(var('skip'))
[Date_Format]
Error Msg: Parser error. Character was not understood line: 284, col: 79
[Date_Format: (field: 'vote_date'), -Format='%b %_d, %Y']
-> [Date(field('vote_date'))->Format('%b %_d, %Y')]
[Content_Body]
Change $__http_reply__ to use [content_body]
[Content_Header]
Change $__http_header__ to use [content_header]
Does not support concatenation [content_header += 'x']
Does not support replacement [content_header('x')]
[Math_Range]
Must be written without keywords -min/-max
First parameter must be numeric
[math_range(integer(field('age')), -min=1, -max=100)]
$foo->isa(array)
Fix brain dead code
$foo->isa('array')
[Null(tag())]
Not supported
Wrote [Nil] which consumes output
define_tag('nil'); /define_tag;
[Lasso_Comment] ... [/Lasso_Comment]
Not supported
Wrote replacement
define_tag('lasso_comment', -container, -namespace=namespace_global); /define_tag;
[Session_Start]
Bug - Had to set -UseAuto=false to disable link decoration when using -UseNone
[File_Chmod]
Bug (Reported 9.2 and Fixed)
50:2 compat/compat.file.lasso
Error Msg: Definition Not Found: if(integer)
[Shell]
Update to:
http://www.lassosoft.com/tagswap/detail/Shell_9
OPTIMIZATIONS
String += -> ->append
Find: " ?\+= ?(['"].+);[ ]*\r"
Replace: "->append(\1);\r"
============================================================= Lasso Install
http://www.lassosoft.com/Lasso-9-Server-Linux-Installation
Started Amazon EC2 Instance With Ubuntu 12
# Install libzip
curl -L "https://launchpad.net/ubuntu/+source/libzip/0.9.3-1/+build/1728114/+files/libzip1_0.9.3-1_amd64.deb" > libzip1_0.9.3-1_amd64.deb
sudo dpkg -i libzip1_0.9.3-1_amd64.deb
# Install curl (v48 not v44)
curl -L http://launchpadlibrarian.net/107159578/libicu48_4.8.1.1-8_amd64.deb > libicu48_4.8.1.1-8_amd64.deb
sudo dpkg -i libicu48_4.8.1.1-8_amd64.deb
# Install Lasso
sudo add-apt-repository "deb http://debianrepo.lassosoft.com/ stable main"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ natty main restricted multiverse"
sudo apt-get update
sudo apt-get install lasso-instance-manager
sudo apt-get install lasso-java-api
sudo apt-get install lasso-imagemagick
# Run Lasso
sudo lassoimd
# Configure Lasso
http://localhost/lasso9/instancemanager/
# System Update
sudo apt-get upgrade
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>