Jump to content
X2Community Forums

Issue after updating to 7.1


Recommended Posts

Here is the error I get on every page every module other than the admin page:

 

xwRY1Sl.jpg

 

Stack trace:

PHP warning in /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/util/EncryptUtil.php(168)
#0 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/util/EncryptUtil.php(168): openssl_decrypt()
#1 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/behaviors/JSONEmbeddedModelFieldsBehavior.php(258): EncryptUtil->decrypt()
#2 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/behaviors/TransformedFieldStorageBehavior.php(106): JSONEmbeddedModelFieldsBehavior->unpackAttribute()
#3 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/behaviors/TransformedFieldStorageBehavior.php(119): JSONEmbeddedModelFieldsBehavior->unpackAll()
#4 /home/altitude/www/crm/X2CRM-master/x2engine/framework/base/CComponent.php(561): JSONEmbeddedModelFieldsBehavior->afterFind()
#5 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(902): Credentials->raiseEvent()
#6 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(1040): Credentials->onAfterFind()
#7 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(1874): Credentials->afterFind()
#8 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(1359): Credentials->populateRecord()
#9 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(1494): Credentials->query()
#10 /home/altitude/www/crm/X2CRM-master/x2engine/protected/models/Admin.php(87): Credentials->findByPk()
#11 /home/altitude/www/crm/X2CRM-master/x2engine/protected/models/Admin.php(129): Admin->getGoogleIntegrationCredentials()
#12 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/X2ClientScript.php(957): Admin->getGoogleApiKey()
#13 /home/altitude/www/crm/X2CRM-master/x2engine/protected/views/profile/_activityFeed.php(278): X2ClientScript->registerGeolocationScript()
#14 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CBaseController.php(126): require()
#15 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CBaseController.php(95): ProfileController->renderInternal()
#16 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(872): ProfileController->renderFile()
#17 /home/altitude/www/crm/X2CRM-master/x2engine/protected/views/profile/activity.php(65): ProfileController->renderPartial()
#18 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CBaseController.php(126): require()
#19 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CBaseController.php(95): ProfileController->renderInternal()
#20 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(872): ProfileController->renderFile()
#21 /home/altitude/www/crm/X2CRM-master/x2engine/protected/controllers/x2base.php(730): ProfileController->renderPartial()
#22 /home/altitude/www/crm/X2CRM-master/x2engine/protected/controllers/ProfileController.php(1624): ProfileController->render()
#23 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/actions/CInlineAction.php(49): ProfileController->actionActivity()
#24 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(308): CInlineAction->runWithParams()
#25 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(134): ProfileController->runAction()
#26 /home/altitude/www/crm/X2CRM-master/x2engine/protected/controllers/x2base.php(580): CFilterChain->run()
#27 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets()
#28 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#29 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run()
#30 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(1148): CAccessControlFilter->filter()
#31 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): ProfileController->filterAccessControl()
#32 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#33 /home/altitude/www/crm/X2CRM-master/x2engine/protected/controllers/x2base.php(580): CFilterChain->run()
#34 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets()
#35 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#36 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run()
#37 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): FileUploadsFilter->filter()
#38 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run()
#39 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): X2AjaxHandlerFilter->filter()
#40 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(291): CFilterChain->run()
#41 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(265): ProfileController->runActionWithFilters()
#42 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CWebApplication.php(282): ProfileController->run()
#43 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/X2WebApplication.php(64): X2WebApplication->runController()
#44 /home/altitude/www/crm/X2CRM-master/x2engine/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#45 /home/altitude/www/crm/X2CRM-master/x2engine/index.php(66): X2WebApplication->run()

I already tried updating to PHP7.1 and 7.2 and no luck still.

Link to post
Share on other sites

Hello JacobD,

 

You may need to re-generate your encryption.iv and encryption.key files in protected/config. You can do this by deleting these files (the app should then re-create them or you can manually create them by running protected/yiic cryptsetup).

  • Like 2
Link to post
Share on other sites

Hello JacobD,

 

You may need to re-generate your encryption.iv and encryption.key files in protected/config. You can do this by deleting these files (the app should then re-create them or you can manually create them by running protected/yiic cryptsetup).

 

This worked. Thank you!

  • Like 1
Link to post
Share on other sites

PDO is a PHP extension - sure, that this is installed and usable? Tried a server restart (I´d to do this, for example).

 

May your DB-port is a non-standard-port? You´re able to configure your connection settings around line 217 in "protected/config/main.php ".

Also you may want to check your "php.ini" for the path to the PDO/PHP extentions (they might be changed to a PHP upgrade).

 

Regards!

  • Like 1
Link to post
Share on other sites

thanks Michael 

 

It's a very standard install standard ports etc .. I have read that this could occur if one has multiple Php version installed I will scratch some more  

 

Any other pearls of wisdom are welcome

 

Best 

Link to post
Share on other sites

Hello All, New to x2crm, its been a long road getting my web server configured but I managed to get it running on V6.6 - update to V7.1 now getting same error but the above mentioned has not worked.

 

Tried to manual execute mydomain.com.au/public_html/x2crm/protected/yiic.php

 

This returned an error, any help on this one?

 

Error 404
Unable to resolve the request "public_html/x2crm/protected/yiic.php". 

You have made an invalid request, please do not repeat this.

Error 500

It looks like the application ran into an unexpected error. 

We apologize for the inconvenience and would like to do our best to fix this issue. If you would like to make a post on our forums we can actively interact with you in getting this resolved. If not, simply sending the error report helps us immensely and will only improve the quality of the software. Thanks!
Send Error Report
Here's a quick list of what will be included in the report:

Error Code: 500
Error Message: count(): Parameter must be an array or an object that implements Countable
Stack Trace: [click to toggle display]
PHP warning in /home/aspirete/public_html/x2crm/protected/components/TagCloud.php(55)
#0 /home/aspirete/public_html/x2crm/framework/web/CBaseController.php(170): TagCloud->run()
#1 /home/aspirete/public_html/x2crm/protected/components/SortableWidgets.php(163): SortableWidgets->widget()
#2 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(833): SortableWidgets->run()
#3 /home/aspirete/public_html/x2crm/protected/views/layouts/column3.php(104): ProfileController->widget()
#4 /home/aspirete/public_html/x2crm/framework/web/CBaseController.php(126): require()
#5 /home/aspirete/public_html/x2crm/framework/web/CBaseController.php(95): ProfileController->renderInternal()
#6 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(716): ProfileController->renderFile()
#7 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(735): ProfileController->renderLayout()
#8 /home/aspirete/public_html/x2crm/protected/controllers/ProfileController.php(1686): ProfileController->render()
#9 unknown(0): ProfileController->actionView()
#10 /home/aspirete/public_html/x2crm/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs()
#11 /home/aspirete/public_html/x2crm/framework/web/actions/CInlineAction.php(47): CInlineAction->runWithParamsInternal()
#12 /home/aspirete/public_html/x2crm/framework/web/CController.php(308): CInlineAction->runWithParams()
#13 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(134): ProfileController->runAction()
#14 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(581): CFilterChain->run()
#15 /home/aspirete/public_html/x2crm/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets()
#16 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#17 /home/aspirete/public_html/x2crm/framework/web/filters/CFilter.php(40): CFilterChain->run()
#18 /home/aspirete/public_html/x2crm/framework/web/CController.php(1148): CAccessControlFilter->filter()
#19 /home/aspirete/public_html/x2crm/framework/web/filters/CInlineFilter.php(58): ProfileController->filterAccessControl()
#20 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#21 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(581): CFilterChain->run()
#22 /home/aspirete/public_html/x2crm/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets()
#23 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#24 /home/aspirete/public_html/x2crm/framework/web/filters/CFilter.php(40): CFilterChain->run()
#25 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): FileUploadsFilter->filter()
#26 /home/aspirete/public_html/x2crm/framework/web/filters/CFilter.php(40): CFilterChain->run()
#27 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): X2AjaxHandlerFilter->filter()
#28 /home/aspirete/public_html/x2crm/framework/web/CController.php(291): CFilterChain->run()
#29 /home/aspirete/public_html/x2crm/framework/web/CController.php(265): ProfileController->runActionWithFilters()
#30 /home/aspirete/public_html/x2crm/framework/web/CWebApplication.php(282): ProfileController->run()
#31 /home/aspirete/public_html/x2crm/protected/components/X2WebApplication.php(65): X2WebApplication->runController()
#32 /home/aspirete/public_html/x2crm/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#33 /home/aspirete/public_html/x2crm/index.php(67): X2WebApplication->run()
X2Engine Version: 7.1
PHP Version: 7.2.14

Email Address (optional)

Include phpinfo()? (optional, but recommended) 

Please Note: Any information in the $_GET or $_POST arrays included with the request will also be sent with the report.
Link to post
Share on other sites

This appears to be caused by a null variable ($hiddenTags) within protected/components/TagCloud.php. We will provide a hotfix patch this week. You can also replace:

if(count($hiddenTags)>0){
    $tagParams = AuxLib::bindArray ($hiddenTags);
    $params = array_merge ($params, $tagParams);
    $str1=" AND tag NOT IN (".implode (',', array_keys ($tagParams)).")";
}else{
    $str1="";
}

to:

if(!is_null($hiddenTags) && count($hiddenTags)>0){
    $tagParams = AuxLib::bindArray ($hiddenTags);
    $params = array_merge ($params, $tagParams);
    $str1=" AND tag NOT IN (".implode (',', array_keys ($tagParams)).")";
}else{
    $str1="";
}

in protected/components/TagCloud.php

  • Like 1
Link to post
Share on other sites
  • 1 month later...

Hello JacobD,

 

You may need to re-generate your encryption.iv and encryption.key files in protected/config. You can do this by deleting these files (the app should then re-create them or you can manually create them by running protected/yiic cryptsetup).

 

On my setup the encryption key files didn't autogenerate. There is no yiic in protected - it's back a directory. I see cryptsetup.php in protected commands. How to? 

Link to post
Share on other sites

Tried running the command from Plesk's scheduled task but coming up with an error. 

 

CException: Failed to create a secure encryption key. The error message was: Key file's containing directory at config not found. in /..../httpdocs/x2/protected/commands/CryptSetupCommand.php:67
Stack trace:
#0 /.../httpdocs/x2/framework/console/CConsoleCommandRunner.php(71): CryptSetupCommand->run(Array)
#1 /.../httpdocs/x2/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run(Array)
#2 /.../httpdocs/x2/framework/base/CApplication.php(185): CConsoleApplication->processRequest()
#3 /.../httpdocs/x2/framework/yiic.php(33): CApplication->run()
#4 /.../httpdocs/x2/protected/yiic.php(8): require_once('/var/www/vhosts...')

#5 {main} 

Link to post
Share on other sites
  • 2 months later...

This appears to be caused by a null variable ($hiddenTags) within protected/components/TagCloud.php. We will provide a hotfix patch this week. You can also replace:

if(count($hiddenTags)>0){
    $tagParams = AuxLib::bindArray ($hiddenTags);
    $params = array_merge ($params, $tagParams);
    $str1=" AND tag NOT IN (".implode (',', array_keys ($tagParams)).")";
}else{
    $str1="";
}

to:

if(!is_null($hiddenTags) && count($hiddenTags)>0){
    $tagParams = AuxLib::bindArray ($hiddenTags);
    $params = array_merge ($params, $tagParams);
    $str1=" AND tag NOT IN (".implode (',', array_keys ($tagParams)).")";
}else{
    $str1="";
}

in protected/components/TagCloud.php

 

 

Was this hot fix ever released?  If so, I need some clarity on getting the hot fixes as they are released.  In the meantime I am patching manually, and resolving issues myself as I find them. 

 

Thanks

Link to post
Share on other sites
  • 5 weeks later...

Hello JacobD,

 

You may need to re-generate your encryption.iv and encryption.key files in protected/config. You can do this by deleting these files (the app should then re-create them or you can manually create them by running protected/yiic cryptsetup).

This worked for me too. Thanks.

Link to post
Share on other sites

Any ideas on how to fix? Permission or path problem? 

Email is broken.

 

Your config directory may not have the proper permissions. Can you verify that the directory exists, that it has web-server write permissions and that the following files exist in that directory:

 

encryption.iv  encryption.key

Link to post
Share on other sites
  • 1 year later...

Can not update... Fresh install php 7.4 
7.1 to 8.0
 

Exception: "CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away" in /home/nevulosa/public_html/doncasas.com/x2/framework/db/CDbCommand.php L543

Link to post
Share on other sites
  • 10 months later...

My email credentials are not encrypted and I cannot get the system to create the encryption.iv and encryption.key files. I deleted them as mentioned, they are not created automaticaley when I re-create the email credentials or start the app; and I checked the config directory permissions. I can also not get the app to create them manually by running protected/yiic, I get a "You don't have permission to access this resource." error.

Anybody with advice on how to resolve the matter and get the email credentials encrypted?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...