Hello all !
I use Revo 2.0.0-pl rev#7177, and I can’t install the IF snippet... I downloaded it via Package Manager as usual, and click install... I get the error message above during install, but it says at the end "succesfully installed ". But the snippet is not visible in the Elements tree... The package manager show it as "installed", but I can not use it... I tried uninstall, reinstall, same result. I tried too completly remove package, download it a new time, reinstall... Same result no IF snippet in elements tree...
The error during install :
Console running...
PHP notice: Undefined variable: scriptProperties
Attempting to install package with signature: if-1.0-rc1
Package found...now preparing to install.
Grabbing package workspace...
Workspace environment initiated, now installing package...
Language string not found: "snippet_err_invalid_name"
Language string not found: "snippet_err_create"
snippet_err_createArray
Error saving vehicle object: Array ( [license] => GNU GENERAL PUBLIC LICENSE Version 2, June 1991
// here comes the GNU licese terms //
at the end of the License we have this
----------- Snippet: If ----------- Version: 1.0 Since: October 29, 2009 Author: Jason Coward Shaun McCormick A simple Conditional snippet. Examples: [[If? &subject=`[[+name]]` &operator=`notempty` &then=`Hello, [[+name]]!` &else=`Hello, anonymous!` ]] [[If? &subject=`[[*scoreTV]]` &operator=`GT` &operand=`100` &then=`You win!` &else=`Not high enough. Try again!` ]] [action] => install [signature] => 9db37f7397c862d182870d44812db1d4 [register] => mgr [topic] => /workspace/package/install/if-1.0-rc1/ [HTTP_MODAUTH] => modx4c403d986092c0.12244709 [package_action] => 0 [vehicle_package] => transport [vehicle_class] => xPDOObjectVehicle [class] => modSnippet [guid] => 3234082246cf2d1fc792efda8e4d6051 [native_key] => 0 [filename] => modSnippet/9db37f7397c862d182870d44812db1d4.vehicle [namespace] => if [unique_key] => name [preserve_keys] => [update_object] => 1 [resolve] => Array ( [0] => Array ( [type] => file [body] => {"source":"if-1.0-rc1\/modSnippet\/9db37f7397c862d182870d44812db1d4\/0\/","target":"return MODX_CORE_PATH . 'components\/';","name":"if"} ) ) [validate] => [package] => modx [object] => {"id":0,"name":"If","description":"Simple if (conditional) snippet","editor_type":0,"category":0,"cache_type":0,"snippet":"\/**\n * If\n *\n * Copyright 2009 by Jason Coward and Shaun McCormick\n * \n *\n * If is free software; you can redistribute it and\/or modify it under the terms\n * of the GNU General Public License as published by the Free Software\n * Foundation; either version 2 of the License, or (at your option) any later\n * version.\n *\n * If is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * If; if not, write to the Free Software Foundation, Inc., 59 Temple Place,\n * Suite 330, Boston, MA 02111-1307 USA\n *\n * @package if\n *\/\n\/**\n * Simple if (conditional) snippet\n *\n * @version 1.0\n * @author Jason Coward \n * @author Shaun McCormick \n *\/\nif (!empty($debug)) {\n print_r($scriptProperties);\n if (!empty($die)) die();\n}\n$modx->parser->processElementTags('',$subject,true,true);\n\n$output = '';\n$operator = !empty($operator) ? $operator : '';\n$operand = !isset($operand) ? '' : $operand;\nif (isset($subject)) {\n if (!empty($operator)) {\n $operator = strtolower($operator);\n switch ($operator) {\n case '!=':\n case 'neq':\n case 'not':\n case 'isnot':\n case 'isnt':\n case 'unequal':\n case 'notequal':\n $output = (($subject != $operand) ? $then : (isset($else) ? $else : ''));\n break;\n case '<':\n case 'lt':\n case 'less':\n case 'lessthan':\n $output = (($subject < $operand) ? $then : (isset($else) ? $else : ''));\n break;\n case '>':\n case 'gt':\n case 'greater':\n case 'greaterthan':\n $output = (($subject > $operand) ? $then : (isset($else) ? $else : ''));\n break;\n case '<=':\n case 'lte':\n case 'lessthanequals':\n case 'lessthanorequalto':\n $output = (($subject <= $operand) ? $then : (isset($else) ? $else : ''));\n break;\n case '>=':\n case 'gte':\n case 'greaterthanequals':\n case 'greaterthanequalto':\n $output = (($subject >= $operand) ? $then : (isset($else) ? $else : ''));\n break;\n case 'isempty':\n case 'empty':\n $output = empty($subject) ? $then : (isset($else) ? $else : '');\n break;\n case '!empty':\n case 'notempty':\n case 'isnotempty':\n $output = !empty($subject) && $subject != '' ? $then : (isset($else) ? $else : '');\n break;\n case 'isnull':\n case 'null':\n $output = $subject == null || strtolower($subject) == 'null' ? $then : (isset($else) ? $else : '');\n break;\n case '==':\n case '=':\n case 'eq':\n case 'is':\n case 'equal':\n case 'equals':\n case 'equalto':\n default:\n $output = (($subject == $operand) ? $then : (isset($else) ? $else : ''));\n break;\n }\n }\n}\nif (!empty($debug)) { var_dump($output); }\nunset($subject);\nreturn $output;","locked":0,"properties":"a:6:{s:7:\"subject\";a:5:{s:4:\"name\";s:7:\"subject\";s:4:\"desc\";s:24:\"The data being affected.\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";}s:8:\"operator\";a:5:{s:4:\"name\";s:8:\"operator\";s:4:\"desc\";s:24:\"The type of conditional.\";s:4:\"type\";s:4:\"list\";s:7:\"options\";a:9:{i:0;a:2:{s:4:\"name\";s:2:\"EQ\";s:5:\"value\";s:2:\"EQ\";}i:1;a:2:{s:4:\"name\";s:3:\"NEQ\";s:5:\"value\";s:3:\"NEQ\";}i:2;a:2:{s:4:\"name\";s:2:\"LT\";s:5:\"value\";s:2:\"LT\";}i:3;a:2:{s:4:\"name\";s:2:\"GT\";s:5:\"value\";s:2:\"GT\";}i:4;a:2:{s:4:\"name\";s:3:\"LTE\";s:5:\"value\";s:3:\"LTE\";}i:5;a:2:{s:4:\"name\";s:3:\"GTE\";s:5:\"value\";s:2:\"GT\";}i:6;a:2:{s:4:\"name\";s:5:\"EMPTY\";s:5:\"value\";s:5:\"EMPTY\";}i:7;a:2:{s:4:\"name\";s:8:\"NOTEMPTY\";s:5:\"value\";s:8:\"NOTEMPTY\";}i:8;a:2:{s:4:\"name\";s:6:\"ISNULL\";s:5:\"value\";s:6:\"ISNULL\";}}s:5:\"value\";s:2:\"EQ\";}s:7:\"operand\";a:5:{s:4:\"name\";s:7:\"operand\";s:4:\"desc\";s:62:\"When comparing to the subject, this is the data to compare to.\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";}s:4:\"then\";a:5:{s:4:\"name\";s:4:\"then\";s:4:\"desc\";s:43:\"If conditional was successful, output this.\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";}s:4:\"else\";a:5:{s:4:\"name\";s:4:\"else\";s:4:\"desc\";s:45:\"If conditional was unsuccessful, output this.\";s:4:\"type\";s:9:\"textfield\";s:7:\"options\";s:0:\"\";s:5:\"value\";s:0:\"\";}s:5:\"debug\";a:5:{s:4:\"name\";s:5:\"debug\";s:4:\"desc\";s:92:\"Will output the parameters passed in, as well as the end output. Leave off when not testing.\";s:4:\"type\";s:13:\"combo-boolean\";s:7:\"options\";s:0:\"\";s:5:\"value\";b:0;}}","moduleguid":""} )
Successfully installed package if-1.0-rc1
Any clue on how solve this problem... IF snippet is very useful and I need it...
Configuration :
Windows7
Wamp 2.0.i
PHP 5.3.1
Apache 2.2.14
MySQL 5.1.41
MySQLClient mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $
All privileges and grant on the DB...
Revo 2.0.0-pl rev#7177
Thanks