Fix UTF Encoding

I would like to better understand how this option works, which is found in the administration/repair menu. We are having issues with characters: ñ and accented vowels (á, é, í, etc.) particularly in the Calls module, and I don’t know how to fix it at the code level in version 8.6.0. I saw the option “repair UTF encoding,” but it doesn’t perform the repair immediately. Instead, there is a notice that it will be done by the task scheduler. Currently, this is not working for us in SuiteCRM, and I would like to correct this error in the Calls module.

The problem arises when we save a new record. In the “Related To” column of the list view, values containing “ñ” or accented characters are displayed incorrectly, such as “Compa & n tilde ; &i acute ; a,” which in Spanish is “Compañía.” However, this does not happen before that point or in other modules. I would appreciate any help you can provide.

https://www.fileformat.info/info/charset/UTF-8/list.htm

Why don’t you fix the scheduler not working?

Your difficulties are either

  1. A problem with cron, there are many posts here detailing how to do it, and we can try helping you if you are stuck

  2. A problem with one of the jobs crashing. You can try fixing that, but if you are not having success, at least try disabling each job until the generic process (and all the other jobs) can run. That might solve your utf issue

We are trying to get the scheduler running. We have the crontab configured, but the scheduled tasks that come by default in SuiteCRM never execute. They appear as active and are set with appropriate start dates, but they never run. We have SuiteCRM running inside a Docker container, which is on a Linux server, and cron is configured. We have made multiple attempts to get at least one workflow to execute via the scheduler, but we cannot figure out why it is not working. I will attach an image of the workflow scheduler so you can see how it is set up in SuiteCRM.

This is why I am unsure if initiating the execution of the “repair UTF encoding” will work since it says it uses the scheduler. I have my doubts because in the list of scheduled tasks, the file that it uses to execute the repair is not listed, and maybe it works in this case. We are not sure about that. That’s why I wanted to know if there is any other way because looking at the files in the Calls module, I can’t find a way to implement code that forces the view to use UTF-8 encoding.

Have you seen this guide I made?

No, I hadn’t seen that guide. I’ll review it now and consult you if anything comes up, because we can’t get it to work and we don’t know what might be wrong or if we missed some configuration.

The system is inside a Docker container, which is on a Linux server. We enabled crontab on the server, and we also added the crontab configuration in the docker-compose.yml file. I don’t know if this is the reason why the cron job is not working properly in our CRM.

All files have the user set to daemon and the group set to root. In the config.php file, the allowed user is set to daemon, and in the scheduler, the user to be used is listed as daemon. However, even with everything configured, the scheduled tasks do not execute.

Additionally, we tried running the “Repair UTF Encoding,” and it stayed in the “In Progress” state. Checking the “job_queue” table in the database, it shows that the task is in the work queue, waiting to be executed, but it never starts.

Scheduler suiteCRM:


config.php file:
image
data base - schedulerjob:

data base - job_queue:

Important part in that post:

To list the contents of a specific user’s crontab, use something like this command:

sudo crontab -l -u www-data

And to edit those contents, use the -e switch instead:

sudo crontab -e -u www-data

Some flavors of Linux (notably Ubuntu) have yet another crontab which is the system-wide crontab. This is edited by editing a file:

sudo nano /etc/crontab

Notice that the comments inside this crontab explain that it is the system-wide crontab. Here you can specifiy commands to be run as any user, so it has an extra column where you say which user the command runs under, for example:

          • www-data cd /var/www/html; php -f cron.php > /dev/null 2>&1

See that www-data in there? That would not be there in a specific user’s crontab. That username column is just for the system-wide crontab.

@rsp that’s a copy-paste from the post I linked above…