-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template parsing problems in parameterizable data sources #461
Comments
…as not defined. Fix for issue sympa-community#461.
Hi @junior013, Could you please check if this patch will fix the problem you reported? |
Hello @ikedas , Thank you! It works - with simple template |
@junior013, what is empty line? i couldn't figure out what happened. |
@ikedas , Templates like generates empty lines in first 2 line, end errors But if I omit the newline-s in the template, Its OK: Maybe the parser could clean up any empty lines - if someone miss it. |
@ikedas , I still get errors from the automatic regular refresh of the list members :( Is it another code then the manual sync? |
@junior013, I understand of empty lines. It’s unhandy things with Template Toolkit. On errors with task_manager: have you restarted Sympa services? |
No, I'm not. Sorry! Now it seems OK. (But, I commented another related problem in the code) |
Template parsing problems in parameterizable data sources #461
the fix will be included in the next reease in December. If you have no more problem on this issue, please close it. Thanks for reporting bug! |
Thank you, it seems OK. I close it. |
Version
6.2.24
Installation method
deb (Ubuntu 18.04 LTS, bionic repo)
Expected behavior
Import members from predefined LDAP with filter as a parameter
Actual behavior
Additional information
Template V1:
filter (&(cn=*)[% param.0 %])
log:
wwsympa[6381]: err main::#1606 > main::do_review#4842 > Sympa::List::on_the_fly_sync_include#6929 > Sympa::List::sync_include#6581 > Sympa::List::_load_list_members_from_include#5783 > Sympa::List::_include_users_ldap#5059 > Sympa::DatabaseDriver::LDAP::do_operation#204 Unable to perform LDAP operation: Bad filter
wwsympa[6381]: err main::#1606 > main::do_review#4842 > Sympa::List::on_the_fly_sync_include#6929 > Sympa::List::sync_include#6581 > Sympa::List::_load_list_members_from_include#5783 > Sympa::List::_include_users_ldap#5071 LDAP search (single level) failed: (89) Bad filter (searching on server X:389; suffix X; filter (&(cn=*)[% param.0 %]); attrs: mail)
Template V2:
[% SET filter = '' %]
[% IF param.defined AND param.defined(0); filter = param.0; ELSE; filter = 'cn=*'; END %]
filter [% filter %]
log:
wwsympa[6381]: info Sympa::List::_load_include_admin_user_file() Bad line "[% SET filter = '' %]#012" in /etc/sympa/data_sources/ad_users.incl
wwsympa[6381]: info Sympa::List::_load_include_admin_user_file() Bad entry "[% SET filter = '' %]" for key "ALL", paragraph "include_ldap_query" in /etc/sympa/data_sources/ad_users.incl
wwsympa[6381]: info Sympa::List::_load_include_admin_user_file() Bad line "[% IF param.defined AND param.defined(0); filter = param.0; ELSE; filter = 'cn=*'; END %]#012" in /etc/sympa/data_sources/ad_users.incl
wwsympa[6381]: info Sympa::List::_load_include_admin_user_file() Bad entry "[% IF param.defined AND param.defined(0); filter = param.0; ELSE; filter = 'cn=*'; END %]" for key "include_ldap_query", paragraph "include_
Looks like template engine not processing directives, or the config include parser tries parsing the file before the template engine?
The text was updated successfully, but these errors were encountered: