Events suddenly throwing an error...

Hi Drew,

I would look here if there are any files belonging to deleted relationships:


custom/Extension/modules/CFWC_CFWC_Event_Participation/Ext/Vardefs

You can also do a search for files with this label that is showing, like:


cd <SuiteCRMbasedir>

find . -type f -name "*.php" -print0 | xargs -0 grep "LBL_ACCOUNTS_CFWC_CFWC_EVENT_PARTICIPATION_1_FROM_CFWC_CFWC_EVENT_PARTICIPATION_TITLE"

You can ignore results from your cache directory.

Thank you for your reply. I appreciate your time and expertise!

I found one file in the directory containaing the phrase above. The file is called ā€œaccounts_cfwc_cfwc_event_participation_1_CFWC_CFWC_Event_Participation.phpā€.

I want to make sure I’m doing the right thing… Once you tell me it’s the correct path, I will:

  • Delete the accounts_cfwc_cfwc_event_participation_1_CFWC_CFWC_Event_Participation.php file from custom\Extension\modules\CFWC_CFWC_Event_Participation\Ext\Vardefs.
  • Do a Quick Repair & Rebuild.

That should do it, right? (As I am not sure and I don’t want to mess things up further, I will wait to hear from you before I proceed.)

Thanks again.

Hi Drew,

I don’t know exactly the architecture and the history of your modules design and so I can’t say much about the validity of the vardef files.

You can rename the found file from ā€œā€¦phpā€ to ā€œā€¦php.disabledā€ (changing the extension) and then run a Repair and Rebuild.

If it doesn’t solve the issue or if something is lost, you can rename it back, and do another Repair and Rebuild.

I don’t expect that you’ll loose data over this, but please always backup your DB and Suite file base before experimenting.

Hi Jan. Thanks for your reply.

I renamed the file, ran Quick Repair and the problem persisted. I named the file back to the original name and ran Quick Repair and all was back to ā€œnormalā€ (still broken).

I am thinking that there is some garbage floating around in my CRM, and I would like to clean it up. Especially because my Reports against my custom module are not working at all.

Is there a way to ā€œresetā€ everything, carefully rebuilding the relationships to remove any garbage without losing data?

I am very comfortable in the SuiteCRM interface and slightly knowledgeable about phpMyAdmin, etc. I’ll keep loads of backups!

Anyone? Help? Thanks in advance!

I found this advice on SugarCRM Best Practices (Sugar 6.5 - Sugar Support):
Create Relationships in Studio After the Module Is Deployed
This part is critical for success as relationships created in Module Builder cannot be removed after the module is deployed unless the package is updated and redeployed from Module Builder. Redeploying from Module Builder is what we are trying to avoid as mentioned above. If you deploy the module and then create the relationships in Studio, you can update or remove the relationships via Studio at any future point in time.

Any ideas or thoughts? Thanks!

Hi,

that’s an interesting view.

At least the tutorial and my story agree on one thing: redeployment from module builder is a bad idea.

Concerning the ease of deleting relationships in studio: in my opinion the creation of relationships is a fundamental part of CRM-Design and not something you do just on the fly.

For CRM-Design we have the module builder, for subtle changes to layouts and additional fields, we have studio.
This is also reflected by the export of customizations in Studio: you get your custom fields, custom layouts etc., but you can’t export your custom Relationships from Studio.

An important objective of any CRM implementation should be to maintain ā€œownershipā€ over your customizations for the sake of system replication (if things get broken, like in your case).

An installation-set would consist of:

  • a database
  • the suitecrm package
  • installable modules from ModuleBuilder (publish) and studio customizations (export)

The problem with relationships in studio is, that you can’t replicate this on another system by simply installing your modules and installing your exported customizations: you must also recreate your relationships you made in Studio by hand.

In case you need to change your relationship created in module builder afterwards, you always have the option to uninstall your module, checking ā€œKeep Tablesā€ and installing a version with modifications in the relationship model (always by publishing it in module builder, and then installing it with Module Loader).

Concerning the problem with reports: I would

  • rebuild your modules in modulebuilder on a test system, so you can publish them into installable modules
  • then try it out on a clean test system, test if your reports work
  • make a copy your live system, integrate your new module into the live system, by first uninstalling the old one(s)
  • See if the error still occurs, if yes, then compare your custom directory of both your original test system and the copy of your live system to see if you can find any leftovers, like

diff -ur /var/www/html/suitetest/custom /var/www/html/suitelivecopy/custom