6.0.0-RC7
6/27/26

[#3612] Cannot correctly save or edit Fetchmail accounts
Summary Cannot correctly save or edit Fetchmail accounts
Queue IMP
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester horde (at) rajidae (dot) se
Created 3/12/06 (7412 days ago)
Due
Updated 3/12/06 (7412 days ago)
Assigned 3/12/06 (7412 days ago)
Resolved 3/12/06 (7412 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
406 Michael Slusarz State ⇒ Resolved
 
566 Michael Slusarz Comment #6 Reply to this comment
There is still a problem with not being able to delete or edit the
account. that that was first created. Account number two and onwards
works just fine.
Can't reproduce this - I can delete all entries fine.  This issue was 
specifically addressed by my previous changes.  If you have an invalid 
entry in your fetchamail accounts list, you will have to remove it 
manually.
Also saving an account with an empty field for the name does not save
it as "Unnamed" as the code suggests. Instead a blank account is
created.
Fixed.
Related to this the the droplist showing available accounts shows an
extra blank line when no accounts has been defined. The blank line
comes from the tag not being set in the template as shown below:

<loop:accounts>
        <option value="<tag:accounts.i />"><tag:accounts.val /></option>
</loop:accounts>
Fixed.
122 Jan Schneider State ⇒ Assigned
 
425 horde (at) rajidae (dot) se Comment #5 Reply to this comment
In version 1.47 the id set by this line

$fm_account->setValue('id', $id, $to_edit); get overwritten by



is overwritten by the parameter loop. To solve it move the line so 
that is is under this block:

foreach ($fetchmail->getParameterList() as $val) {

         $fm_account->setValue($val, Util::getFormData('fm_' . $val), 
$to_edit);

     }



The extra line in the empty account droplist can be fixed by moving the line

$t->set('accounts', $accountsval);

outside of the for block it is inside now.
114 horde (at) rajidae (dot) se Comment #4 Reply to this comment
Fixed in HEAD.
There is still a problem with not being able to delete or edit the 
account. that that was first created. Account number two and onwards 
works just fine.



Also saving an account with an empty field for the name does not save 
it as "Unnamed" as the code suggests. Instead a blank account is 
created.



Related to this the the droplist showing available accounts shows an 
extra blank line when no accounts has been defined. The blank line 
comes from the tag not being set in the template as shown below:



<loop:accounts>

        <option value="<tag:accounts.i />"><tag:accounts.val /></option>

</loop:accounts>
194 Michael Slusarz Comment #3
State ⇒ Resolved
Assigned to Michael Slusarz
Reply to this comment
Fixed in HEAD.
433 horde (at) rajidae (dot) se Comment #2 Reply to this comment
The problem with checkboxes not beeing saved has to do with the 
if-flag not being set in template set function.



Setting the if-flag to true as below fixes the checkbox problem:

$t->set('fmonlynew', $fm_account->getValue('onlynew', $to_edit), true);

$t->set('fmmarkseen', $fm_account->getValue('markseen', $to_edit), true);

$t->set('fmdel', $fm_account->getValue('del', $to_edit), true);

$t->set('fmloginfetch', $fm_account->getValue('loginfetch', $to_edit), true);



The empty account names has to do with the default value not being set 
correctly on the following line:

$id = Util::getFormData('fm_id', _("Unnamed"));
583 horde (at) rajidae (dot) se Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Cannot correctly save or edit Fetchmail accounts
Queue ⇒ IMP
State ⇒ Unconfirmed
Reply to this comment
The first fetchmailaccount that is created cannot be deleted or edited.



Checkbox values are not saved or set in template.



The default "Unnamed" value is never set as id when saving an account 
where no name has been given. This means it is possible to save an 
account without a name.

Saved Queries