Hi,
I’m desperately trying to create a MIGX record in MODX 3, but I don’t know what to do…
When saving the record, I get the following error messages:
[2023-05-31 16:31:53] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/Om/xPDOObject.php : 227) Error 42000 executing statement:
Array
(
[0] => 42000
[1] => 1055
[2] => Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'modx.migxConfig.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
)
[2023-05-31 16:31:54] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/Om/xPDOObject.php : 227) Error 42000 executing statement:
Array
(
[0] => 42000
[1] => 1055
[2] => Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'modx.migxConfig.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
)
[2023-05-31 16:31:54] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/Om/xPDOObject.php : 227) Error 42000 executing statement:
Array
(
[0] => 42000
[1] => 1055
[2] => Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'modx.migxConfig.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
)
If I try to create an entry, I get the following error messages:
[2023-05-31 16:32:07] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 666) Could not load class: Skl\Model\sklOffice from mysql.skl\model\skloffice
[2023-05-31 16:32:07] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 1642) Could not load class Skl\Model\sklOffice
[2023-05-31 16:32:07] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 666) Could not load class: Skl\Model\sklOffice from mysql.skl\model\skloffice
[2023-05-31 16:32:07] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 666) Could not load class: Skl\Model\sklOffice from mysql.skl\model\skloffice
[2023-05-31 16:32:07] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) Skl\Model\sklOffice::getSelectColumns() is not a valid static method.
[2023-05-31 16:32:08] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 666) Could not load class: Skl\Model\sklOffice from mysql.skl\model\skloffice
[2023-05-31 16:32:10] (ERROR @ /var/www/html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 666) Could not load class: Skl\Model\sklOffice from mysql.skl\model\skloffice
Anyone have any idea what this could be? Do “Package” and “Classname” have to be called differently?
In the “MIGXdb-Settings”-Tab i set this values:
Package: Skl\Model
Classname: Skl\Model\sklOffice
The schema is:
<?xml version="1.0" encoding="UTF-8"?>
<model package="Skl\Model\" baseClass="xPDO\Om\xPDOObject" platform="mysql" defaultEngine="InnoDB" phpdoc-package="" phpdoc-subpackage="" version="3.0">
<object class="sklOffice" table="skl_offices" extends="xPDO\Om\xPDOSimpleObject">
<field key="name" dbtype="text" phptype="string" null="false" default="" />
<field key="doctors" dbtype="text" phptype="string" null="false" default="" />
<field key="address" dbtype="text" phptype="string" null="false" default="" />
<field key="phone" dbtype="text" phptype="string" null="false" default="" />
<field key="fax" dbtype="text" phptype="string" null="false" default="" />
<field key="mail" dbtype="text" phptype="string" null="false" default="" />
<field key="openings_1" dbtype="text" phptype="string" null="false" default="" />
<field key="openings_2" dbtype="text" phptype="string" null="false" default="" />
<field key="openings_3" dbtype="text" phptype="string" null="false" default="" />
<field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" index="index" />
<field key="createdby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
<field key="createdon" dbtype="datetime" phptype="datetime" null="true" />
<field key="editedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
<field key="editedon" dbtype="datetime" phptype="datetime" null="true" />
<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="deletedon" dbtype="datetime" phptype="datetime" null="true" />
<field key="deletedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
<field key="publishedon" dbtype="datetime" phptype="datetime" null="true" />
<field key="publishedby" dbtype="int" precision="10" phptype="integer" null="false" default="0" />
<composite alias="Offices" class="Skl\Model\sklEmployees" local="id" foreign="office_id" cardinality="many" owner="local" />
<index alias="pos" name="pos" primary="false" unique="false" type="BTREE">
<column key="pos" length="" collation="A" null="false" />
</index>
</object>
<object class="sklEmployees" table="skl_employees" extends="xPDO\Om\xPDOSimpleObject">
<field key="forename" dbtype="varchar" phptype="string" precision="100" null="false" default="" />
<field key="surname" dbtype="varchar" phptype="string" precision="100" null="false" default="" />
<field key="position" dbtype="varchar" phptype="string" precision="100" null="false" default="" />
<field key="icon" dbtype="int" precision="10" phptype="integer" null="false" default="0" index="index" />
<field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" index="index" />
<field key="office_id" dbtype="int" precision="10" phptype="integer" null="false" default="0" index="index" />
<aggregate alias="Team" class="Skl\Model\sklOffice" local="office_id" foreign="id" cardinality="one" owner="foreign" />
</object>
</model>
Does anyone have an idea and could help me?
Thank you
Best regards
Daniel