Cannot declare class SugarFieldAssigned_user_name

Hi

I’m getting a PHP fatal error in my suitecrm instance periodically, which makes my subpanel goes away for a certain point of time. After restarting the web server it works(showing subpanels).
I saw the below php fatal error ,
PHP Fatal error: Cannot declare class SugarFieldAssigned_user_name, because the name is already in use in include\SugarFields\Fields\Assigned_user_name\SugarFieldAssigned_user_name.php on line 58

when I look at the code for the redeclared class, it mentions the end of the file.
Any idea why I’m facing this weird issue?

> require_once('include/SugarFields/Fields/Base/SugarFieldBase.php');
> 
> class SugarFieldAssigned_user_name extends SugarFieldBase 
> {
>     function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) 
>       {
>              $vardef['options'] = get_user_array(false);
>              if (!empty($vardef['function']['returns']) && $vardef['function']['returns'] == 'html') 
>               {
>                  $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex);
>                  return $this->fetch($this->findTemplate('EditViewFunction'));
>              } else 
>              {
>                  $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex);
>                  return $this->fetch($this->findTemplate('SearchView'));
>              }
>     }
> }

Hey

Are you still having issues with this?

I haven’t ever encountered this myself, but I had a few questions:

  • Have the Subpanels, (or the module that the subpanel points to), had any custom code applied to it?
  • Which module are you seeing this on?
  • Which version of Suite is this on?
  • Which PHP version are you using? It may be worth comparing against the Compatibility Matrix

Hi John,

Actual reason for this error is due to Wincache’s filesystem cache enabled. Once I have disabled the wincache.fcenabled = 0, the issue is resovled.

Thanks

Ah great, glad you got it resolved!

Thanks for letting us know!