berliCRM / berlicrm

From Berlin to Germany and Europe - an open source CRM Solution mainly for small and medium-sized businesses: Visit https://www.berlicrm.de/
Other
52 stars 37 forks source link

Changes not getting saved #323

Closed Linutux closed 5 years ago

Linutux commented 5 years ago

When I try to edit a lead, person or any other dataset, changes won't be saved. After clicking save, everything is like before. This also applies to documents. If I upload a new version of a document, it is still the old version.

My system: OS: Ubuntu 18.04 Webserver: Apache2 with fcgi PHP 7.3

Archibald111 commented 5 years ago

please read the installation guide -> https://blog.crm-now.de/doc/berliCRM/installation/Installation_berlicrm.html PHP 7.3 is not supported yet

bbommer commented 5 years ago

Hallo,

hat das vorher funktioniert (weil es alte Dokumente gibt)? Seit wann nicht mehr? Oder ist die Datenbank von einer älteren vtiger Installation? Dann würde ich annehmen irgendein Datenbank-Feld fehlt. Setz mal "var $dieOnError = true;" in Zeile 75 von "include/database/PearDatabase.php". Dann bekommt man Datenbank-Fehler im Browser angezeigt.

Grüße, Benjamin Bommer

Am 04.08.2019 um 13:59 schrieb Simon Zöllner:

When I try to edit a lead, person or any other dataset, changes won't be saved. After clicking save, everything is like before. This also applies to documents. If I upload a new version of a document, it is still the old version.

My system: OS: Ubuntu 18.04 Webserver: Apache2 with fcgi PHP 7.3

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/berliCRM/berlicrm/issues/323?email_source=notifications&email_token=AJPFIKNQDACNUAVADH7DRTTQC3AB3A5CNFSM4IJFDM72YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDHQCWA, or mute the thread https://github.com/notifications/unsubscribe-auth/AJPFIKPAJFVB2KI3O2FNZBTQC3AB3ANCNFSM4IJFDM7Q.

-- Mit freundlichen Grüßen,

Benjamin Bommer Technischer CRM Consultant

crm-now GmbH Stromstraße 5 10555 Berlin

Tel. Büro: +49 (0)30 3900 - 1800 Fax.: +49 (0)30 3900 1810 www.crm-now.de Geschäftsführer: Emilio Paolini AG Berlin-Charlottenburg HRB 135671 B

Linutux commented 5 years ago

Ich habe nun auf PHP 7.2 umgestellt.

Schon beim Login kommt der erste Fehler:

array ( 0 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/include/database/PearDatabase.php', 'line' => 365, 'function' => 'checkError', ), 1 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/modules/Users/models/Module.php', 'line' => 169, 'function' => 'pquery', ), 2 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/modules/Users/actions/Login.php', 'line' => 52, 'function' => 'saveLoginHistory', ), 3 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/includes/main/WebUI.php', 'line' => 228, 'function' => 'process', ), 4 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/index.php', 'line' => 18, 'function' => 'process', ), )

Query Failed:INSERT INTO vtiger_loginhistory (user_name, user_ip, logout_time, login_time, status) VALUES (?,?,?,?,?)::ADODB error Query Failed:INSERT INTO vtiger_loginhistory (user_name, user_ip, logout_time, login_time, status) VALUES (?,?,?,?,?)::->Incorrect datetime value: '0000-00-00 00:00:00' for column 'logout_time' at row 1

Beim Versuch eines Update irgendeinen Eintrags (in dem Fall ein Lead), kommt folgender Fehler:

array ( 0 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/include/database/PearDatabase.php', 'line' => 365, 'function' => 'checkError', ), 1 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/data/CRMEntity.php', 'line' => 416, 'function' => 'pquery', ), 2 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/data/CRMEntity.php', 'line' => 87, 'function' => 'insertIntoEntityTable', ), 3 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/data/CRMEntity.php', 'line' => 846, 'function' => 'saveentity', ), 4 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/modules/Vtiger/models/Module.php', 'line' => 143, 'function' => 'save', ), 5 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/modules/Vtiger/models/Record.php', 'line' => 230, 'function' => 'saveRecord', ), 6 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/modules/Vtiger/actions/Save.php', 'line' => 49, 'function' => 'save', ), 7 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/modules/Vtiger/actions/Save.php', 'line' => 27, 'function' => 'saveRecord', ), 8 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/modules/Leads/actions/Save.php', 'line' => 21, 'function' => 'process', ), 9 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/includes/main/WebUI.php', 'line' => 228, 'function' => 'process', ), 10 => array ( 'file' => '/mnt/var/customers/webs/medartmedia/crm.medart-media.de/index.php', 'line' => 18, 'function' => 'process', ), )

Query Failed:select from vtiger_field where tabid in (?) and tablename=? and displaytype in (1,3) and presence in (0,2) group by columnname::ADODB error Query Failed:select from vtiger_field where tabid in (?) and tablename=? and displaytype in (1,3) and presence in (0,2) group by columnname::->Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'medartmediasql8.vtiger_field.fieldid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

bbommer commented 5 years ago

Hallo, da sind offenbar Einstellungen des SQL-Servers zu strikt:

  1. NO_ZERO_DATE muss aus sein: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_zero_date

  2. ONLY_FULL_GROUP_BY muss aus sein: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by

Wo kommt denn diese Konfiguration des sql-Servers her? Ist die individuell oder default irgendeiner bestimmten Distribution?

Viele Grüße

Linutux commented 5 years ago

Das ist eine stinknormale Ubuntu 18.04 Installation auf einem Server bei Hetzner Cloud, die Configs komplett unverändert. Falls nötig, kann ich dort gerne einen Server für euch zum Testen anlegen.

Edit: SELECT @@SESSION.sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Linutux commented 5 years ago

Durch das korrekte Setzen des SQL-mode ist der Fehler nun komplett verschwunden. Alles funktioniert, wie es soll. Bleibt nur die Frage, ob man es irgendwie hinbekommt, dass BerliCRM auch mit dem Default-MySQL klarkommt oder ob man ggf. die Installationsanweisung ändern muss. Ansich gibt es ja schon einen Grund, warum der SQL-mode so vorgesehen ist. Das einfach abzustellen, ist ja eigentlich nicht Sinn der Sache.

bbommer commented 5 years ago

Wie gesagt: NO_ZERO_DATE und ONLY_FULL_GROUP_BY muss aus sein. Und das ist default von MySQL 5.7.