Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: Undefined property: Lead::$assistant
Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: Undefined property: Lead::$accept_status_id
Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: Undefined property: Lead::$event_invite_id
Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: Undefined property: Lead::$event_status_id
Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: Undefined property: Lead::$num_employees_c
Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: Undefined property: Lead::$jjwg_maps_geocode_status_c
Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: Undefined property: SugarFeed::$link_url
Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: Undefined property: SugarFeed::$link_type
Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: stat(): stat failed for upload/import/status_1.csv
Wed Feb 19 21:37:06 2025 [14631][1][FATAL] Caught error: touch(): UploadStream::stream_metadata is not implemented!
I’ve tried just importing first name, last name, email address and only a few records an get this every time. The records seem to import OK, just it errors out so I miss all the final totals and the ability to download what was not imported.
Anyone else?
(As a side note, it works fine in SuiteCRM 8 with the same data)
#### Issue
The page slows down a ton and hundreds of errors get printed because… of an undefined variable on the Leads page.
#### Expected Behavior
There would not be errors in my browser console.
#### Actual Behavior
There are hundreds of errors in my browser console and the page slows to a crawl.
#### Possible Fix
Not sure!
#### Steps to Reproduce
You can reproduce this on the demo site or on a locally hosted site running 7.10.x-hotfix, I'm not sure when it was introduced but it's been there at least since 7.10.18. I recommend using 7.10.x-hotfix if you can, since the location of the code has changed with some recent PRs (the PRs don't seem to have made any difference, however)
1. Go to Leads list view (you'll need to create a lead if you don't have any)
2. Open your browser console
3. Click on a Lead to open it.
4. Wait for the page to load
5. Look at the browser console and note dozens/hundreds of errors that say something about a TypeError and an undefined variable, and point to code in `sugar_grp1.js` (`sugar_3.js` in the actual source).
In Firefox the error is `TypeError: document.MassUpdate is undefined`, in Chrome it's `Uncaught TypeError: Cannot read property 'uid' of undefined`.
#### Context
This causes my browser to slow down to a crawl, it's practically unusable when I hit this bug.
#### Your Environment
* SuiteCRM Version used: 7.10.18, hotfix-7.10.x, and I was also able to reproduce it on the demo site, 7.11.6
* Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox 68.0
* Environment name and version (e.g. MySQL, PHP 7): MySQL 5.7, PHP 7.2
* Operating System and version (e.g Ubuntu 16.04): macOS Mojave (10.14.6)
Looks similar type of errors, but that has to do with list view, not importation. As well, he’s reporting errors in browser console. I’m experiencing them right in the dialog box in the import wizard.
I also just tested and reverting back to PHP 7.4 the issue goes away!!!
So this is a PHP 8 issue.
So I think what’s going on here is that the import function is passing null variables to Sugarbean.php. In PHP 7.4 this only produces a warning but not fatal error.
In PHP 8+ this is a scrict warning and is probably breaking execution.
So… now I have to figure out which direction to hunt in?
@pgr this is one of those situations where I need your expert counsel (you told me I could ask any time). From a developer perspecive, is it better to fix Sugarbean to allow it to be passed null variables and just skip them, or is it better to fix the import function to stop passing null variables?
Or as a workaround, I haven’t tried is suppressing error reporting in the php.ini (I’m going to try that to, however it’s a bandaid if it works).
to php.ini for the install directory allows the import to proceed now and finish properly. This gets me by for today, but this issue I’d really like to dive into further and solve. I can only assume future versions of PHP will be more strict and may cause this to fail.
Just found out on another server environment I had to add addtional error suppression. PHP 8 introduces E_USER_WARNING and that has to be supressed too:
error_reporting = E_ALL & ~E_WARNING & ~E_NOTICE & ~E_USER_WARNING