Module Loader fails to deploy a module if "globalSearch" user preference is not set #5210

Closed
opened 2026-02-20 16:31:27 -05:00 by deekerman · 1 comment
Owner

Originally created by @JackBuchanan on GitHub (Jun 16, 2024).

Issue

When running php8+ and if the user preference "globalSearch" is not set for the current user then you get the following error when deploying :

PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given

Possible Fix

Add check for empty values before searching array

Steps to Reproduce the Issue

1. Reset User Preferences
2. Avoid using functionality that will set global search user preferences e.g. global search
3. Attempt to deploy module changes from module loader
4. See 500 error in logs and module deploy fail to complete
...

Context

No response

Version

7.14.2

What browser are you currently using?

Chrome

Browser Version

No response

Environment Information

PHP 8.2

Operating System and Version

Ubuntu 22

Originally created by @JackBuchanan on GitHub (Jun 16, 2024). ### Issue When running php8+ and if the user preference "globalSearch" is not set for the current user then you get the following error when deploying : PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given ### Possible Fix Add check for empty values before searching array ### Steps to Reproduce the Issue ```bash 1. Reset User Preferences 2. Avoid using functionality that will set global search user preferences e.g. global search 3. Attempt to deploy module changes from module loader 4. See 500 error in logs and module deploy fail to complete ... ``` ### Context _No response_ ### Version 7.14.2 ### What browser are you currently using? Chrome ### Browser Version _No response_ ### Environment Information PHP 8.2 ### Operating System and Version Ubuntu 22
Author
Owner

@johnM2401 commented on GitHub (Jul 2, 2024):

Hey @JackBuchanan !

I've given this a try locally but I have been unable to replicate so far, I'm afraid

I've done the following:

  • Sign in as Administrator
  • Reset your user Preferences
  • Log in again and navigate to Admin->Module Loader
  • Via the Database, remove the "global" user_preferences for the Admin user, to ensure i have no value set
  • Upload a Package that adds new modules
  • Upload a package that adds a new language
  • Deploy and enable both packages

This appears to have completed correctly with no fatal errors

I'm using:
Firefox 113.0.2 / PHP 8.2.11 / MariaDB 10.4.12 / SuiteCRM version 7.14.4

Do you know if I've perhaps missed a step in replication?
(or do you know if any specific Module Loader package type is needed?)

Thanks!

@johnM2401 commented on GitHub (Jul 2, 2024): Hey @JackBuchanan ! I've given this a try locally but I have been unable to replicate so far, I'm afraid I've done the following: - Sign in as Administrator - Reset your user Preferences - Log in again and navigate to Admin->Module Loader - Via the Database, remove the "global" user_preferences for the Admin user, to ensure i have no value set - Upload a Package that adds new modules - Upload a package that adds a new language - Deploy and enable both packages This appears to have completed correctly with no fatal errors I'm using: Firefox 113.0.2 / PHP 8.2.11 / MariaDB 10.4.12 / SuiteCRM version 7.14.4 Do you know if I've perhaps missed a step in replication? (or do you know if any specific Module Loader package type is needed?) Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5210
No description provided.