by Blackant Solutions

Colors for SuiteCRM helps you create and maintain a unique color code of your customer data so it’s easy to identify the records matching the criteria with a highlighted color. What’s unique about this add-on is, it allows you to configure colors at both the field level, home page dashlets, and sub-panel level within a module.

Free 30 day trial
Try it Now

#5225 - Can not add Colors Setting

Closed Bug? created by qwerty 9 months ago

When trying to save a new setting I get a blank page, the url ends with "index.php?module=ant_Colors&action=saveSettings". No errors in suitecrm log

  1. blackant member avatar

    Blackant Solutions Provider

    9 months ago

    Hi, Can we have a call via Zoom to see the error? Please send email - [email protected]

    Thanks,

  2. informatique member avatar

    MG Verified Purchase

    2 months ago

    I just bought the Add-On and I have the exact same problem. It's a PHP Fatal Error (so HTTP Error 500) caused by an uninitialized variable in action_saveSettings():

    PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/html/crm/modules/ant_Colors/controller.php:67\nStack trace:\n#0 /var/www/html/crm/include/MVC/Controller/SugarController.php(522): ant_ColorsController->action_saveSettings()\n#1 /var/www/html/crm/include/MVC/Controller/SugarController.php(491): SugarController->do_action()\n#2 /var/www/html/crm/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()\n#3 /var/www/html/crm/include/MVC/Controller/SugarController.php(361): SugarController->process()\n#4 /var/www/html/crm/include/MVC/SugarApplication.php(101): SugarController->execute()\n#5 /var/www/html/crm/index.php(52): SugarApplication->execute()\n#6 {main}\n  thrown in /var/www/html/crm/modules/ant_Colors/controller.php on line 67, referer: https://crm.tmsiltd.com/index.php?module=ant_Colors&action=edit
    

    $conditionArray is never initialized:

        public function action_saveSettings()
        {
            global $db, $current_user;
            if(!is_admin($current_user)) {
                sugar_die("Unauthorized access to administration.");
            }
    
            for($i = 0; $i < count($conditionArray); $i ++) {
                foreach($formData[$conditionArray[$i]] as $key => $innerArray) {
                    $formData[$conditionArray[$i]][$key] = array_values($innerArray);
                }
            }
            $formData = $_POST;
    [...]
    
    • blackant member avatar

      Blackant Solutions Provider

      2 months ago

      Hi, Can you please let me know what PHP version and SuiteCRM version you are using?

    • informatique member avatar

      MG Verified Purchase

      2 months ago

      Colors 1.8.2 SuiteCRM 7.14.5 PHP 8.2.23 MariaDB 10.11.8

    • informatique member avatar

      MG Verified Purchase

      2 months ago

      the for block going from line 67 to 71 that cause the problem is not needed at all as it populate $formData that is reset just after. I tried removing it and the rule was successfully saved in ant_color_settings table. But not applied in the Dashboard or elsewhere.

    • blackant member avatar

      Blackant Solutions Provider

      2 months ago

      I will check and update you a patch.

    • blackant member avatar

      Blackant Solutions Provider

      2 months ago

      Hi, Can you please share your email to [email protected]? I will share the link there.

    • informatique member avatar

      MG Verified Purchase

      2 months ago

      Version 1.8.3 works well with PHP 8.2.23. Thank you.

  3. blackant member avatar

    Blackant Solutions Provider

    2 months ago

    Thanks for the update. We will check and update a fix for that PHP version. I will update here when its done.

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
  • "This is a great addition to Suitecrm and a feature some of our users were asking for. from identifying high priority records or reducing visibility to..." - ghansen

    Read More Reviews