I am installing a third party module from Module loader and after it is done, Studio stops working. Every module I click on studio, shows the popup of An error has occurred.
I traced the error and its coming from ModuleBuilder.js and throwing the exception. I am attaching the screen shot of error screen.
Also, If I uninstall the that module, Studio starts working fine.
what is done wrong here? Any help would be super helpful.
I already included the link right there in my post
Try removing the add-on and see if it changes things. A missing delimiter in one file is enough to cause what you’re seeing.
Anyway, start with a Quick Repair and Rebuild, and some JS rebuilds, that might be enough to fix things if it’s a transient issue like cache file corruption.
I don’t know what to make of that. It looks strange and I’ve never seen anything like it.
This can be hard to trace because you’re are feeding some files (like vardefs, etc) into other PHP files. The latter breaks with an error, but the real cause if probably earlier, in the module files…
Hi @faizan
you’re getting input from @pgr , who is well known on this forum as a very knowledgeable helper. My knowledge is only basic in comparison.
It may be helpful to getting good advice here - if you could let us know:
a) what level / length of time, of xperience you have of PHP; and of SuiteCRM’s PHP especially.
b) also, the same questions for your colleagues at work who passed you the module
And lastly - how confident are you they have passed to you a working module? Eg Have you seen it working in practise? Maybe on a different SuiteCRM instance? If so -what version of SuiteCRM/PHP.
a) with PHP, its 2+ years now, and with Suite CRM, now it is almost 2 months.
b) They have been working on SuiteCRM and PHP for 12+ years.
I was working on a working module, as it was working on every page except with the studio page,
Reason for interrupting the flow is still unknown, I just concluded that in studio, it first loads some icons, But this custom module was loading some icons of itself in Navbar, so maybe they collide?
I solved it by not running the UI_Footer logic hook when the module name is ModuleBuilder AND type is Studio.
This is a very specific case. First we don’t know what their custom code is doing in order to trigger the issue… Second, based on the information provided the issue only occurs when your module is enabled, which means issues is not in SuiteCRM (at least on principle).
It will be good if you share the solution with the community and help others that might experience the same issue in the future.
Hey all,
I am dealing with this exact issue except nothing is logging to my logs, and the error is seemingly entirely random.
If I find a solution based on faizan’s solution, I will post it here.
This error displays when we add/call our custom script in the LogicHook file.
For fixing this error we need to add the Module Builder condition in the LogicHook.php file.
If you’ve any LogicHook file in /include then add Module Builder Condition as shown in the below screenshot.