I am facing error importing records in the targets module. When I checked the log file this is the error I got
Fri Dec 4 19:28:03 2015 [32571][1][FATAL] Caught error: Accessing static property ImportFieldSanitize::$createdBeans as non static
Fri Dec 4 19:28:03 2015 [32571][1][FATAL] Caught error: Declaration of SugarFieldEnum::displayFromFunc() should be compatible with SugarFieldBase::displayFromFunc($displayType, $parentFieldArray, $vardef, $displayParams, $tabindex = 0)
Fri Dec 4 19:28:03 2015 [32571][1][FATAL] Caught error: Accessing static property ImportFieldSanitize::$createdBeans as non static
Fri Dec 4 19:28:03 2015 [32571][1][FATAL] Caught error: Non-static method SecurityGroup::inherit() should not be called statically, assuming $this from incompatible context
Fri Dec 4 19:28:03 2015 [32571][1][FATAL] Caught error: Non-static method SecurityGroup::assign_default_groups() should not be called statically, assuming $this from incompatible context
Fri Dec 4 19:28:03 2015 [32571][1][FATAL] Caught error: Non-static method SecurityGroup::retrieveDefaultGroups() should not be called statically, assuming $this from incompatible context
Fri Dec 4 19:28:03 2015 [32571][1][FATAL] Caught error: Non-static method SecurityGroup::inherit_assigned() should not be called statically, assuming $this from incompatible context
Please help.
I could not replicate your issue in a fresh install of SuiteCRM importing to the Targets module. Can you provide more information on your version, environment and possibly attach a test import file that causes the issues?
Hello @willrennie,
I have nearly reproduced this issue separately form @Sid6555.
I get NOTICE level errors in my apache error logs.
I am running PHP version 7.0.6.
I am using SuiteCRM version 7.6.1 with timestamp 2016-04-29 17:00.
Can I get you any more information to help you reproduce this yourself?
I fixed this issue (for me at least) by accessing the $createdBeans statically:
Replace $this->ifs->createdBeans with ImportFieldSanitize::$createdBeans.
I am getting a pull request ready now.
Thanks, works for me.
I have replaced all $this->ifs->createdBeans with ImportFieldSanitize::$createdBeans in file modules/Import/Importer.php
My Environment:
SuiteCRM Version used: 7.7.3
Browser name and version: Chrome 52.0.2743.116 m
Environment name and version: MySQL, PHP 7.0.5
Operating System and version: Windows NT WIN7-SRV 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586
I had the same issue .. SuiteCRM 7.7.8: it would import 196 records then throw this exception. After implementing this change to Importer.php I was able to import all my records (2,268 in total). Thanks so much for the fix!
Most helpful comment
Thanks, works for me.
I have replaced all
$this->ifs->createdBeanswithImportFieldSanitize::$createdBeansin filemodules/Import/Importer.phpMy Environment:
SuiteCRM Version used: 7.7.3
Browser name and version: Chrome 52.0.2743.116 m
Environment name and version: MySQL, PHP 7.0.5
Operating System and version: Windows NT WIN7-SRV 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586