Page 1 of 1

Calendar Plugin shows Error when trying to go back to events for previous weeks

Posted: 18 Jan 2021, 13:54
by mtikuman
I have installed the Calendar plugin and using it with Mantis 2.24.3

I've encountered an error when trying to go back to previous weeks events that happened much earlier.

The first two operations work okay, but when I try going further back I get the following error:
"SYSTEM WARNING

'A non-numeric value encountered' in 'C:\xampp\htdocs\mantis\plugins\Calendar\core\calendar_date_api.php' line 301

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section."

Steps to reproduce:
1.Go to 'Calendar'

2.Scroll to 'Back', 'Current week' and 'Next' navigation buttons and click on 'Back' multiple times then the error appears

Kindly assist.
Best regards.

Re: Calendar Plugin shows Error when trying to go back to events for previous weeks

Posted: 18 Jan 2021, 17:14
by cas
you better check it with the creators of the plugin ( see the readme )

Re: Calendar Plugin shows Error when trying to go back to events for previous weeks

Posted: 19 Jan 2021, 07:55
by mtikuman
I did so 2 weeks ago, but till now no reply :( I was thus hoping to find some help here, or if anyone had experienced the same issue.

Re: Calendar Plugin shows Error when trying to go back to events for previous weeks

Posted: 19 Jan 2021, 09:29
by cas
I do not get the error but that is because of my error settings. I do see your issue.
If I select Back for the third time, i have no dates anymore due to the problem in the script.
The problem arises if going back in time, you end up in the previous year so the issue only arises in January for going back and in December going forward.
Just copy the attached calendar_user_page.php into the plugin\Calendar\pages directory ( always make a backup first) and your problem should be gone :mrgreen:

Re: Calendar Plugin shows Error when trying to go back to events for previous weeks

Posted: 25 Feb 2021, 01:57
by mtikuman
cas wrote: 19 Jan 2021, 09:29 I do not get the error but that is because of my error settings. I do see your issue.
If I select Back for the third time, i have no dates anymore due to the problem in the script.
The problem arises if going back in time, you end up in the previous year so the issue only arises in January for going back and in December going forward.
Just copy the attached calendar_user_page.php into the plugin\Calendar\pages directory ( always make a backup first) and your problem should be gone :mrgreen:
Thanks for the update. Much appreciated!
I've done as you've instructed, but I'm getting the following error:
"SYSTEM WARNING

'key() expects parameter 1 to be array, int given' in 'C:\...\plugins\Calendar\core\calendar_columns_api.php' line 63

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
"
Is there something I'm missing?
Kind regards.

Re: Calendar Plugin shows Error when trying to go back to events for previous weeks

Posted: 25 Feb 2021, 11:36
by cas
Hard to say, I did not encounter that problem. Are you running the installation on localhost?

Re: Calendar Plugin shows Error when trying to go back to events for previous weeks

Posted: 01 Mar 2021, 08:37
by mtikuman
Apologies for the late reply.
Yes, I am running it on localhost.
Any modifications I need to do?
Kind regards.

Re: Calendar Plugin shows Error when trying to go back to events for previous weeks

Posted: 01 Mar 2021, 11:53
by cas
Try running it from something else than localhost, use ip-address of your machine. I read somewhere while researching that this message popped up running on localhost only.