[horde] New Horde Setup Tool in horde/base v6.0.0alpha15

Ralf Lang ralf.lang at ralf-lang.de
Thu Jun 26 15:39:42 UTC 2025


Hi Brent,

Am 26.06.2025 um 16:19 schrieb Brent:
>  Quoting Ralf Lang <ralf.lang at gmail.com>:
>
>> Am 26.06.2025 um 00:26 schrieb Brent:
>>>  Ok, that seems to be working for me. I no longer need to have the 
>>> "if" statement when a variable was being declared twice! So, that's 
>>> great! I just did:
>>>
>>> $ composer update
>>>
>>> $ composer require horde/horde-installer-plugin "^3 || 
>>> dev-FRAMEWORK_6_0"
>>>
>>> $ composer horde:reconfigure --force
>>>
>>> Should we be using the 3.0.3 installer or keep the 2.7 one?
>>
>> Use 3.x unless you see any issue you don't have with 2.x.
>>> Two issues (have been this way for a while)
>>>
>>> 1)  I still don't know where "start_year" gets assigned? For my 
>>> Contacts, it only shows from current year to 10 years out (2025 to 
>>> 2035). I can't set anything earlier as it isn't in the dropdown. My 
>>> "fix" is to hack 
>>> <install-dir>/vendor/horde/core/lib/Horde/Core/Ui/VarRenderer/Html.php 
>>> and change line 579.
>>>
>>> Orig 579:
>>> for ($i = $var->type->getProperty('start_year'); $i <= 
>>> $var->type->getProperty('end_year'); $i++) { */
>>>
>>> Changed to:
>>> for ($i = 1900; $i <= $var->type->getProperty('end_year'); $i++) {
>>
>> Please follow/subscribe https://github.com/horde/Core/issues/26
>>
>>> 2) Also in contacts (turba), it no longer shows the Photo of the 
>>> person in the contact view. No errors. I DO see a tiny thumbnail in 
>>> the calendar app for their birthday, but I can't see the larger 
>>> photo any longer. This broke a few releases ago, not exactly sure when.
>>
>> Please follow/subscribe https://github.com/horde/turba/issues/16
>> Thank you for reporting.
>
> I did some digging and found where "start_year" is set if it isn't 
> defined. In <install-dir>/vendor/horde/form/lib/Horde/Form/Type.php, 
> there's a Horde_Form_monthdayyear where it is getting set:
>
> ....
>
>         if (empty($start_year)) {
>             $start_year = date('Y');
>         }
>         if (empty($end_year)) {
>             $end_year = date('Y') + 10;
>         }
>
> This says that if start_year is null to then set the start_year to 
> current year.  Earlier in this same file, there's a 
> Horde_Form_Type_monthyear that sets the start_year to 1920 if 
> "start_year" is undefined.
>
> I'm not sure why if a date is using MMDDYYYY the default is to use 
> current year as the oldest date, but if the date is being requested is 
> MMYYYY, then it'll go back to 1920 as the oldest year.
>
> Should "start_year" be a variable that the user can set in Horde?
>
> Maybe easiest to just set the MMDDYYYY to be the same 1920 as MMYYYY? 
> I changed my config and put the "Html.php" file back to original and 
> instead modified the "Type.php".
>
> Line 3122:
>
> Orig:
> $start_year = date('Y');
>
> Changed to:
> $start_year = 1920;

Great analysis. I will add that context to the github issue once I get 
around to fixing this. However, I think we ought not only fix this to a 
more sensible default but also provide useful specific inputs from Turba 
and other apps. Birthday fields should probably allow for even the 
blessed very old fellows while due dates probably don't make sense for 
anything before 2000. In the longer run I'd like to switch to a more 
modern presentation which allows both just typing a date or picking it 
with the mouse or the touch pen. I absolutely hate it when a modern-day 
date/time picker is more of a hassle than typing 10 characters. Horde's 
grandfather exception will wear off pretty fast but first things first.

Note that due to the business practice of aligning due dates, reporting 
duties and project kickoffs with change of month or quarter, I will 
probably take a bit longer to fix this one for good.

Regards

Ralf



More information about the horde mailing list