I can confirm the drag n drop of events in calendar view is an existing bug for vtiger 7.1 using php 7.1. So I think that makes vtiger 7.1 not compatible with php 7.1
The problem is in modules/Calendaractions/DragDropAjax.php:
The error is:
That error was corrected in #1058 (closed) but there are many more initializations like that in the same files.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
is used something like 13 times... Some the $var is declared as an empty string, some it is not declared and a few it is declared as an empty array.
It seems to me that the best approach would actually be to move the above code sequence into a single function within this, or the parent class and simply call it 13 times with the appropriate date and time field values.
But I also guess that there may already be a function somewhere else in vtiger which does this anyway ;-)
@uma.s comments? I'd be happy to create a MR but it would be good to know if there is already a static or common function elsewhere which does this...
@ruben.estrada I guess most of the time that will be OK. But if the $time is empty. you will be adding a ' ' to the date which is probably not wanted. I guess that is why they adopted this format.
It's a bit like the CONTACT_WS function in MySQL; if a value is Null the separator is not added...
@lord_alan Yes! your right we have this code duplication at around 13 places in DragDropAjax.php and also at SaveFollowupAjax.php.
I checked through the source, where i couldn't find any helper api's which supports this formatting.
It would be great if you guys can share the Merge request for this fix, if you already have one with an helper api. If not i will write one please do confirm.
@lord_alan please go ahead! Thanks for taking care of it.
@uma.s I've been asking this question a lot and maybe you can answer it. What is the official or recommended php version to use with vtiger 7.1/7.2/7.3 ? We should have a compatibility table somewhere publicly available not just for php, but also for mysql/mariadb.
Thanks a lot Uma, that's very valuable information. Talking about the table, I actually started my own but I'm not sure about it and there are many holes. But just to give you the idea, it's this:
Ruben A. EstradaTitle changed from Drag n Drop functionality Calendar broken for PHP >= 7.1 to Drag n Drop functionality in Calendar broken for PHP >= 7.1
Title changed from Drag n Drop functionality Calendar broken for PHP >= 7.1 to Drag n Drop functionality in Calendar broken for PHP >= 7.1
after further testing I can confirm the following:
The bug reported in this issue is not a bug anymore. It was already reported by Alan here: #1058 (closed) and fixed.
However many initializations were left unchanged in the same file and maybe cause other bugs. Thus, I think Alan's MR is still valid.
Ruben A. EstradaTitle changed from Drag n Drop functionality in Calendar broken for PHP >= 7.1 to Variables initialized as strings and then used as arrays cause fatal errors if PHP >= 7.1
Title changed from Drag n Drop functionality in Calendar broken for PHP >= 7.1 to Variables initialized as strings and then used as arrays cause fatal errors if PHP >= 7.1