Summary | Undefined index: link_all_attachments |
Queue | IMP |
Queue Version | 4.1.5 |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | |
Requester | barcones (at) attsu (dot) net |
Created | 10/05/2007 (6557 days ago) |
Due | |
Updated | 10/29/2007 (6533 days ago) |
Assigned | |
Resolved | 10/05/2007 (6557 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
in Horde (a problem with configswitch tags) a while ago, though it's
possible the fix is only in Horde 3.2. In any case this is not a bug
in IMP. And you don't need to write developers privately, we get all
bug correspondence whether the bug is closed or not.
(also, note that if you set error_reporting to the recommended values
for production you won't ever see this notice, so I don't think it's
important to put a hack into IMP to work around the fact that some
Horde versions might not set this correctly.)
'false' to 'true' using Web configuration interface, then
'link_all_attachments' obviously appears in the config file. However,
when it's switched back from 'true' to 'false', 'link_all_attachments'
disappears from the config file along with the corresponding setting
in the configuration form. I guess the fact that the setting is
conditional may account for this.
<configswitch name="link_attachments" desc="Should we allow the users to
send attachments as links?">true
<case name="true" desc="Yes">
<configboolean name="link_all_attachments" desc="Should IMP send all
attachments as links? If this is false the user will be given the option
to link any attachment.">false</configboolean>
<configboolean name="link_attachments_notify" desc="Should IMP send an
e-mail notification to the sender when the first person attempts to
download the linked attachment? This notification will include a link
to delete the file.">true</configboolean>
</case>
<case name="false" desc="No" />
</configswitch>
If all this works differently in your setup (of the same IMP and Horde
versions), I give up. Anyway I would still say that compose.inc is
worth fixing, or - if one prefers - changing, improving or whatever.
attachment
linking stuff enabled.
my dev install and personal site with this disabled, and the
configuration is correctly generated with link_all_attachments =
false.
for reproducing the problem.
1. Start with an installation of Horde 3.1.5 and IMP 4.1.5. Both
products can (or even should) be more or less set up.
2. Reconfigure Horde for automatic login so that it will be usable in
the next steps.
3. Delete conf.php for IMP.
4. Go to Administration -> Setup menu and enter IMP configuration
(it's status should be displayed as missing at this point).
5. Switch to Compose tab, change 'Should we allow the users to send
attachments as links?' to no. Change nothing else. Generate Mail
Configuration.
This is the config I get by following these steps:
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: imp/config/conf.xml,v 1.53.2.18 2007/05/03 15:24:51 chuck Exp $
$conf['utils']['gnupg_keyserver'] = array('pgp.mit.edu');
$conf['utils']['gnupg_timeout'] = '10';
$conf['menu']['apps'] = array();
$conf['user']['select_sentmail_folder'] = false;
$conf['user']['allow_resume_all_in_drafts'] = false;
$conf['user']['allow_folders'] = true;
$conf['user']['allow_resume_all'] = false;
$conf['user']['allow_view_source'] = true;
$conf['user']['alternate_login'] = false;
$conf['user']['redirect_on_logout'] = false;
$conf['server']['change_server'] = false;
$conf['server']['change_port'] = false;
$conf['server']['change_protocol'] = false;
$conf['server']['change_smtphost'] = false;
$conf['server']['change_smtpport'] = false;
$conf['server']['server_list'] = 'none';
$conf['server']['sort_limit'] = '0';
$conf['server']['cache_folders'] = false;
$conf['server']['cache_msgbody'] = false;
$conf['mailbox']['show_attachments'] = false;
$conf['mailbox']['show_preview'] = false;
$conf['mailbox']['show_xpriority'] = false;
$conf['fetchmail']['show_account_colors'] = false;
$conf['fetchmail']['size_limit'] = '4000000';
$conf['msgsettings']['filtering']['words'] = './config/filter.txt';
$conf['msgsettings']['filtering']['replacement'] = '****';
$conf['spam']['reporting'] = false;
$conf['notspam']['reporting'] = false;
$conf['msg']['prepend_header'] = true;
$conf['msg']['append_trailer'] = true;
$conf['compose']['allow_cc'] = true;
$conf['compose']['allow_bcc'] = true;
$conf['compose']['allow_receipts'] = true;
$conf['compose']['special_characters'] = true;
$conf['compose']['use_vfs'] = false;
$conf['compose']['link_attachments'] = false;
$conf['compose']['add_maildomain_to_unexpandable'] = false;
$conf['compose']['attach_size_limit'] = '0';
$conf['compose']['attach_count_limit'] = '0';
$conf['hooks']['vinfo'] = false;
$conf['hooks']['signature'] = false;
$conf['hooks']['trailer'] = false;
$conf['hooks']['fetchmail_filter'] = false;
$conf['hooks']['mbox_redirect'] = false;
$conf['hooks']['mbox_icon'] = false;
$conf['hooks']['spam_bounce'] = false;
$conf['maillog']['use_maillog'] = true;
$conf['tasklist']['use_tasklist'] = true;
$conf['notepad']['use_notepad'] = true;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
As you can see, there is no 'link_all_attachments' option generated,
which still makes sense as this 'link_attachments' is disabled anyway.
What seems inconsistent is that the compose window's code tries to
check 'link_all_attachments' option value even though
'link_attachments' is false.
I can send a patch for compose.inc if the problem should be confirmed.
attachment
linking stuff enabled.
dev install and personal site with this disabled, and the
configuration is correctly generated with link_all_attachments = false.
out and back in after saving it.
I happened to experience the same problem as the one mention in this
ticket and I believe it IS a bug indeed.
There is a code in imp/templates/compose/compose.inc which refers to
$conf['compose']['link_all_attachments'] (lines 527-528):
$show_link_attach = ($conf['compose']['link_attachments'] &&
!$conf['compose']['link_all_attachments']);
$show_save_attach = ((strpos($save_attach, 'prompt') === 0) &&
!$conf['compose']['link_all_attachments']);
However, when you set "Should we allow the users to send attachments
as links?" to No while doing initial configuration (via Web),
$conf['compose']['link_all_attachments'] option is not added to
conf.php at all.
A workaround is to manually add
$conf['compose']['link_all_attachments'] = false;
to conf.php. Contrary to your opinion, looks like a little bug to me.
You obviously did not take into account that not everyone wants this
attachement linking stuff enabled.
State ⇒ Not A Bug
out and back in after saving it.
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Undefined index: link_all_attachments
Queue ⇒ IMP
State ⇒ Unconfirmed
I upgrade to the latest version of IMP (4.1.5.) and now when I compose
a new mail I have this error in logs:
PHP Notice: Undefined index: link_all_attachments in [my relative
path here] /imp/templates/compose/compose.inc on line 528
I upgrade the configuration also.
Sorry for my english ;-)
Thx in advance.