Error al actualizar de 7.8.31 a 7.10.33

Hola, logré actualizar mi versión de 7.8.31 a 7.10.33, pero me sale dos errores que no logro resolver, el primero dice:

Tue Apr 26 01:17:00 2022 [5652][70ad7043-1e82-ac24-53ef-564d0eec76e2][FATAL] A language key does not found: [ERR_FIELD_FROM_IS_NOT_SET]
Tue Apr 26 01:17:00 2022 [5652][70ad7043-1e82-ac24-53ef-564d0eec76e2][FATAL] A language key does not found: [ERR_FIELD_FROMNAME_IS_NOT_SET]
Tue Apr 26 01:17:00 2022 [5652][70ad7043-1e82-ac24-53ef-564d0eec76e2][FATAL] A language key does not found: [ERR_FIELD_FROM_NAME_IS_NOT_SET]
Tue Apr 26 01:17:00 2022 [5652][70ad7043-1e82-ac24-53ef-564d0eec76e2][FATAL] A language key does not found: [ERR_FIELD_FROM_ADDR_NAME_IS_EMPTY]

Yo solo trabajo en Ingles en SuiteCRM. Mi entorno es: Windows 10 Pro, PHP 7.4.27 bajo Xampp y no he cambiado nada en el idioma.
El otro error es:


Por favor su ayuda!! gracias

  1. Do you have a file called custom/modules/Emails/language/en_us.lang.php? If you do, that’s not the best way to customize language strings, and it’s causing that language key error.

  2. Access your database from phpMyAdmin, go in the email_addresses table, find the row with that email, and remove that ' from the beginning. That might fix it.

Many thanks for your help!! I found in that email an apostrophe, so you are right that’s the problem. So I deleted that hopefully it works

Captura

But in the other hand how can I do about…

Wed Apr 27 22:19:29 2022 [5668][ecc48633-68d7-f08d-0ab0-5756dc91f2e7][FATAL] A language key does not found: [ERR_FIELD_FROM_IS_NOT_SET]
Wed Apr 27 22:19:29 2022 [5668][ecc48633-68d7-f08d-0ab0-5756dc91f2e7][FATAL] A language key does not found: [ERR_FIELD_FROMNAME_IS_NOT_SET]
Wed Apr 27 22:19:29 2022 [5668][ecc48633-68d7-f08d-0ab0-5756dc91f2e7][FATAL] A language key does not found: [ERR_FIELD_FROM_NAME_IS_NOT_SET]
Wed Apr 27 22:19:29 2022 [5668][ecc48633-68d7-f08d-0ab0-5756dc91f2e7][FATAL] A language key does not found: [ERR_FIELD_FROM_ADDR_NAME_IS_EMPTY]

I really appreciate your guide about it…in advanced thks.

I answered both your issues in my first post…

Sorry about it, it was my mistake. I was checking and I don’t have that file in custom/modules/Emails/language/en_us.lang.php, in fact I found this file in several parts (en_us.lang.php), so in your path I found just:

imagen

But the similar one is sugarcrm/modules/Emails/language/en_us.lang.php, so I have to do any change?

Thks in advanced

Sorry, I checked the code and this is more complicated than it initially seemed. It’s not just an ordinary use of a language string, it’s a convoluted class called LangText that makes a simple thing become multi-layered and complex.

I did find one of these errors in my own logs, back in December 2020! I’ll leave it here with an extended stack trace, in case anybody wants to take a look (but I don’t advise it).

Tue Dec 15 13:37:04 2020 [944][1][FATAL] A language key does not found: [ERR_FIELD_FROM_IS_NOT_SET]
#0 /include/ErrorMessage.php(123):  LoggerManager->__call(
     method: 'fatal',
     message: Array (
      [0] => 'A language key does not found: [ERR_FIELD_FROM_IS_NOT_SET]')
#1 /include/ErrorMessage.php(141):  SuiteCRM\ErrorMessage->handle()
#2 /include/LangText.php(194):  SuiteCRM\ErrorMessage::handler(
     message: 'A language key does not found: [ERR_FIELD_FROM_IS_NOT_SET]',
     level: 'fatal',
     throw: )
#3 /include/LangText.php(232):  SuiteCRM\LangText->getText()
#4 /modules/Emails/EmailFromValidator.php(238):  SuiteCRM\LangText::get(
     key: 'ERR_FIELD_FROM_IS_NOT_SET',
     args: ,
     use: 3,
     log: 1,
     throw: ,
     module: 'Emails')
#5 /modules/Emails/EmailFromValidator.php(215):  EmailFromValidator->getErrorAsText(     error: 1)
#6 /modules/Emails/Email.php(1616):  EmailFromValidator->getErrorsAsText()
#7 /modules/EmailMan/EmailMan.php(596):  Email->save()
#8 /custom/modules/EmailMan/CustomEmailMan.php(424):  EmailMan->create_ref_email(
     marketing_id: '13a16c62-14d3-091e-d4a0-5f9071b545c0',
     subject: 'Dear {{ person.name }}',
     body_text: ' redacted',
     campagin_name: 'Email campaign 1',
     from_address: '---------@gmail.com',
     sender_id: '1',
     notes: Array (,
     macro_nv: Array (
      [sugar_to_email_address] => 'support.beans.kid@example.tv'
      [email_template_id] => '5ee383c6-fb62-459a-c552-5eb149997936',
     newmessage: 1,
     from_address_name: 'SuiteCRM <----------@gmail.com>')
#9 /custom/modules/EmailMan/EmailManDelivery.php(258):  CustomEmailMan->sendEmail(
     mail: SugarPHPMailer Object (
      [oe] => OutboundEmail Object (
        [db] => MysqliManager Object (
          [dbType] => 'mysql'
          [variant] => 'mysqli'
          [priority] => 10
         …),
     save_emails: '2',
     testmode: ,
     previewmode: )
#10 /modules/Schedulers/_AddJobsHere.php(289):  require(     '/mnt/c/Users/Pgr/PhpstormProjects/SuiteCRM/custom/modules/EmailMan/EmailManDelivery.php')
#11 /modules/SchedulersJobs/SchedulersJob.php(539):  runMassEmailCampaign(
     SchedulersJob Object (
      [id] => 'e5cc434e-83b1-f142-79ec-5fd8bb0079a6'
      [name] => 'Run Nightly Mass Email Campaigns'
      [deleted] => 0
      [date_entered] =>
      [date_modified] => …))
#12 /include/SugarQueue/SugarCronJobs.php(191):  SchedulersJob->runJob()
#13 /include/SugarQueue/SugarCronJobs.php(231):  SugarCronJobs->executeJob(
     job: SchedulersJob Object (
      [id] => 'e5cc434e-83b1-f142-79ec-5fd8bb0079a6'
      [name] => 'Run Nightly Mass Email Campaigns'
      [deleted] => 0
      [date_entered] =>
      [date_modified] => …))
#14 /cron.php(100):  SugarCronJobs->runCycle()

Thank you, can you move this bug to the English language forum?, because you are an expert, and a lot of people follow your answers.

Houston, we have a problem!!!.. any body can I help me!!!

Can you please try just one thing?

Change this line

SuiteCRM/LangText.php at master · salesagility/SuiteCRM · GitHub

to this instead:

$textResolved = $this->resolveText($this->module, $this->lang);

and test to see how it goes.

It’s possible that this will generate more errors, not less, so try this at a time when you don’t have users using the system… and change it back in case it goes wrong.

You are so kind with your soon guide!!!

point is, in that file looks quite different:

----- MY FILE--------

 public function getText($key = null, $args = null, $use = null, $module = null, $lang = null)
    { // TODO: rename the methode to LangText::translate()

        // TODO: app_strings and mod_strings could be in separated methods
        global $app_strings, $mod_strings, $app_list_strings;
        
        $module = $module ? $module : $this->module;
        
        if (!$mod_strings && $module) {
            // retrieve translation for specified module
            $lang = $lang ? $lang : ($this->lang ? $this->lang : $GLOBALS['current_language']);
            include_once __DIR__ . '/SugarObjects/LanguageManager.php';
            \LanguageManager::loadModuleLanguage($module, $lang);
        }

        if (!is_null($key)) {
            $this->key = $key;
        }

        if (!is_null($args)) {
            $this->args = $args;
        }

        if (!is_null($use)) {
            $this->use = $use;
        }

        if ($this->use === self::USING_MOD_STRINGS) {
            $text = isset($mod_strings[$this->key]) && $mod_strings[$this->key] ? $mod_strings[$this->key] : null;
        } elseif ($this->use === self::USING_APP_STRINGS) {
            $text = isset($app_strings[$this->key]) && $app_strings[$this->key] ? $app_strings[$this->key] : null;
        } elseif ($this->use === self::USING_ALL_STRINGS) {
            $text = isset($mod_strings[$this->key]) && $mod_strings[$this->key] ? $mod_strings[$this->key] : (
                isset($app_strings[$this->key]) ? $app_strings[$this->key] : (
                    isset($app_list_strings[$this->key]) ? $app_list_strings[$this->key] : null
                )
            );
        } else {
            ErrorMessage::drop('Unknown use case for translation: ' . $this->use);
        }

        if (!$text) {
            if ($this->log) {
                ErrorMessage::handler('A language key does not found: [' . $this->key . ']', self::LOG_LEVEL, $this->throw);
            } else {
                $text = $this->key;
            }
        }

        foreach ((array) $this->args as $name => $value) {
            $text = str_replace('{' . $name . '}', $value, $text);
        }

        return $text;
    }

-----END OF MY FILE------

-------but in github, this information looks very short, please have a look-------

    public function getText($key = null, $args = null, $use = null, $module = null, $lang = null)
    { // TODO: rename the methode to LangText::translate()

        $this->selfUpdate($key, $args, $use);
        $textResolved = $this->resolveText($module, $lang);
        $text = $this->replaceArgs($textResolved);

        return $text;
    }

maybe is a different version??..

Thks

Yes it’s an earlier version. Forget about my suggestion above.

Try something simpler, change this line:

ErrorMessage::handler('A language key does not found: [' . $this->key . ']', self::LOG_LEVEL, $this->throw);

To

$text = 'MissingString';

Instead of throwing an error and blocking execution, it will just go on with a missing label. This is a hack… but it might solve your current problem. And I have a certain hope that once you’re up to date with the latest version, this issue will go away by itself.

You are the best one!!!

It’s works, hopefully in the next release will be fixed.

Many thanks!!!..

I’m getting crazy!!

Please I need your guide, because I did your solution and it works in the test server very well, but when I put that in the production server, something it`s not working.

So, let me explain more, when I run the same process in the test and production server, I received a different result, basicly the process, use a WorkFlow, and it have to send a email, but the production server send some wrong information, but the test server works fine.

Both server use, same configuration, systems (Windows 10 pro, xampp, PHP 7.4.27)

Shall you give any advice? pls.

Start a new thread and include more details. That seems like an entirely new issue. This change only solves a FATAL error, and it’s a fatal error that shouldn’t affect much of anything, since it’s just a label failure. You must have some other issue now…