QR&R/Deployment is deleting my custom code

Hey, I’m pretty new to suitecrm (ive been coding on it for work since June) and have come across this weird issue that’s happening inside my custom/modules folder and it’s sub-directories.

It just started popping up within the last week but whenever I do a quick repair and rebuild after editing something on my layout (through studio/module builder), the custom files inside of module’s folder get deleted. I’ve been working around it over the weekend by just copying all my custom code files into a folder and copying them over if they get deleted. This might work short-term but I need to find a fix for this because I don’t want to accidentally create a restore point that doesn’t work as it should.

I’m going to try QR&R without editing the layout in studio and see what happens with the code files, and edit this if there is anything different that happens

I have figured out my own issue, the reason the custom code files were being deleted wasn’t because of QR&R. When I redeployed the module it overwrites the custom code files.

Make sure you’re editing the correct files. There are several processes in the deployment and QR&R where SuiteCRM gathers several input files and produces an aggregated output file.

A typical error for beginners is that they’re editing the output files when they should be editing the input files.

The way I memorize this is:

  • everything under directories called .../Ext/... is output, I shouldn’t mess with those directly
  • except if it’s a directory under custom/Extension/.../Ext/...

Yep I learned that one the hard way, suitecrm has been a steep learning curve for me coming from a background of almost entirely micro-controller and desktop app programming (7 years, no web app experience). Some things that are hard in that type of programming is made simpler with suitecrm, but there’s also some straight forward things I find difficult. But usually that’s just the way things happen with web apps

1 Like