[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#698840: gosa-plugin-ldapmanager: missing import feature



[Wolfgang Schweer]
> Somehow unsure, but I believe it's smarty/smarty3 related. The old
> code is still shipped with the plugin, but disabled.
> 
> IIRC, uptream lacked manpower to adapt ldif and csv import back
> then; ldif and xls export were ported.

I had a look and ran out of time now, so I post the steps I have taken
here to be able to pick up later.

the LDIF and CSV import feature is currently disabled/commentd out in
the HTML templates.  To enable them, his change need to be done.  I
checked out the source using

  svn co https://oss.gonicus.de/repositories/gosa/trunk/gosa-plugins/ldapmanager

but using the package gosa-plugin-ldapmanager work too.  This is the
first step one need to do:

Index: addons/ldapmanager/contentimport.tpl
===================================================================
--- addons/ldapmanager/contentimport.tpl        (revisjon 21231)
+++ addons/ldapmanager/contentimport.tpl        (arbeidskopi)
@@ -1,10 +1,3 @@
-<font color='red'>Temporary disabled</font>
-<!--
-
-
-
-
-
 {if $type == FALSE || $LDIFError != FALSE}
 <p style="margin-top:5px;">
   {t}The LDIF import plug-in provides methods to upload a set of entries to your running LDAP directory as LDIF. You may use this to add new or modify existing entries. Remember that GOsa will not check your LDIF for GOsa conformance.{/t}
@@ -62,4 +55,3 @@
 </div>
 
 <input type="hidden" name="ignore">
--->
Index: addons/ldapmanager/contentcsv.tpl
===================================================================
--- addons/ldapmanager/contentcsv.tpl   (revisjon 21231)
+++ addons/ldapmanager/contentcsv.tpl   (arbeidskopi)
@@ -1,5 +1,3 @@
-<font color='red'>Temporary disabled</font>
-<!--
 <p>
   {t}The CSV import plug-in provides methods to generate user accounts from a file containing Comma Separated Values. The administrator can decide which columns should be transfered to which attribute. Note that you must have at least the UID, GIVENNAME and SURNAME set.{/t}
 </p>
@@ -122,4 +120,3 @@
   {/if}
 </div>
 <input type="hidden" name="ignore">
--->

Then I created a simple CSV file users.csv with content
'test,Test,Testersen' and tried to import it with columns 1->uid,
2->GivenName, 3->sn.  Starting the import aborted with a popup looking
like this:

  Error

  Post-event hook reported a problem: change_password: Principal does
  not exist while changing password for test@INTERN"..  Password
  change cancelled!

  [Ok]

The apache/error.log file had an entry like this:

  perl: warning: Setting locale failed.
  perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
  perl: warning: Falling back to the standard locale ("C").

I guess some perl program was called with the wrong arguments or
locale.  I installed using the nb_NO.UTF-8 locale, so the en_US.UTF-8
locale is not supposed to be enabled.

Perhaps someone else can pick up the fixing before I find another
spare 30 minutes. :)

-- 
Happy hacking
Petter Reinholdtsen


Reply to: