Re: [Galette-discussion] Events plugin |
[ Thread Index | Date Index | More lists.galette.eu/users Archives ]
Hi
Thanks for your reply.
When I make the suggested change, the previous error disappears.
However, there is a new error and the bookings functions still do
not work. Your point about the booking date being mandatory makes
sense. However this error occurs before you get a chance to
create a booking date. It occurs as soon as you click on one of
the 2 menu options (in FR "Reservations" or "Nouvelle
reservation") on the side bar menu.
The new error is "Undefined property" as below from the error
logs :
[Tue Feb 14 21:32:23.268089 2023] [php:notice] [pid 21659]
[client 192.168.1.60:45188] Galette error:\nType:
ErrorException\nMessage: Undefined property:
GaletteEvents\\Booking::$booking_date\nFile:
/var/www/html/galette/plugins/galette-plugin-events-1.5.0/lib/GaletteEvents/Booking.php\nLine:
636\nTrace: #0
/var/www/html/galette/plugins/galette-plugin-events-1.5.0/lib/GaletteEvents/Booking.php(636):
{closure}()\n#1
/var/www/html/galette/data/templates_c/8e2423d1edf8bfded4ea752221f78a348244e04e_0.file.bookings.tpl.php(301):
GaletteEvents\\Booking->getDate()\n#2
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(248):
Block_48685589963933600556436_99545667->callBlock()\n#3
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(184):
Smarty_Internal_Runtime_Inheritance->callBlock()\n#4
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(186):
Smarty_Internal_Runtime_Inheritance->process()\n#5
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(156):
Smarty_Internal_Runtime_Inheritance->process()\n#6
/var/www/html/galette/data/templates_c/e2704d303129881d1dd29c509fdbf703eb43e6d8_0.file.page.tpl.php(342):
Smarty_Internal_Runtime_Inheritance->instanceBlock()\n#7
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123):
content_639332a5628a54_29940910()\n#8
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114):
Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#9
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216):
Smarty_Template_Compiled->render()\n#10
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385):
Smarty_Internal_Template->render()\n#11
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(116):
Smarty_Internal_Template->_subTemplateRender()\n#12
/var/www/html/galette/data/templates_c/8e2423d1edf8bfded4ea752221f78a348244e04e_0.file.bookings.tpl.php(40):
Smarty_Internal_Runtime_Inheritance->endChild()\n#13
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123):
content_639336005791a2_10057169()\n#14
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114):
Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#15
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216):
Smarty_Template_Compiled->render()\n#16
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232):
Smarty_Internal_Template->render()\n#17
/var/www/html/galette/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116):
Smarty_Internal_TemplateBase->_execute()\n#18
/var/www/html/galette/vendor/mathmarques/smarty-view/src/Smarty.php(113):
Smarty_Internal_TemplateBase->fetch()\n#19
/var/www/html/galette/vendor/mathmarques/smarty-view/src/Smarty.php(126):
Slim\\Views\\Smarty->fetch()\n#20
/var/www/html/galette/plugins/galette-plugin-events-1.5.0/lib/GaletteEvents/Controllers/Crud/BookingsController.php(188):
Slim\\Views\\Smarty->render()\n#21 [internal function]:
GaletteEvents\\Controllers\\Crud\\BookingsController->listBookings()\n#22
/var/www/html/galette/vendor/php-di/invoker/src/Invoker.php(74):
call_user_func_array()\n#23
/var/www/html/galette/vendor/php-di/slim-bridge/src/ControllerInvoker.php(50):
Invoker\\Invoker->call()\n#24
/var/www/html/galette/vendor/slim/slim/Slim/Route.php(281):
DI\\Bridge\\Slim\\ControllerInvoker->__invoke()\n#25
/var/www/html/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117):
Slim\\Route->__invoke()\n#26
/var/www/html/galette/vendor/slim/slim/Slim/Route.php(268):
Slim\\Route->callMiddlewareStack()\n#27
/var/www/html/galette/vendor/slim/slim/Slim/App.php(503):
Slim\\Route->run()\n#28
/var/www/html/galette/vendor/akrabat/rka-slim-session-middleware/RKA/SessionMiddleware.php(47):
Slim\\App->__invoke()\n#29 [internal function]:
RKA\\SessionMiddleware->__invoke()\n#30
/var/www/html/galette/vendor/slim/slim/Slim/DeferredCallable.php(57):
call_user_func_array()\n#31 [internal function]:
Slim\\DeferredCallable->__invoke()\n#32
/var/www/html/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70):
call_user_func()\n#33
/var/www/html/galette/lib/Galette/Middleware/SmartyCsrf.php(94):
Slim\\App->Slim\\{closure}()\n#34 [internal function]:
Galette\\Middleware\\SmartyCsrf->__invoke()\n#35
/var/www/html/galette/vendor/slim/slim/Slim/DeferredCallable.php(57):
call_user_func_array()\n#36 [internal function]:
Slim\\DeferredCallable->__invoke()\n#37
/var/www/html/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70):
call_user_func()\n#38
/var/www/html/galette/vendor/slim/csrf/src/Guard.php(171):
Slim\\App->Slim\\{closure}()\n#39 [internal function]:
Slim\\Csrf\\Guard->__invoke()\n#40
/var/www/html/galette/vendor/slim/slim/Slim/DeferredCallable.php(57):
call_user_func_array()\n#41 [internal function]:
Slim\\DeferredCallable->__invoke()\n#42
/var/www/html/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70):
call_user_func()\n#43
/var/www/html/galette/lib/Galette/Middleware/TrailingSlash.php(81):
Slim\\App->Slim\\{closure}()\n#44 [internal function]:
Galette\\Middleware\\TrailingSlash->__invoke()\n#45
/var/www/html/galette/vendor/slim/slim/Slim/DeferredCallable.php(57):
call_user_func_array()\n#46 [internal function]:
Slim\\DeferredCallable->__invoke()\n#47
/var/www/html/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70):
call_user_func()\n#48
/var/www/html/galette/lib/Galette/Middleware/Language.php(104):
Slim\\App->Slim\\{closure}()\n#49 [internal function]:
Galette\\Middleware\\Language->__invoke()\n#50
/var/www/html/galette/vendor/slim/slim/Slim/DeferredCallable.php(57):
call_user_func_array()\n#51 [internal function]:
Slim\\DeferredCallable->__invoke()\n#52
/var/www/html/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70):
call_user_func()\n#53
/var/www/html/galette/lib/Galette/Middleware/Telemetry.php(146):
Slim\\App->Slim\\{closure}()\n#54 [internal function]:
Galette\\Middleware\\Telemetry->__invoke()\n#55
/var/www/html/galette/vendor/slim/slim/Slim/DeferredCallable.php(57):
call_user_func_array()\n#56 [internal function]:
Slim\\DeferredCallable->__invoke()\n#57
/var/www/html/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70):
call_user_func()\n#58
/var/www/html/galette/lib/Galette/Middleware/CheckAcls.php(144):
Slim\\App->Slim\\{closure}()\n#59 [internal function]:
Galette\\Middleware\\CheckAcls->__invoke()\n#60
/var/www/html/galette/vendor/slim/slim/Slim/DeferredCallable.php(57):
call_user_func_array()\n#61 [internal function]:
Slim\\DeferredCallable->__invoke()\n#62
/var/www/html/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70):
call_user_func()\n#63
/var/www/html/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117):
Slim\\App->Slim\\{closure}()\n#64
/var/www/html/galette/vendor/slim/slim/Slim/App.php(392):
Slim\\App->callMiddlewareStack()\n#65
/var/www/html/galette/vendor/slim/slim/Slim/App.php(297):
Slim\\App->process()\n#66
/var/www/html/galette/includes/main.inc.php(159):
Slim\\App->run()\n#67
/var/www/html/galette/webroot/index.php(57):
require_once('...')\n#68 {main}, referer:
https://galette.dnsalias.org/plugins/events/event/edit/177
Cordialement
Hello,
Le 11/02/2023 à 14:50, jim/cluchey a écrit :
Hi
I think I have found a bug in the Events plugin.
[...]
Test Environment :
Galette core v0.9.6.1
Galette-events V1.5.0
PHP 8.1
I guess this is the problem: this is npot compatible with PHP 8.1.
[...]
changing line 636
from
$date = new \DateTime($this->date);
to
$date = new \DateTime($this->date ?? "");
This should have be the solution; but looking at the code, we can see that "$this->date" is never set. It probably should be replaced with "$this->booking_date", which should never be null because it's mandatory.
Try that and tell me if it solves the issue.
Are you able to address this problem in a mini version update of the plugin ?
There is no plugin update planned right now.
++
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |