Hi,
i got a fresh (MODX Revolution 2.2.9-pl (traditional) installation and added Formit 2.2.0 and Formit2db 1.1.0 via MODX's package manager.
My barebone code looks like this:
[[!FormIt?
&hooks=`formit2db`
&preHooks=`db2formit`
&prefix=`modx_custom_`
&packageName=`endlich`
&tablename=`endlich`
]]
<h2>Resource Form</h2>
<p>[[+fi.error.error_message]]</p>
<form class="form" action="[[~[[*id]]]]" method="post">
<label for="name">
Rennklasse:
<span class="error">[[+fi.error.name]]</span>
</label>
<input id="name" name="name" type="text" value="[[+fi.name]]" />
<div class="form-buttons">
<input type="submit" value="Save" />
</div>
</form>
Prior runnig this code i created the mysql table
mysql> create table modx_custom_endlich (id integer auto_increment, name varchar(50), primary key (id));
Query OK, 0 rows affected (0.07 sec)
When i try to submit the form i get the following error:
Failed to create object of type:
MODX's error log says:
[2013-09-19 15:24:37] (ERROR @ /modx-2.2.9-pl/index.php) addPackage called with an invalid package name.
[2013-09-19 15:24:37] (ERROR @ /modx-2.2.9-pl/index.php) addPackage called with an invalid package name.
[2013-09-19 15:24:37] (ERROR @ /modx-2.2.9-pl/index.php) No class specified for loadClass
Somewhere i read that it's not package
Name but package
name. If i run it with packagename the error log says:
[2013-09-19 15:25:26] (ERROR @ /modx-2.2.9-pl/index.php) Path specified for package endlich is not a valid or accessible directory: /var/www/modx-2.2.9-pl/core/components/endlich/model/
[2013-09-19 15:25:26] (ERROR @ /modx-2.2.9-pl/index.php) Path specified for package endlich is not a valid or accessible directory: /var/www/modx-2.2.9-pl/core/components/endlich/model/
[2013-09-19 15:25:26] (ERROR @ /modx-2.2.9-pl/index.php) No class specified for loadClass
As far as i unterstood everything i though that formit2db creates the necessary folders etc.
The directory /var/www/modx-2.2.9-pl/core is completley writeable for everyone (chmod 777).
What am i doing wrong?