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

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

Post Reply
mtikuman
Posts: 24
Joined: 18 Nov 2020, 17:02

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

Post 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.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

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

Post by cas »

you better check it with the creators of the plugin ( see the readme )
mtikuman
Posts: 24
Joined: 18 Nov 2020, 17:02

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

Post 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.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

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

Post 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:
Attachments
calendar_user_page.zip
(2.33 KiB) Downloaded 3747 times
mtikuman
Posts: 24
Joined: 18 Nov 2020, 17:02

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

Post 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.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

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

Post by cas »

Hard to say, I did not encounter that problem. Are you running the installation on localhost?
mtikuman
Posts: 24
Joined: 18 Nov 2020, 17:02

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

Post by mtikuman »

Apologies for the late reply.
Yes, I am running it on localhost.
Any modifications I need to do?
Kind regards.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

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

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