Jump to content

Featured Replies

Posted

Hi,

 

I have upgrade IPB to version 4.3 but now the calendar his broken 😞

SELECT calendar_events.*, ( 3959 * acos( cos( radians(48,8649) ) * cos( radians( event_latitude ) ) * cos( radians( event_longitude ) - radians( 2,2752 ) ) + sin( radians( 48,8649 ) ) * sin( radians( event_latitude) ) ) ) AS distance, author.*, core_tags_cache.tag_cache_text FROM `calendar_events`  LEFT JOIN `core_tags_cache` ON tag_cache_key=MD5(CONCAT('calendar;calendar;',calendar_events.event_id))  LEFT JOIN `core_members` AS `author` ON author.member_id = calendar_events.event_member_id WHERE ( event_online = 0 ) AND ( event_location IS NOT NULL ) AND event_recurring IS NULL AND ( 
					( event_end_date IS NULL AND DATE( event_start_date ) >= '2022-10-16' AND DATE( event_start_date ) <= '2023-10-16' AND event_all_day=1 )
					OR
					( event_end_date IS NOT NULL AND DATE( event_start_date ) <= '2023-10-16' AND DATE( event_end_date ) >= '2022-10-16' AND event_all_day=1 )
					OR
					( event_end_date IS NULL AND event_start_date >= '2022-10-16 00:00:00' AND event_start_date <= '2023-10-15 22:00:00' AND event_all_day=0 )
					OR
					( event_end_date IS NOT NULL AND event_start_date <= '2023-10-15 22:00:00' AND event_end_date >= '2022-10-16 00:00:00' AND event_all_day=0 )
				) AND event_latitude IS NOT NULL AND event_longitude IS NOT NULL AND calendar_events.event_approved < 2 AND calendar_events.event_approved!=-2 AND calendar_events.event_approved!=-3 AND calendar_events.event_calendar_id IN(1) HAVING distance < 500 ORDER BY distance ASC
IPS\Db\Exception: Incorrect parameter count in the call to native function 'radians' (1582)
#0 /var/www/html/forum/system/Db/Select.php(388): IPS\_Db->preparedQuery()
#1 /var/www/html/forum/system/Db/Select.php(446): IPS\Db\_Select->runQuery()
#2 [internal function]: IPS\Db\_Select->rewind()
#3 [internal function]: IteratorIterator->rewind()
#4 /var/www/html/forum/applications/calendar/sources/Event/Event.php(2164): iterator_to_array()
#5 /var/www/html/forum/applications/calendar/modules/front/calendar/view.php(503): IPS\calendar\_Event::retrieveEvents()
#6 /var/www/html/forum/applications/calendar/modules/front/calendar/view.php(126): IPS\calendar\modules\front\calendar\_view->_viewOverview()
#7 /var/www/html/forum/system/Dispatcher/Controller.php(118): IPS\calendar\modules\front\calendar\_view->manage()
#8 /var/www/html/forum/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()
#9 /var/www/html/forum/index.php(13): IPS\_Dispatcher->run()
#10 {main}

Can you help me 🙂 ?

Solved by Photo Club Paris

Go to solution
  • Community Expert

What locale are you using for your language pack? We are currently investigating an issue which may be related with foreign locales.

  • Community Expert

Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.

 

  • Community Expert

There has been a patch created for this issue. If you go to Support within your admin CP, you will see "Optional" updates, which will fix this problem.

  • Author

Hi Marc,

I have patch but the problem exist again 

SELECT calendar_events.*, ( 3959 * acos( cos( radians(48,8649) ) * cos( radians( event_latitude ) ) * cos( radians( event_longitude ) - radians( 2,2752 ) ) + sin( radians( 48,8649 ) ) * sin( radians( event_latitude) ) ) ) AS distance, author.*, core_tags_cache.tag_cache_text FROM `calendar_events`  LEFT JOIN `core_tags_cache` ON tag_cache_key=MD5(CONCAT('calendar;calendar;',calendar_events.event_id))  LEFT JOIN `core_members` AS `author` ON author.member_id = calendar_events.event_member_id WHERE ( event_online = 0 ) AND ( event_location IS NOT NULL ) AND event_recurring IS NULL AND ( 
					( event_end_date IS NULL AND DATE( event_start_date ) >= '2022-10-17' AND DATE( event_start_date ) <= '2023-10-17' AND event_all_day=1 )
					OR
					( event_end_date IS NOT NULL AND DATE( event_start_date ) <= '2023-10-17' AND DATE( event_end_date ) >= '2022-10-17' AND event_all_day=1 )
					OR
					( event_end_date IS NULL AND event_start_date >= '2022-10-17 00:00:00' AND event_start_date <= '2023-10-16 22:00:00' AND event_all_day=0 )
					OR
					( event_end_date IS NOT NULL AND event_start_date <= '2023-10-16 22:00:00' AND event_end_date >= '2022-10-17 00:00:00' AND event_all_day=0 )
				) AND event_latitude IS NOT NULL AND event_longitude IS NOT NULL AND calendar_events.event_approved < 2 AND calendar_events.event_approved!=-2 AND calendar_events.event_approved!=-3 AND calendar_events.event_calendar_id IN(1) HAVING distance < 500 ORDER BY distance ASC
IPS\Db\Exception: Incorrect parameter count in the call to native function 'radians' (1582)
#0 /var/www/html/forum/system/Db/Select.php(388): IPS\_Db->preparedQuery()
#1 /var/www/html/forum/system/Db/Select.php(446): IPS\Db\_Select->runQuery()
#2 [internal function]: IPS\Db\_Select->rewind()
#3 [internal function]: IteratorIterator->rewind()
#4 /var/www/html/forum/applications/calendar/sources/Event/Event.php(2164): iterator_to_array()
#5 /var/www/html/forum/applications/calendar/modules/front/calendar/view.php(503): IPS\calendar\_Event::retrieveEvents()
#6 /var/www/html/forum/applications/calendar/modules/front/calendar/view.php(126): IPS\calendar\modules\front\calendar\_view->_viewOverview()
#7 /var/www/html/forum/system/Dispatcher/Controller.php(118): IPS\calendar\modules\front\calendar\_view->manage()
#8 /var/www/html/forum/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()
#9 /var/www/html/forum/index.php(13): IPS\_Dispatcher->run()
#10 {main}

Stephane

  • Author
  • Solution

Hi, i have update php from 7.4 to 8.2, now the calendar is OK.

 

Hi, i have update php from 7.4 to 8.2, now the calendar is OK.

PHP 8.2 isn't supported yet so you may have issues here and there.

  • Author

arfffff, which version is supported?

8.0.X or 8.1.X.

  • Author

OK, Thank, I change for 8.1. Thanks

Hi @Photo Club Paris,

Glad to see this issue has been resolved.

I would also like to confirm that PHP 8 and PHP 8.1 are currently supported.

Hello, I have the same issue on a french forum, however, I cannot yet migrated out PHP7.4 dur to other software incompatible on our hosting.

 

SELECT calendar_events.*, ( 3959 * acos( cos( radians(48,8958) ) * cos( radians( event_latitude ) ) * cos( radians( event_longitude ) - radians( 1,4049 ) ) + sin( radians( 48,8958 ) ) * sin( radians( event_latitude) ) ) ) AS distance, author.*, core_tags_cache.tag_cache_text FROM `calendar_events`  LEFT JOIN `core_tags_cache` ON tag_cache_key=MD5(CONCAT('calendar;calendar;',calendar_events.event_id))  LEFT JOIN `core_members` AS `author` ON author.member_id = calendar_events.event_member_id WHERE ( event_online = 0 ) AND ( event_location IS NOT NULL ) AND event_recurring IS NULL AND ( 
                    ( event_end_date IS NULL AND DATE( event_start_date ) >= '2022-10-21' AND DATE( event_start_date ) <= '2023-10-21' AND event_all_day=1 )
                    OR
                    ( event_end_date IS NOT NULL AND DATE( event_start_date ) <= '2023-10-21' AND DATE( event_end_date ) >= '2022-10-21' AND event_all_day=1 )
                    OR
                    ( event_end_date IS NULL AND event_start_date >= '2022-10-21 00:00:00' AND event_start_date <= '2023-10-20 22:00:00' AND event_all_day=0 )
                    OR
                    ( event_end_date IS NOT NULL AND event_start_date <= '2023-10-20 22:00:00' AND event_end_date >= '2022-10-21 00:00:00' AND event_all_day=0 )
                ) AND event_latitude IS NOT NULL AND event_longitude IS NOT NULL AND calendar_events.event_approved < 2 AND calendar_events.event_approved!=-2 AND calendar_events.event_approved!=-3 AND calendar_events.event_calendar_id IN(1,2) HAVING distance < 500 ORDER BY distance ASC
IPS\Db\Exception: Incorrect parameter count in the call to native function 'radians' (1582)
#0 /home/clients/5fcd710453db4205b89dada3bcb7b77e/web/ips/system/Db/Select.php(388): IPS\_Db->preparedQuery('/*dzcd_invision...', Array, true)
#1 /home/clients/5fcd710453db4205b89dada3bcb7b77e/web/ips/system/Db/Select.php(446): IPS\Db\_Select->runQuery()
#2 [internal function]: IPS\Db\_Select->rewind()
#3 [internal function]: IteratorIterator->rewind()
#4 /home/clients/5fcd710453db4205b89dada3bcb7b77e/web/ips/applications/calendar/sources/Event/Event.php(2164): iterator_to_array(Object(IPS\Patterns\ActiveRecordIterator))
#5 /home/clients/5fcd710453db4205b89dada3bcb7b77e/web/ips/applications/calendar/modules/front/calendar/view.php(503): IPS\calendar\_Event::retrieveEvents(Object(IPS\calendar\Date), Object(IPS\calendar\Date), NULL, 6, false, Object(IPS\Member), NULL, false, Array, false)
#6 /home/clients/5fcd710453db4205b89dada3bcb7b77e/web/ips/applications/calendar/modules/front/calendar/view.php(126): IPS\calendar\modules\front\calendar\_view->_viewOverview(Object(IPS\Helpers\Form))
#7 /home/clients/5fcd710453db4205b89dada3bcb7b77e/web/ips/system/Dispatcher/Controller.php(118): IPS\calendar\modules\front\calendar\_view->manage()
#8 /home/clients/5fcd710453db4205b89dada3bcb7b77e/web/ips/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()
#9 /home/clients/5fcd710453db4205b89dada3bcb7b77e/web/ips/index.php(13): IPS\_Dispatcher->run()
#10 {main}

 

Additional patch available in the AdminCP worked for me, the calendar is working again even in PHP 7.4. Thanks

Hi @BRUNO DE LA FOUCHARDIERE,

Glad to hear you sorted this one out by updating your software with the patch. If you encounter any other issues, please don't hesitate to let us know.