Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create Product
#1
Hello everybody,

I have migrated vtigercrm 5.4.0 to CoreBOS. All functions work perfectly, the following error message appears only when creating a new product.

Warning: array_merge(): Argument #2 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/CRMEntity.php on line 684

Warning: array_merge(): Argument #1 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/CRMEntity.php on line 684

Warning: array_merge(): Argument #2 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/CRMEntity.php on line 684

Warning: array_merge(): Argument #1 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/CRMEntity.php on line 684

Warning: array_merge(): Argument #2 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/CRMEntity.php on line 684

Warning: array_merge(): Argument #1 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/CRMEntity.php on line 684

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/CRMEntity.php:684) in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/modules/Vtiger/Save.php on line 103

How can I fix this error?
Reply
#2
Hi

Welcome to coreBOS. Where did you download the code from?
In my latest version I do not have an "array_merge" on line 684.

In any case, you should set error_reporting to E_ERROR, either in your php.ini or in config.inc.php:

https://github.com/tsolucio/corebos/blob...te.php#L15
Joe
TSolucio
Reply
#3
(02-19-2017, 06:04 PM)joebordes Wrote: Hi

Welcome to coreBOS. Where did you download the code from?
In my latest version I do not have an "array_merge" on line 684.

In any case, you should set error_reporting to E_ERROR, either in your php.ini or in config.inc.php:

https://github.com/tsolucio/corebos/blob...te.php#L15

Thank you for your fast reply. I followed the instructions under http://corebos.org/documentation/doku.ph...gradevt2cb

After adding
Code:
error_reporting(E_ERROR);
to my config.inc.php the error result is:

Quote:Warning: array_diff(): Argument #2 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/VTEntityDelta.php on line 99

Warning: Invalid argument supplied for foreach() in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/VTEntityDelta.php on line 100

Warning: array_diff(): Argument #1 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/VTEntityDelta.php on line 106

Warning: Invalid argument supplied for foreach() in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/VTEntityDelta.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/data/VTEntityDelta.php:99) in /is/htdocs/wp10725802_AP6SP9SHMX/www/corebos/modules/Vtiger/Save.php on line 103
Reply
#4
so you executed "git clone" and have your code under git control or downloaded the zip from the main page. right?

If you look at line 684 of data/CRMEntity.php does it look like this:

https://github.com/tsolucio/corebos/blob...y.php#L684

?
Joe
TSolucio
Reply
#5
(02-19-2017, 08:44 PM)joebordes Wrote: so you executed "git clone" and have your code under git control or downloaded the zip from the main page. right?

If you look at line 684 of data/CRMEntity.php does it look like this:

https://github.com/tsolucio/corebos/blob...y.php#L684

?

I have downloaded the zip file.

In my CRMEntity.php on line 684 is this code

Code:
$dbvals = array_merge($dbvals,$flds);
Reply
#6
Try downloading the code from the "Download Zip" button on the main page:

   
Joe
TSolucio
Reply
#7
Note: Now that you already have it migrated, all you have to do is update the code, enter as admin, go to corebos updater and "Load" and "Apply All". You don't have to migrate again. In fact you don't have to migrate ever again. Just update the code (ideally with git) and apply corebos updates
Joe
TSolucio
Reply
#8
(02-19-2017, 10:06 PM)joebordes Wrote: Note: Now that you already have it migrated, all you have to do is update the code, enter as admin, go to corebos updater and "Load" and "Apply All". You don't have to migrate again. In fact you don't have to migrate ever again. Just update the code (ideally with git) and apply corebos updates

I have now again downloaded the current Github version. All relevant data after the instructions of my previous vtigercrm installation copied into the corresponding directories and the installupdater.php script started. I can not update cbupd-0000148.

It returns...
Quote:ERROR: Class called without update record in application!!


The error after creating/editing a product is now...
Quote:Warning: array_merge(): Argument #2 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/crm/data/CRMEntity.php on line 710


Warning: array_merge(): Argument #1 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/crm/data/CRMEntity.php on line 710

Warning: array_merge(): Argument #2 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/crm/data/CRMEntity.php on line 710

Warning: array_merge(): Argument #1 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/crm/data/CRMEntity.php on line 710

Warning: array_merge(): Argument #2 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/crm/data/CRMEntity.php on line 710

Warning: array_merge(): Argument #1 is not an array in /is/htdocs/wp10725802_AP6SP9SHMX/www/crm/data/CRMEntity.php on line 710

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp10725802_AP6SP9SHMX/www/crm/data/CRMEntity.php:710) in /is/htdocs/wp10725802_AP6SP9SHMX/www/crm/modules/Vtiger/Save.php on line 103


Last but not least when I edit my PDF Maker Template for invoice i get the error
Quote:Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/is/htdocs/wp10725802_AP6SP9SHMX/www/crm/Smarty/templates/modules/PDFMaker/EditPDFTemplate.tpl" on line 444 "{php} if (file_exists("kcfinder/browse.php")) { {/php}" {php}{/php} tags not allowed. Use SmartyBC to enable them <-- thrown in /is/htdocs/wp10725802_AP6SP9SHMX/www/crm/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 444


I am at a loss ...  Huh
Reply
#9
Ok, lets take it step by step.


First, I need the name of the changeset that is failing, The filename or classname because the number is dynamic and changes in each install.

Second, I have no idea why you are getting that warning. The easy solution is to set your PHP error_reporting directive to E_ERROR, but ideally we should push forward and find out why the warning is appearing and fix it. If you would like to help me find out what is happening add the "var_dump" command I show in the next patch. If that is to complicated then just set the error_reporting to E_ERROR.


Code:
diff --git a/data/CRMEntity.php b/data/CRMEntity.php

index e21e313..f787531 100755
--- a/data/CRMEntity.php
+++ b/data/CRMEntity.php
@@ -706,6 +706,7 @@ class CRMEntity {
                        $dbvals = $result = array();
                        foreach ($this->tab_name_index as $table_name => $index) {
                                $result = $adb->pquery("select * from $table_name where $index=?", array($this->id));
+                               var_dump($table_name,$index);
                                $flds = $adb->fetch_array($result);
                                $dbvals = array_merge($dbvals,$flds);
                        }

Finally, since we updated coreBOS to support PHP7 PDFMaker requires updating. The guys at ITS4You aren't interested, not even in picking up the work we are doing maintaining the module and distribute it. If you are using PDFMaker free you can download the coreBOS version from github, if you are using Profession, you will have to contact me directly so I can send you the updated code. Send me an email and I will send you the code.
Joe
TSolucio
Reply
#10
I found and fixed the warning messages. Update your code and try again.

https://github.com/tsolucio/corebos/comm...3a70910e38

Thanks!!
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)