Jump to content

mendozal

Members
  • Posts

    6
  • Joined

  • Last visited

mendozal's Achievements

  1. When setting the date format to 'd/m/Y', due dates are incorrectly displayed in red, as if they are past due. However, using the 'd-m-Y' format solves the color issue. I'm not sure if this is just a visual bug, or if other due date calculations are also being affected by the '/' date format. My guess is that when Blesta finds dates with /, it assumes m/d/Y, at least for this color calculation. It happens in the admin and client areas: * /admin/billing/ionvoices * /admin/clients/view/X * /client * /client/invoices/index/open * maybe other places. How to reproduce: 1. You need to have many invoices with future due dates. 2. Set your date to d/m/Y 3. The invoices should show as due, even though due dates are in the future. 4. Change it to d-m-Y, those invoices should show the correct color. Example with d/m/Y (wrong) Example with d-m-Y (correct)
  2. You can try here https://dev.blesta.com/browse/CORE
  3. I'm having an issue where cards in the /admin/settings/company/lookandfeel/layout show with grey background when first getting to that page. A way to make them show the currently set color is to uncheck and check the checkbox. This is a video of what I'm talking about: https://vimeo.com/manage/videos/1070477940 Steps to reproduce: 1. Go to that url: /admin/settings/company/lookandfeel/layout/# 2. Change the background colors of the cards (I believe it happens even with default colors). 3. Save 4. Go to the page again / refresh. 5. Colors don't show up. I don't know if this is something specific to my installation or is happening to everyone. - PHP 8.2 - Apache - No errors in console
  4. I think I found a solution... Around line 125 in namesilo.php Change this: $services = $this->Record->fetchAll(); foreach ($services as $service) { $domain_clients[$service->domain] = $client_id; } For this $services = $this->Record->fetchAll(); foreach ($services as $service) { $domain_clients[$service->domain] = $client_id ?? $service->client_id; } I don't know if it still applies for cases where the client_id comes as a parameter, but I think it will.
  5. I recently upgraded to 5.11. And I saw the namesilo module required an upgrade After clicking on upgrade I get a white screen and this error in the logs [2025-02-26T17:33:16.450128+00:00] general.ERROR: PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column `blesta`.`module_client_meta`.`client_id` at row 1 in .../blesta/vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 .../blesta/vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute() #1 .../blesta/vendors/minphp/record/src/Record.php(305): Minphp\Db\PdoConnection->query() #2 .../blesta/components/modules/namesilo/namesilo.php(168): Minphp\Record\Record->insert() #3 .../blesta/components/modules/namesilo/namesilo.php(105): Namesilo->setContactsFromServices() #4 .../blesta/app/models/module_manager.php(449): Namesilo->upgrade() #5 .../blesta/app/controllers/admin_company_modules.php(179): ModuleManager->upgrade() #6 .../blesta/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminCompanyModules->upgrade() #7 .../blesta/index.php(21): Dispatcher::dispatch() #8 {main} I noticed that the error is pointing to this for loop inside the function 'setContactsFromServices' which is called from the Upgrade() method. foreach ($client_contacts as $contact_client_id => $contacts) { $this->Record->duplicate('module_id', '=', $module_row->module_id)-> duplicate('module_row_id', '=', $module_row->id)-> duplicate('client_id', '=', $contact_client_id)-> duplicate('key', '=', 'contacts')-> insert( 'module_client_meta', [ 'module_id' => $module_row->module_id, 'module_row_id' => $module_row->id, 'client_id' => $contact_client_id, 'key' => 'contacts', 'value' => json_encode($contacts), ] ); } I guess this function call from the upgrade method is to retrieve all contacts for all domains and set them into the module_client_meta table. The issue as I see it is that the $client_contacts does not contain contacts per customer, but its key is an empty element. (data masked) Array ( [] => Array <-- I guess here should be the blesta client_id? ( [54789654] => Name1 [65465465] => Name2 [65465555] => Name3 ... ) ) I believe these lines are setting the client_id to [] so the $contact_client_id is null. $contact_ids = $domainInfo->response(true)['contact_ids']; if (!isset($client_contacts[$client_id])) { $client_contacts[$client_id] = []; } I can't get pass the upgrade method.
  6. Thanks. This is still working after all these years.
×
×
  • Create New...