👋🏾 Looking to join our SuiteCRM Community Working Group? 💌 Open invitation throughout January. Check out all the details here 👈

Custom/working folder

Can someone tell me what the custom/working folder is for?
I see it in the manifest.php file and thought at first I created the folder as a temporary recovery folder while testing. However, I see it is referenced in several PHP files (SearchForm.php, ModuleInstaller.php, MBPackage.php and more).

Tony

I’d never heard of it, but from the looks of the code it seems to be a temporary working folder.

Is it causing any problems?

@pgr I don’t know that it is at this time. Here is just one of several arrays from my Accounts module Exported manifest.php file.

1 => 
    array (
      'from' => '<basepath>/SugarModules/modules/Accounts/metadata/SearchFields.php',
      'to' => 'custom/working/modules/Accounts/metadata/SearchFields.php',
    ),

I am working on a script that merges my custom changes into the manifest.php file and noticed these while I was double checking code and files. I can see myself making a temp folder before making some changes on my dev box and then forgetting to remove it. It could be something I did not realizing the code uses this same folder. I might try to rename the folder and re-run the export and see if the working folder shows up in the manifest.php file and whether or not it affects my system.

Tony

Well renaming the working folder and running Quick Repair and Rebuild then exporting the customization’s does not change the manifest file.

In addition I found these files in a backup clear back last Jun 2021. So the files have been there for a while.
Looking further into the code it looks like an upgrade process is what might have caused the working folder to be created.

At this point I am going to leave this as it is unless someone can explain this in more detail and why it is needed. Also if this folder is not needed can it just be removed? I see it is removed in the clearWorkingDirectory() function in the StudioParser.php file.

Tony

It’s a temporary folder, I am pretty sure it can be removed (create a backup copy, just in case).

I just checked a system that is running SuiteCRM for years, and has gone through multiple Studio operations and upgrades, and it has that directory with nothing but empty subdirectories inside it, and an old (2016) custom/working/modules/Contacts/relationships.php. My guess is that these are left-overs from Studio operations that ran into errors and did not complete.

If you change a view in Studio and choose Save and Deploy, the view is saved in the custom/modules/XXX/metadata
But f you choose Save (without deploy) it is saved in the working folder so that you can continue edition later.

1 Like

That is good to know. So if I understand right, When modifying the manifest.php file when creating an export file to put on my production environment I should be able to remove any array elements that are copying from the custom/working folder since I am doing all of those changes on my dev box and not the production box, Yes/No?

Sure you don’t need that in your manifest.