Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JackBuchanan opened this issue Jun 16, 2024 · 1 comment
Labels
Area: Module Issues & PRs related to modules that do not have specific label Status:Requires Updates Issues & PRs which requires input or update from the author Type: Bug Bugs within the core SuiteCRM codebase

Comments

@JackBuchanan
Copy link
Contributor

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

@JackBuchanan JackBuchanan added the Type: Bug Bugs within the core SuiteCRM codebase label Jun 16, 2024
JackBuchanan added a commit to JackBuchanan/SuiteCRM that referenced this issue Jun 16, 2024
…rray

Add empty check to avoid 500 error when deploying module from module loader
@johnM2401 johnM2401 added Status:Requires Updates Issues & PRs which requires input or update from the author Area: Module Issues & PRs related to modules that do not have specific label labels Jul 2, 2024
@johnM2401
Copy link
Contributor

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Module Issues & PRs related to modules that do not have specific label Status:Requires Updates Issues & PRs which requires input or update from the author Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

2 participants