Exception handling in Subpanel was not defined

I have a problem similar to the one described in this question.

When trying to create a record through the create option of a subpanel. The record is created but the relationship is not created. In the logs I get this way grep -E "(ERROR|FATAL)" app/crm/suitecrm.log | tail the next message

Sun May 26 23:30:20 2024 [1228][6468507c-367f-601c-60e9-6055259c7428][FATAL] Exception handling in /var/www/html/app/crm/include/MVC/ Controller/SugarController.php:400
Sun May 26 23:30:20 2024 [1228][6468507c-367f-601c-60e9-6055259c7428][FATAL] Exception handling in Subpanel was not defined
Sun May 26 23:30:20 2024 [1228][6468507c-367f-601c-60e9-6055259c7428][FATAL] Exception in Controller: Subpanel was not defined
Sun May 26 23:30:20 2024 [1228][6468507c-367f-601c-60e9-6055259c7428][FATAL] backtrace:

As suggested in the question cited by trying Quick Repair and Rebuild and then Rebuild Relationships

The error disappears when trying again. But it takes a while for the message to come back.

The version is 7.11.3 and the relationship between the modules is many to many. This behavior happens in the production environment. In my local and in development it works as expected

Thanks in advance

What module and subpanel? Also, if its happening in Prod and not Dev, my first thought would be file permissions. The defs have to be written to file and if they don’t (or didnt’) get written properly in Prod whe you created the relationships, or the EXT doesn’t get written properly after and R&R is what my first thought would be. Check permissions and ownerships.

Are there any other differences between dev and prod? Ie: memory limit, PHP Version, etc.

Hello, Thank you very much for answering. This happens in a relationship between custom modules. I recently created a new module to which I have linked several modules in many-to-many relationships. I think it’s a permissions issue as you mention. It happens that I recently copied the source code from the production server, moved it to local and tried creating using the subpanel and it works as expected. The only thing I did beforehand was chown www-data to all the directories and files and chmod 775 the same

On the server when doing git status I get this message at the beginning

warning: could not open directory 'app/v2/suitecrm/custom/working/': Permission denied
warning: could not open directory 'app/v2/suitecrm/custom/history/': Permission denied

Also mention that when trying to do a pull in production I must do it with high privileges

I don’t want to change permissions on the server completely to the app, do you have any idea which directories should update their permissions so that the issue is corrected?

Thanks in advance

Please set the following permissions on your SuiteCRM instance:

sudo chmod -R 755 .

sudo chmod -R 775 cache custom modules themes data upload config_override.php

sudo chown -R www-data:www-data .

Just note www-data is just an example. in your root directory of suiteCRM do a ls -l and you’ll see who owns the files like user:user, it may be www-data or most likely something else. Replicate whatever is currently being used.

Hi @pstevens @mario.martinez

These commands are best because they prevent the files’ permissions / ownership from deteriorating and crashing Suite, because it sets 02750 permission on the directories…

sudo find . -type d -not -perm 02750 -exec chmod 02750 {} \;
sudo find . -type f -not -perm 0640 -exec chmod 0640 {} \;
sudo find . ! -user www-data -exec chown www-data:www-data {} \;
sudo chmod u=rwx,g=rx ./vendor/bin/*  # Suite 7
sudo chmod u=rwx,g=rx ./bin/console   # Suite 8

Replace www-data with the username Suite runs under.

1 Like

hey @chris001 does this work on version 7? I think he mentioned he was on version 7.

Thanks! Post updated.