Problems with building relationships

Hi everyone, I was creating relationships in custom modules and suite modules via Studio, at a certain point I can no longer access the “relations button” within the module.

I click but nothing appears, no errors (not even in suitecrm.log) and no window.

I initially checked for errors within “developer tools” within the browser and the message appeared:
error 500 internal server error.

I then enabled “display errors” and these messages appear:

Warning: require_once(custom/modules/AOS_Products_Quotes/Line_Items.php): Failed to open stream: No such file or directory in /home/suitecrm/include/SearchForm/SearchForm2.php on line 696

Fatal error: Uncaught Error: Failed opening required 'custom/modules/AOS_Products_Quotes/Line_Items.php' (include_path='/home/suitecrm:/home/suitecrm/include/..:.:/opt/alt/php81/usr/ share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/suitecrm/include/SearchForm/SearchForm2.php:696 Stack trace: #0 /home/suitecrm/include/SearchForm/SearchForm2.php(139): SearchForm->_build_field_defs() #1 /home/suitecrm/include/SubPanel/SubPanelDefinitions.php(193)

Can anyone tell me what happened? Thank you.

The Suitecrm version is
Version 7.14.2
Sugar Version 6.5.25 (Build 344)

I’ve had this happen many times. Reset your permissions and file ownerships. (assuming that file SearchFrom2.php actually exists.

what do you mean by reset permissions and file ownership? The folder containing searchform2 has 755 permissions, the file has 644, I changed it to 755, but nothing changes

I’m trying to set the permissions in every way, but there are no results, always the same message, how did you solve it?

Might be helpful.

sudo chmod -R 755 .

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

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

www-data may or may not be the correct owner, check  all you other files for reference.

All folders are set to 755 and files are set to 644.

I changed the permissions for the files contained in the searchform folder to 775.

Do I need to change all suite folders to 775? Also all files from 644 to 775?

suitecrm’s config.php file has this configuration:

'default_permissions' =>
   array (
     'dir_mode' => 493,
     'file_mode' => 420,
     'user' => '',
     'group' => '',

I tried replacing with:

'default_permissions' =>
   array (
     'dir_mode' => 493,
     'file_mode' => 420,
     'user' => 'www-data',
     'group' => 'www-data',

but it does not work.

I have turned display_errors on and off several times, but nothing new!

Which user is your web server using to run?

Does the file custom/modules/AOS_Products_Quotes/Line_Items.php exist?
If yes, what is its Owner? Group? Permissions?

One other thing you can try is all the rebuild JS stuff in repair and rebuild. Sometimes that helps (assuming its not a permissions issue if you re-set the permissions and ownerships as instructed).

After having worked on it a lot, having done all the repairs several times, the problem was the lack of the Line_Items.php file (after @chris001’s suggestion), strange, because it is a new installation, furthermore at the beginning I had no problems accessing the reports of the various modules and I had some created, so I don’t understand what happened at some point.
In any case, I solved it by adding the files:


I took them from version 7.12 and pasted them into version 7.14, I don’t know how correct it is, if between the two versions, these files are different, but right now it works.

1 Like

Upgrading from 7.13 to 7.14 and has PHP 8.2. I changed PHP version from 7.4 to 8.2 after upgrade completed. Now, I am doing QR&R. It is stuck at Rebuilding Relationships line.

Shall I QR&R all JS files too?

@rsp general troubleshooting for this kind of issue is:

  1. make sure file(s) exists
  2. make sure file permissions are correct
  3. try QR&R
  4. try JS rebuild stuff

That generally solves these kind of issues for me like 90% of the time.

Thank you, I will give it a try!