I moved my SuiteCRM install to a new server and I believe I have managed to screw something up in the process. I noticed that my Elasticsearch was posting old results in search, so I hit the CLI to test a manual index and got the error below. I can’t figure out what I broke:
[12:35] [server1.xxxx ~] # /var/www/html/suitecrm/vendor/bin/robo elastic:index 0
PHP Notice: Trying to get property 'app_strings.en_us' of non-object in /var/www/html/suitecrm/include/SugarCache/SugarCache.php on line 176
PHP Fatal error: Uncaught Error: Call to a member function set() on null in /var/www/html/suitecrm/include/SugarCache/SugarCache.php:187
Stack trace:
#0 /var/www/html/suitecrm/include/utils.php(1237): sugar_cache_put('app_strings.en_...', Array)
#1 /var/www/html/suitecrm/include/MVC/SugarApplication.php(351): return_application_language('en_us')
#2 /var/www/html/suitecrm/include/entryPoint.php(173): SugarApplication::preLoadLanguages()
#3 /var/www/html/suitecrm/lib/Robo/Traits/CliRunnerTrait.php(72): require_once('/var/www/html/s...')
#4 /var/www/html/suitecrm/lib/Robo/Plugin/Commands/ApiCommands.php(82): SuiteCRM\Robo\Plugin\Commands\ApiCommands->bootstrap()
#5 [internal function]: SuiteCRM\Robo\Plugin\Commands\ApiCommands->__construct()
#6 /var/www/html/suitecrm/vendor/league/container/src/Definition/ClassDefinition.php(47): ReflectionClass->newInstanceArgs(Array)
#7 /var/www/html/suitecrm/vendor/league/container/src/Container.php(290): League\Container\Definition\ClassDefinition->build()
#8 /var/www/html/suitecrm/vendor/le in /var/www/html/suitecrm/include/SugarCache/SugarCache.php on line 187
Did you change versions or anything during the move? Have you updated and ensured your elasticsearch service is still reachable from your new server etc?
I dont believe there were any version changes. If there was one by accident, it was minor - 7.11.12 to .13, but I think that occurred after the transition to the new box.
I do get a successful connection test to the elasticsearch docker in the Admin panel. Running 5.6.10…
To be honest, Im haven’t been able to figure out when it stopped working, so Im struggling to figure out how far back I need to roll back.
Further evidence I broke her. Tried to do a command line search - received a more interesting error:
PHP Fatal error: Uncaught Exception: SuiteCRM is not installed. Entry point needs an installed SuiteCRM, please install first. in /var/www/html/suitecrm/include/entryPoint.php:59
If you can please specify exactly what you’re doing so I can try the same here. I am an engineer, so by exactly I mean an unambiguous copy-paste of the directory where you are currently, and the full commands given
Tried instructing robo to task as well as index… Best I can tell, errors are the same:
PHP Warning: include(custom/metadata/sugarchimpactivity_MetaData.php): failed to open stream: No such file or directory in /var/www/html/suitecrm/custom/application/Ext/TableDictionary/tabledictionary.ext.php on line 6
PHP Warning: include(): Failed opening 'custom/metadata/sugarchimpactivity_MetaData.php' for inclusion (include_path='/var/www/html/suitecrm/include/..:.:/usr/share/pear:/usr/share/php') in /var/www/html/suitecrm/custom/application/Ext/TableDictionary/tabledictionary.ext.php on line 6
PHP Fatal error: Uncaught Error: Undefined class constant 'Api\Core\Config\ApiConfig::OAUTH2_ENCRYPTION_KEY' in /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php:704
Stack trace:
#0 /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php(704): ReflectionParameter->getDefaultValue()
#1 /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php(147): Consolidation\AnnotatedCommand\Parser\CommandInfo->determineOptionsFromParameters()
#2 /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php(120): Consolidation\AnnotatedCommand\Parser\CommandInfo->constructFromClassAndMethod(Object(SuiteCRM\Robo\Plugin\Commands\ApiCommands), 'apiUpdateEncryp...')
#3 /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php(126): Consolidation\AnnotatedCommand\Parser\CommandInfo->__construct(Object(SuiteCRM\Robo\Plugin\Commands\ApiCommands), 'apiUpdateEncryp...')
#4 /var/www/html/sui in /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php on line 704
ERROR: Uncaught Error: Undefined class constant 'Api\Core\Config\ApiConfig::OAUTH2_ENCRYPTION_KEY' in /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php:704
Stack trace:
#0 /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php(704): ReflectionParameter->getDefaultValue()
#1 /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php(147): Consolidation\AnnotatedCommand\Parser\CommandInfo->determineOptionsFromParameters()
#2 /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php(120): Consolidation\AnnotatedCommand\Parser\CommandInfo->constructFromClassAndMethod(Object(SuiteCRM\Robo\Plugin\Commands\ApiCommands), 'apiUpdateEncryp...')
#3 /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php(126): Consolidation\AnnotatedCommand\Parser\CommandInfo->__construct(Object(SuiteCRM\Robo\Plugin\Commands\ApiCommands), 'apiUpdateEncryp...')
#4 /var/www/html/sui
in /var/www/html/suitecrm/vendor/consolidation/annotated-command/src/Parser/CommandInfo.php:704
I’ve suspected there’s “gunk” in there… If I didn’t know any better, that’s coming off a Mailchimp addon that has been uninstalled and (should have been) removed.
I guess the really good question is how do I go about finding and cleaning the gunk out?
it might fix your problem. Or it might be causing your problem. It’s very likely that the Robo task is used so rarely that it isn’t really tested properly…