-
- 56 Posts
I've been wrestling with MIGX for a couple of days but I can't fathom this latest issue I'm having.
I have created the mysql database & created all the same fields in MIGX.
I can post all the details to MYSQL from either a form on website or from within the MIGX manager.
However, I cannot get the data to appear in the CMP, all column fields appear here but the data never does.
Upon perusal of the cache error log I found this;
[2014-06-02 21:58:28] (ERROR @ /mod/assets/components/migx/connector.php) Error 42S22 executing statement:
Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column 'ShippingForm.id' in 'field list'
)
Now (in MIGX) I do not have a column id called ShippingForm, it also does not appear as a column when viewing the table in PHPAdmin.
The only thing I have called ShippingForm is the Class name.
The following is the data loaded into the schema & successfully parsed:
<model package="shipping-form" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
<object class="ShippingForm" table="shipping-form" extends="xPDOSimpleObject">
<field key="_rowid_" dbtype="int" precision="11" phptype="integer" null="false" default=""/>
<field key="loadtypeform1" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="loaddescriptionform1" dbtype="text" phptype="string" null="false" default=""/>
<field key="photofileform1" dbtype="varchar" precision="255" phptype="string" null="true"/>
<field key="photofileform2" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="collectionaddressform1" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="collectioncityform1" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="collectionpostcodeform1" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="collectiondateform1" dbtype="date" phptype="date" null="false" default=""/>
<field key="deliveryaddressform1" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="deliverycityform1" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="deliverypostcodeform1" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="deliverydateform1" dbtype="date" phptype="date" null="false" default=""/>
<field key="shippernameform1" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
<field key="shipperaddressform1" dbtype="varchar" precision="255" phptype="string" null="true"/>
<field key="shippersemailform1" dbtype="varchar" precision="255" phptype="string" null="false" default="0"/>
<field key="shipperstelform1" dbtype="varchar" precision="255" phptype="string" null="true"/>
<field key="_fromaddress_" dbtype="varchar" precision="128" phptype="string" null="false" default="0"/>
<aggregate alias="CreatedBy" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign"/>
<aggregate alias="EditedBy" class="modUser" local="editedby" foreign="id" cardinality="one" owner="foreign"/>
</object>
</model>
Does any wise soul have any idea what I may be doing wrong or what I have missed here?
Server details;
Apache version 2.2.27
PHP version 5.3.28
MySQL version 5.5.36-cll
Architecture x86_64
Operating system linux
It is a shared hosting environment, I have had 3 request to my host whereby they resolved permission based requests from me already, however I feel unsure that this is a similar issue.
-
- 5,888 Posts
do you have the field 'id' in your table as primary-key and as autoincrementing?
-
- 56 Posts
The only autoincrementing field is the one called _rowid_
I'm unsure what you mean by primary-key......
However, _rowid_ is the first field in MYSQL
I have tried creating _rowid_ in MIGX and also tried creating a field called just 'id' but this give same result
-
- 56 Posts
Currently I have a field called 'id' created in MIGX Columns but I have not created it in FormTabs
-
- 5,888 Posts
is this a new/emtpy table?
If yes, I would delete this table, remove this _rowid_ field from your schema and recreate this table with MIGX by clicking the button 'create Tables'
also this part
<aggregate alias="CreatedBy" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign"/>
<aggregate alias="EditedBy" class="modUser" local="editedby" foreign="id" cardinality="one" owner="foreign"/>
doesn't make much sense without createdby and editedby - fields