Events suddenly throwing an error...

I’ve been doing some work in SuiteCRM (7.2.3) and suddenly my Events entity is returning an error in some situations…

  • If I select “Events” from the menus it shows “There was an error processing your request, please try again at a later time.”.
  • I had a few existing Events related to a module (1toM with Events as the Primary). If I select the Events field in the related module, the existing Events are available to select in that field.
  • If I click on the Event name from the related field, the Event record displays properly.

How can I diagnose and (most importantly) fix this issue?

Thanks!

Help? Suggestions? Thanks!

Hi vogelap,

it looks like this might solve your problem:

https://suitecrm.com/forum/suitecrm-7-0-discussion/4856-unknown-error

Could you add a screenshot of your error message?

1 Like

Hi Jan. Thank you for your reply.

I confirmed that display_errors was set to “Off” (it already was set to “Off”)…

I am afraid the error message I see is not very useful…

Hi vogelap,

Could you also check the following PHP.ini setting ?


error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

It’s probably a PHP warning that is thrown out. PHP Warnings in AJAX responses cannot be interpreted by SuiteCRM, which causes SuiteCRM to throw this error.

In case the error persists, we have to get technical and I suggest you to

  • install FireFox
  • install the plugin Firebug
    https://addons.mozilla.org/de/firefox/addon/firebug/
  • Open Firefox, then open the extension Firebug clicking on the bug symbol top right
  • Click on “Console”
  • Perform the action causing the error
  • Go into the firefox panel and open the first “GET” call
  • Look into the response to see if you see some kind of error or warning message

The response should follow the so called JSON format. In case it doesn’t, SuiteCRM can’t process it and throws this error.

1 Like

I confirmed that my error_reporting value is exactly what you indicated (it is).

I did the Firebug suggestion, and attached is a screenshot with the Firebug output. I am not sure how to interpret that or fix it!

Hi,

Firebug shows that your server threw a 500 internal server error. To get the details of the error you can

  • edit your php.ini file, make sure that:
log_errors = On
  • restart your apache/nginx server
  • provoke the error
  • look into your server log, on linux/bsd systems in either of these paths:

/var/log/httpd-error.log
/var/log/apache2/error.log

Thanks again for your reply. I’ve done what you suggested, and received the following in the error log… I checked for some of the files mentioned below – tabledictionary.ext.php exists as does several of the files mentioned inside of it (like accounts_cfwc_cfwc_event_participation_1MetaData.php). Does this shed any light on things?

[Mon Aug 10 15:23:55.206210 2015] [ssl:warn] [pid 916:tid 768] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 10 15:23:55.506423 2015] [ssl:warn] [pid 916:tid 768] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 10 15:23:56.461911 2015] [mpm_winnt:notice] [pid 916:tid 768] AH00455: Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.4.0 configured – resuming normal operations
[Mon Aug 10 15:23:56.461911 2015] [mpm_winnt:notice] [pid 916:tid 768] AH00456: Apache Lounge VC9 Server built: Jan 30 2015 11:29:54
[Mon Aug 10 15:23:56.461911 2015] [core:notice] [pid 916:tid 768] AH00094: Command line: ‘C:\Bitnami\WAMPST~1.39-\apache2\bin\httpd.exe -d C:/Bitnami/wampstack-5.4.39-0/apache2 -f C:\Bitnami\WAMPST~1.39-\apache2\conf\httpd.conf’
[Mon Aug 10 15:23:56.472918 2015] [mpm_winnt:notice] [pid 916:tid 768] AH00418: Parent: Created child process 2008
[Mon Aug 10 15:23:57.063831 2015] [ssl:warn] [pid 2008:tid 684] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 10 15:23:57.394063 2015] [ssl:warn] [pid 2008:tid 684] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 10 15:23:57.432091 2015] [mpm_winnt:notice] [pid 2008:tid 684] AH00354: Child: Starting 64 worker threads.
[Mon Aug 10 15:24:04.960881 2015] [:error] [pid 2008:tid 1428] [client fe80::7921:d521:5eda:7f83:7399] PHP Warning: include(custom/metadata/cfwc_cfwc_event_participation_cfwc_cfwc_requirementsMetaData.php): failed to open stream: No such file or directory in C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\custom\application\Ext\TableDictionary\tabledictionary.ext.php on line 61, referer: http://drewlaptop-m3/suitecrm/index.php?module=ModuleBuilder&action=index&type=studio
[Mon Aug 10 15:24:04.960881 2015] [:error] [pid 2008:tid 1428] [client fe80::7921:d521:5eda:7f83:7399] PHP Warning: include(): Failed opening ‘custom/metadata/cfwc_cfwc_event_participation_cfwc_cfwc_requirementsMetaData.php’ for inclusion (include_path=‘C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\include\HTMLPurifier/standalone;C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\include/…;.;C:/Bitnami/wampstack-5.4.39-0/php/PEAR;C:/Bitnami/wampstack-5.4.39-0/frameworks/smarty/libs’) in C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\custom\application\Ext\TableDictionary\tabledictionary.ext.php on line 61, referer: http://drewlaptop-m3/suitecrm/index.php?module=ModuleBuilder&action=index&type=studio
[Mon Aug 10 15:24:06.413192 2015] [:error] [pid 2008:tid 1424] [client fe80::7921:d521:5eda:7f83:7402] PHP Warning: include(custom/metadata/cfwc_cfwc_event_participation_cfwc_cfwc_requirementsMetaData.php): failed to open stream: No such file or directory in C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\custom\application\Ext\TableDictionary\tabledictionary.ext.php on line 61, referer: http://drewlaptop-m3/suitecrm/index.php?action=ajaxui
[Mon Aug 10 15:24:06.413192 2015] [:error] [pid 2008:tid 1424] [client fe80::7921:d521:5eda:7f83:7402] PHP Warning: include(): Failed opening ‘custom/metadata/cfwc_cfwc_event_participation_cfwc_cfwc_requirementsMetaData.php’ for inclusion (include_path=‘C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\include\HTMLPurifier/standalone;C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\include/…;.;C:/Bitnami/wampstack-5.4.39-0/php/PEAR;C:/Bitnami/wampstack-5.4.39-0/frameworks/smarty/libs’) in C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\custom\application\Ext\TableDictionary\tabledictionary.ext.php on line 61, referer: http://drewlaptop-m3/suitecrm/index.php?action=ajaxui
[Mon Aug 10 15:24:06.735424 2015] [:error] [pid 2008:tid 1428] [client fe80::7921:d521:5eda:7f83:7401] PHP Warning: include(custom/metadata/cfwc_cfwc_event_participation_cfwc_cfwc_requirementsMetaData.php): failed to open stream: No such file or directory in C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\custom\application\Ext\TableDictionary\tabledictionary.ext.php on line 61, referer: http://drewlaptop-m3/suitecrm/index.php?action=ajaxui
[Mon Aug 10 15:24:06.735424 2015] [:error] [pid 2008:tid 1428] [client fe80::7921:d521:5eda:7f83:7401] PHP Warning: include(): Failed opening ‘custom/metadata/cfwc_cfwc_event_participation_cfwc_cfwc_requirementsMetaData.php’ for inclusion (include_path=‘C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\include\HTMLPurifier/standalone;C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\include/…;.;C:/Bitnami/wampstack-5.4.39-0/php/PEAR;C:/Bitnami/wampstack-5.4.39-0/frameworks/smarty/libs’) in C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\custom\application\Ext\TableDictionary\tabledictionary.ext.php on line 61, referer: http://drewlaptop-m3/suitecrm/index.php?action=ajaxui
[Mon Aug 10 15:24:07.571091 2015] [:error] [pid 2008:tid 1428] [client fe80::7921:d521:5eda:7f83:7401] PHP Fatal error: Smarty error: [in cache/modules/FP_events/SearchForm_basic.tpl line 51]: syntax error: unrecognized tag: $fields…name (Smarty_Compiler.class.php, line 434) in C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\include\Smarty\Smarty.class.php on line 1095, referer: http://drewlaptop-m3/suitecrm/index.php?action=ajaxui

Hi,

it seems like you created a relationship and then removed it, but SuiteCRM did not clean up the relationship properly.

  • Look into the following directory:

custom/Extension/application/Ext/TableDictionary

There should be a file with the name


accounts_cfwc_cfwc_event_participation_1.php
  • Check its contents and see if it contains an inclusion for the missing file.

  • If this is the case, then delete the file

  • do a Admin / Repair / “Quick Repair and Rebuild” ( this will regenerate custom/application/Ext/TableDictionary/tabledictionary.ext.php )

  • check if the error is gone when you retry and if the system works properly

Hi Jan. Thanks again. I think we’re close to solving this.

The file accounts_cfwc_cfwc_event_participation_1.php exists in custom/Extension/application/Ext/TableDictionary directory. The file accounts_cfwc_cfwc_event_participation_1.php contains the following:

<?php //WARNING: The contents of this file are auto-generated include('custom/metadata/accounts_cfwc_cfwc_event_participation_1MetaData.php'); ?>

The file it refers to, accounts_cfwc_cfwc_event_participation_1MetaData.php, exists in the custom/metadata directory.

How do you want me to proceed? Do you want me to delete BOTH “accounts_cfwc_cfwc_event_participation_1.php” and “accounts_cfwc_cfwc_event_participation_1MetaData.php”? I will wait to hear back from you before I touch anything.

Thanks again.

Hi,

sorry, my bad, I made an error copying and pasting. Please see if you find the file


custom/Extension/application/Ext/TableDictionary/cfwc_cfwc_event_participation_cfwc_cfwc_requirements.php

This file should have an include to a file that doesn’t exist. So in this case, delete this file.

I found the file you mentioned above, and deleted it. I then ran Quick Repair.

The problem persists… When I try to access my Event entity, I receive the following in the log file:
[Mon Aug 10 16:41:08.661654 2015] [ssl:warn] [pid 7856:tid 780] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 10 16:41:08.956931 2015] [ssl:warn] [pid 7856:tid 780] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 10 16:41:08.992956 2015] [mpm_winnt:notice] [pid 7856:tid 780] AH00455: Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.4.0 configured – resuming normal operations
[Mon Aug 10 16:41:08.992956 2015] [mpm_winnt:notice] [pid 7856:tid 780] AH00456: Apache Lounge VC9 Server built: Jan 30 2015 11:29:54
[Mon Aug 10 16:41:08.992956 2015] [core:notice] [pid 7856:tid 780] AH00094: Command line: ‘C:\Bitnami\WAMPST~1.39-\apache2\bin\httpd.exe -d C:/Bitnami/wampstack-5.4.39-0/apache2 -f C:\Bitnami\WAMPST~1.39-\apache2\conf\httpd.conf’
[Mon Aug 10 16:41:08.996960 2015] [mpm_winnt:notice] [pid 7856:tid 780] AH00418: Parent: Created child process 14932
[Mon Aug 10 16:41:09.587561 2015] [ssl:warn] [pid 14932:tid 664] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 10 16:41:09.854516 2015] [ssl:warn] [pid 14932:tid 664] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Aug 10 16:41:09.892544 2015] [mpm_winnt:notice] [pid 14932:tid 664] AH00354: Child: Starting 64 worker threads.
[Mon Aug 10 16:41:16.331136 2015] [:error] [pid 14932:tid 1428] [client fe80::7921:d521:5eda:7f83:11257] PHP Notice: Array to string conversion in C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\include\formbase.php on line 209, referer: http://drewlaptop-m3/suitecrm/index.php?action=ajaxui
[Mon Aug 10 16:41:43.276853 2015] [:error] [pid 14932:tid 1424] [client fe80::7921:d521:5eda:7f83:11285] PHP Fatal error: Smarty error: [in cache/modules/FP_events/SearchForm_basic.tpl line 51]: syntax error: unrecognized tag: $fields…name (Smarty_Compiler.class.php, line 434) in C:\Bitnami\wampstack-5.4.39-0\apps\suitecrm\htdocs\include\Smarty\Smarty.class.php on line 1095, referer: http://drewlaptop-m3/suitecrm/index.php?action=ajaxui

Hi,

please check in studio, module Events, check if there is any rogue field that has to do with the deleted requirements module, or a nameless field in:

  • basic search
  • list view
  • advanced search

remove the field, save the layout and retry.
In case you removed the field but the error persists, then delete

cache/modules/FP_events/SearchForm_basic.tpl

The file will automatically be rebuilt.

1 Like

Thank you Jan! I appreciate your diligence and your replies! Thanks and credit to you, the problem is solved… There seem to have been some rogue fields in the List Views. I deleted them, did Quick Repair, and it’s working now as expected! What a relief! I am very grateful for your help, and would not have been able to solve this without you.

I don’t know how or why those rouge fields happened, but I appreciate your aid. I didn’t even have to delete

cache/modules/FP_events/SearchForm_basic.tpl

.

Thank you again.

Hi Drew,

glad to hear that you resolved it! My advice concerning customisation and module building

  • always set up a test system and experiment here
  • never deploy directly from module builder, instead publish your module, you’ll then have a zip file that you install using the Module Loader
  • when creating your relationships between existing modules and custom modules, do it in Module Builder, not in Studio.
  • In case you want to add a relationship to an already installed module, uninstall the module making sure to check Keep Tables, then install the modified version (again with Module Loader).
  • Preferably do any modification in layouts of custom modules in Module Builder so you maintain a clean installable version. When you’ve nevertheless made modifications in Studio, then you would have to export them for this module before uninstalling this module and then import them after installing the modified version.

Thank you for your advice, Jan.

I am working to get a test system deployed.

The tip about not Deploying from Module Builder (instead, publishing it and using Module Loader) is awesome. I will put that into practice at once.

Regarding your third point, about creating relationships… I have a couple questions…

  • If I create the relationship between existing and custom modules in Module Builder, are those relationships retained when I re-depoy via Module Loader?
  • If I need to create relationships between an existing module and a custom module where the custom module is NOT the Primary, how do I do that? In Studio?

I believe I understand your forth point as well… I should uninstall Custom Modules (and Keep Tables) and then install the modified version via Module Loader. Is that correct?

You’ve been AWESOMELY helpful.

I am undertaking a large project and trying to mirror it in SuiteCRM so I learn. It’s going well, though I have some questions about best-practice in my specific situation…

Hi Drew,

Yes, they are retained, as long as you check Keep Tables.

[quote] * If I need to create relationships between an existing module and a custom module where the custom module is NOT the Primary, how do I do that? In Studio?
[/quote]
You can create One-to-Many as well as Many-to-One relationships in Module Builder

Yes

Good luck with your project!

One final question… I created all the relationships in Studio (not Module Builder). Should I delete them (keep Tables) from Studio and re-create them in Module Builder? Would that be best-practice?

Hi Drew,

there is no Keep Tables option for deleting relationships.

The relationship tables will probably be different in name as well as in column names.

If you want to pull them to ModuleBuilder, I would

  • mysqldump the table (the name should be equal to the relationship name) (you don’t need to dump your entire DB)
  • delete the relationship in Studio (I’m not sure if this deletes the relationship table, if not, then it would be wise to delete it manually to avoid conflicts when installing the module with the new relationship)
  • create the relationship in ModuleBuilder
  • uninstall, reinstall your module
  • check if the relationship table has a different name as the one before, if not, then edit your dump file to change it (both in creation statement as well as in insert into statement)
  • insert your modified dump into mysql
  • to migrate the relationship data to the new table do an SQL Query like:
insert into ... select from ...
  • remove the old table

I am experiencing a new issue after Jan helped me repair the issue above (thanks Jan!).

My reports don’t seem to be working for my custom module (other Reports seem to work fine)… When I go into the Report Builder to build a report for my custom module, the left side looks all strange (see attached). I suspect it’s got something to do with rouge relationship kruft hanging around, but I don’t know how to go about cleaning/fixing…

Can anyone help?