Let's say you want to display a date picker (calendar) in Joomla 4.0.0.b1. As per usual you do:
echo \Joomla\CMS\HTML\HTMLHelper::('calendar', $myDate, 'fieldName', 'fieldID');
You'd expect to see a Calendar field. However, if error reporting is set to Maximum you are met with a nasty PHP Notice "Notice: Undefined variable: dataAttribute in ...../layouts/joomla/form/field/calendar.php on line 117" This breaks the display and the calendar field.
Because it breaks all of my software where a date needs to be selected and I don't wanna have to implement my own date picker.
Change this https://github.com/joomla/joomla-cms/blob/4.0-dev/layouts/joomla/form/field/calendar.php#L117
to that:
<?php echo $dataAttribute ?? ''; ?>
None.
Labels |
Added:
?
|
@brianteeman Thanks! I had tested this on Thursday and I was so confused as to why it suddenly broken over the weekend. Sucks that I'm using it with all of my software which I plan to release officially J4 compatible versions for in the next 10 days :/ At least if it's fixed it won't appear that I'm doing something wrong.
Well you know the quick way to get it fixed ;)
I don't understand that code so I would be working blind
Done :)
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-05-31 19:19:01 |
Closed_By | ⇒ | alikon |
For reference this was merged without tests #29252