Jump to content
X2Community Forums

Recommended Posts

Hello all,

I'm using X2CRM 8.0 (fresh install of 7.1 upgraded automatically to 8.0 without using it), and the Calendar does not work.  When I click on the link on the top menu 'Calendar' I get the following error:

Here's a quick list of what will be included in the report:

Error Code: 500
Error Message: Invalid argument supplied for foreach()
Stack Trace: [click to toggle display]

PHP warning in /home1/inteltic/crm/protected/modules/calendar/views/calendar/calendar.php(123)
#0 /home1/inteltic/crm/framework/web/CBaseController.php(126): require()
#1 /home1/inteltic/crm/framework/web/CBaseController.php(95): CalendarController->renderInternal()
#2 /home1/inteltic/crm/framework/web/CController.php(872): CalendarController->renderFile()
#3 /home1/inteltic/crm/protected/controllers/x2base.php(736): CalendarController->renderPartial()
#4 /home1/inteltic/crm/protected/modules/calendar/controllers/CalendarController.php(120): CalendarController->render()
#5 /home1/inteltic/crm/framework/web/actions/CInlineAction.php(49): CalendarController->actionIndex()
#6 /home1/inteltic/crm/framework/web/CController.php(308): CInlineAction->runWithParams()
#7 /home1/inteltic/crm/framework/web/filters/CFilterChain.php(134): CalendarController->runAction()
#8 /home1/inteltic/crm/protected/controllers/x2base.php(586): CFilterChain->run()
#9 /home1/inteltic/crm/framework/web/filters/CInlineFilter.php(58): CalendarController->filterSetPortlets()
#10 /home1/inteltic/crm/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#11 /home1/inteltic/crm/framework/web/filters/CFilter.php(40): CFilterChain->run()
#12 /home1/inteltic/crm/framework/web/filters/CFilterChain.php(131): FileUploadsFilter->filter()
#13 /home1/inteltic/crm/framework/web/filters/CFilter.php(40): CFilterChain->run()
#14 /home1/inteltic/crm/framework/web/filters/CFilterChain.php(131): X2AjaxHandlerFilter->filter()
#15 /home1/inteltic/crm/framework/web/CController.php(291): CFilterChain->run()
#16 /home1/inteltic/crm/framework/web/CController.php(265): CalendarController->runActionWithFilters()
#17 /home1/inteltic/crm/framework/web/CWebApplication.php(282): CalendarController->run()
#18 /home1/inteltic/crm/protected/components/X2WebApplication.php(65): X2WebApplication->runController()
#19 /home1/inteltic/crm/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#20 /home1/inteltic/crm/index.php(67): X2WebApplication->run()

X2Engine Version: 8.0
PHP Version: 7.3.33

 

Can I please ask for any help in being able to resolve this problem?

Link to post
Share on other sites

Hi user,
This is an issue with how non arrays are handled in newer php. We have a fix in the next update coming out in a couple days but if you need it now.
 

replace you code protected/modules/calendar/views/calendar/calendar.php around line 123 with this

if(is_array($userCalendars)){
foreach($userCalendars as $user){
if(isset($this->calendarUsers[$user])){
$userCalendarFeed = $this->createUrl('jsonFeed', array('calendarId' => $user));
$checkedUserCalendars .= '
$("#calendar").fullCalendar("addEventSource",{
url: "'.$userCalendarFeed.'"
});';
}
}

}

  • Like 1
Link to post
Share on other sites

@jackJust a quick follow up question.  I just updated to X2Engine 8.3 and it seems to have the fix; however, I'm getting the Error again. 

in_array() expects parameter 2 to be array, int given

I tried the fix you described for version 8.3, but it didn't work.  Is there a newer version than 8.3 that you were referring to?

Link to post
Share on other sites

thank you so much for your help.  Yes, I can, below is the trace.

Error Code: 500
Error Message: in_array() expects parameter 2 to be array, int given
Stack Trace: [click to toggle display]

PHP warning in /home1/inteltic/crm/protected/modules/calendar/views/calendar/_sidebarLeftExtraContent.php(78)
#0 /home1/inteltic/crm/protected/modules/calendar/views/calendar/_sidebarLeftExtraContent.php(78): in_array()
#1 /home1/inteltic/crm/framework/web/CBaseController.php(126): require()
#2 /home1/inteltic/crm/framework/web/CBaseController.php(95): CalendarController->renderInternal()
#3 /home1/inteltic/crm/framework/web/CController.php(872): CalendarController->renderFile()
#4 /home1/inteltic/crm/protected/views/layouts/_actionMenu.php(95): CalendarController->renderPartial()
#5 /home1/inteltic/crm/framework/web/CBaseController.php(126): require()
#6 /home1/inteltic/crm/framework/web/CBaseController.php(95): CalendarController->renderInternal()
#7 /home1/inteltic/crm/framework/web/CController.php(872): CalendarController->renderFile()
#8 /home1/inteltic/crm/protected/views/layouts/column3.php(78): CalendarController->renderPartial()
#9 /home1/inteltic/crm/framework/web/CBaseController.php(126): require()
#10 /home1/inteltic/crm/framework/web/CBaseController.php(95): CalendarController->renderInternal()
#11 /home1/inteltic/crm/protected/controllers/x2base.php(721): CalendarController->renderFile()
#12 /home1/inteltic/crm/protected/controllers/x2base.php(740): CalendarController->renderLayout()
#13 /home1/inteltic/crm/protected/modules/calendar/controllers/CalendarController.php(120): CalendarController->render()
#14 /home1/inteltic/crm/framework/web/actions/CInlineAction.php(49): CalendarController->actionIndex()
#15 /home1/inteltic/crm/framework/web/CController.php(308): CInlineAction->runWithParams()
#16 /home1/inteltic/crm/framework/web/filters/CFilterChain.php(134): CalendarController->runAction()
#17 /home1/inteltic/crm/protected/controllers/x2base.php(586): CFilterChain->run()
#18 /home1/inteltic/crm/framework/web/filters/CInlineFilter.php(58): CalendarController->filterSetPortlets()
#19 /home1/inteltic/crm/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#20 /home1/inteltic/crm/framework/web/filters/CFilter.php(40): CFilterChain->run()
#21 /home1/inteltic/crm/framework/web/filters/CFilterChain.php(131): FileUploadsFilter->filter()
#22 /home1/inteltic/crm/framework/web/filters/CFilter.php(40): CFilterChain->run()
#23 /home1/inteltic/crm/framework/web/filters/CFilterChain.php(131): X2AjaxHandlerFilter->filter()
#24 /home1/inteltic/crm/framework/web/CController.php(291): CFilterChain->run()
#25 /home1/inteltic/crm/framework/web/CController.php(265): CalendarController->runActionWithFilters()
#26 /home1/inteltic/crm/framework/web/CWebApplication.php(282): CalendarController->run()
#27 /home1/inteltic/crm/protected/components/X2WebApplication.php(66): X2WebApplication->runController()
#28 /home1/inteltic/crm/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#29 /home1/inteltic/crm/index.php(68): X2WebApplication->run()

X2Engine Version: 8.3
PHP Version: 7.4.27

Link to post
Share on other sites

On line 67 please  replace this

$showUserCalendars = isset($showCalendars['userCalendars']) ? $showCalendars['userCalendars'] : 1;

 

with this

$showUserCalendars = isset($showCalendars['userCalendars']) ? $showCalendars['userCalendars'] : array();

 We will put out a hot fix later this week.
-Jack

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

Hi Craig,
I see you posted in 2 different post dealing with calendar issues. Both of the post deal with different errors. If you could post your stack trace for your error I would be able to provided more assistance.
-Jack

Link to post
Share on other sites
On 4/5/2022 at 7:10 AM, jack said:

Hi Craig,
I see you posted in 2 different post dealing with calendar issues. Both of the post deal with different errors. If you could post your stack trace for your error I would be able to provided more assistance.
-Jack

Error Code: 500
Error Message: in_array() expects parameter 2 to be array, int given
Stack Trace: [click to toggle display]

PHP warning in /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/modules/calendar/views/calendar/_sidebarLeftExtraContent.php(78)
#0 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/modules/calendar/views/calendar/_sidebarLeftExtraContent.php(78): in_array()
#1 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CBaseController.php(126): require()
#2 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CBaseController.php(95): CalendarController->renderInternal()
#3 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CController.php(872): CalendarController->renderFile()
#4 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/views/layouts/_actionMenu.php(95): CalendarController->renderPartial()
#5 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CBaseController.php(126): require()
#6 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CBaseController.php(95): CalendarController->renderInternal()
#7 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CController.php(872): CalendarController->renderFile()
#8 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/views/layouts/column3.php(78): CalendarController->renderPartial()
#9 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CBaseController.php(126): require()
#10 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CBaseController.php(95): CalendarController->renderInternal()
#11 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/controllers/x2base.php(721): CalendarController->renderFile()
#12 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/controllers/x2base.php(740): CalendarController->renderLayout()
#13 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/modules/calendar/controllers/CalendarController.php(120): CalendarController->render()
#14 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/actions/CInlineAction.php(49): CalendarController->actionIndex()
#15 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CController.php(308): CInlineAction->runWithParams()
#16 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilterChain.php(134): CalendarController->runAction()
#17 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/controllers/x2base.php(586): CFilterChain->run()
#18 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CInlineFilter.php(58): CalendarController->filterSetPortlets()
#19 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#20 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilter.php(40): CFilterChain->run()
#21 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilterChain.php(131): FileUploadsFilter->filter()
#22 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilter.php(40): CFilterChain->run()
#23 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilterChain.php(131): X2AjaxHandlerFilter->filter()
#24 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CController.php(291): CFilterChain->run()
#25 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CController.php(265): CalendarController->runActionWithFilters()
#26 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CWebApplication.php(282): CalendarController->run()
#27 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/components/X2WebApplication.php(66): X2WebApplication->runController()
#28 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#29 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/index.php(68): X2WebApplication->run()

X2Engine Version: 8.3
PHP Version: 7.3.33

Link to post
Share on other sites

I also have a similar error with "Actions". I'll post it here as well but if it needs to be posted elsewhere please let me know.

 

Error Code: 500
Error Message: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 3995 Character set 'utf8_general_ci' cannot be used in conjunction with 'binary' in call to regexp_like.
Stack Trace: [click to toggle display]

CDbException in /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/db/CDbCommand.php(543)
#0 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/db/CDbCommand.php(433): CDbCommand->queryInternal('fetchColumn', 0, Array)
#1 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/db/ar/CActiveRecord.php(1609): CDbCommand->queryScalar()
#2 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CActiveDataProvider.php(228): CActiveRecord->count(Object(CDbCriteria))
#3 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CDataProvider.php(224): CActiveDataProvider->calculateTotalItemCount()
#4 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CActiveDataProvider.php(178): CDataProvider->getTotalItemCount()
#5 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CDataProvider.php(168): CActiveDataProvider->fetchData()
#6 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/zii/widgets/CBaseListView.php(125): CDataProvider->getData()
#7 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/zii/widgets/CListView.php(211): CBaseListView->init()
#8 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CBaseController.php(147): CListView->init()
#9 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/controllers/x2base.php(836): CBaseController->createWidget('zii.widgets.CLi...', Array)
#10 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/modules/actions/views/actions/index.php(119): x2base->widget('zii.widgets.CLi...', Array)
#11 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CBaseController.php(126): require('/home/ozpharmc/...')
#12 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CBaseController.php(95): CBaseController->renderInternal('/home/ozpharmc/...', Array, true)
#13 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CController.php(872): CBaseController->renderFile('/home/ozpharmc/...', Array, true)
#14 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/controllers/x2base.php(736): CController->renderPartial('index', Array, true)
#15 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/modules/actions/controllers/ActionsController.php(1112): x2base->render('index', Array)
#16 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/actions/CInlineAction.php(49): ActionsController->actionIndex()
#17 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#18 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilterChain.php(134): CController->runAction(Object(CInlineAction))
#19 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/controllers/x2base.php(586): CFilterChain->run()
#20 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CInlineFilter.php(58): x2base->filterSetPortlets(Object(CFilterChain))
#21 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(Object(CFilterChain))
#22 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilter.php(40): CFilterChain->run()
#23 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilterChain.php(131): CFilter->filter(Object(CFilterChain))
#24 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilter.php(40): CFilterChain->run()
#25 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/filters/CFilterChain.php(131): CFilter->filter(Object(CFilterChain))
#26 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CController.php(291): CFilterChain->run()
#27 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#28 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/web/CWebApplication.php(282): CController->run('index')
#29 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/protected/components/X2WebApplication.php(66): CWebApplication->runController('actions/actions...')
#30 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#31 /home/ozpharmc/public_html/seniorstechsupport.com.au/x2/index.php(68): CApplication->run()
#32 {main}

X2Engine Version: 8.3
PHP Version: 7.3.33

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...