Pages

Wednesday, July 21, 2010

SugarCRM Unable to Open a Required File??

Does this error look familiar to you? 

Fatal error: SugarBean::require_once() [function.require]: Failed opening required '' (include_path='C:\xampp\xampp\htdocs\sugarce55\include/..;.;C:\xampp\xampp\php\pear\') in C:\xampp\xampp\htdocs\sugarce55\data\SugarBean.php on line 3367 

I ran into the above error a few days ago when accessing the ListView for Tasks. Seemed rather puzzling as it had worked without errors just 2 - 3 minutes prior to that. I should point out this occurred on my development system, so there weren't any other users logged into SugarCRM that could have in turn broken something. 

Anyway, I quickly realized that when it did work, the Tasks table was empty. Seemed like a strange error for it to be related to data, but that's where things were pointing.

As a test, I truncated the Tasks table and attempted to again access the ListView.  It worked.  Sure enough, it was a data problem.

After some additional investigation, I narrowed the problem down to the parent_type column within the Tasks table.  

Earlier I had been running some tests that imported data via SugarCRM's API.  The tests were inputting data into the Tasks table, but were not populating the parent_type column, thus, leaving it set to a null state.  

The ListView apparently does not like that.  By default it expects to have the value "Accounts" within that field.  While it is possible to leave it blank or null when creating the same type of record via the API, it is clearly not a good idea. 

File this one under "odd things that happen when you insert data via the API."  

No comments:

Post a Comment

Your comments, feedback and suggestions are welcome, but please refrain from using offensive language and/or berating others. Thank you in advance.