Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory fusiondirectory
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Service Desk
    • Milestones
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectoryfusiondirectory
  • Issues
  • #3290
Something went wrong while setting issue due date.
Closed
Open
Issue created 10 years ago by bmortier@bmortierMaintainer
  • New related issue

  • New related issue

Cannot run a postCreate Hook by using uid field as parameters

Closed

Cannot run a postCreate Hook by using uid field as parameters

I using a post create hook ( wich work in 1.0.5-dev) for creating home directory on specific server

as argument I put %uid% which corresponding to the uid Field

Argument is used on script side And I see this message

Aug 20 15:45:04 vconsole apache2: FusionDirectory [fd-admin]: (view) error: PHP error: 'uid' was not found in attributes (/usr/share/fusiondirectory/include/class_plugin.inc, line 616)

I have another script for creating mailbox which use the mail field : it works well

(from redmine: issue id 3290, created on 2014-08-20, closed on 2014-08-25)

  • Changesets:
    • Revision 3ef6dbfa by Côme Chilliet on 2014-08-25T09:40:05.000Z:
Fixes #3290 Fixed hook placeholder from other tabs
  • Revision 38fd63c6 by Côme Chilliet on 2014-08-25T09:40:25.000Z:
Fixes #3290 Fixed hook placeholder from other tabs
  • Custom Fields:
    • Bug in version: 1.0.8
  • Uploads:
    • 0001-Fixes-3290-Fixed-hook-placeholder-from-other-tabs.patch

    Tasks

    0
    Cannot read properties of undefined (reading 'workItem')

    Linked items
    0

    Link issues together to show that they're related. Learn more.

    Activity


    • bmortier
      bmortier @bmortier · 10 years ago
      Author Maintainer

      I've just tried with another attribute : homeDirectory : it's works

      (from redmine: written on 2014-08-20)

      By agallavardin on 2017-09-02T15:12:44 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 10 years ago
      Author Maintainer

      Hello,

      can you attach the script you use here

      Thanks

      (from redmine: written on 2014-08-20)

      By bmortier on 2017-09-02T15:12:44 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 10 years ago
      Author Maintainer

      Similar problem for me. When I create a user, I run a shellscript in postcreate user (hook) with the arguments %uid% %sn% %mail% etc etc...

      In the log of my script, all the arguments are empty execpt %uid% which contains the homedir of the user.

      Alex

      (from redmine: written on 2014-08-22)

      By Alex-31 on 2017-09-02T15:12:44 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 10 years ago
      Author Maintainer

      My envirronment: Debian Wheezy 64 bits - Fusiondirectory 1.0.8

      (from redmine: written on 2014-08-22)

      By Alex-31 on 2017-09-02T15:12:44 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 10 years ago
      Author Maintainer

      After a test on FD 1.0.8.1 it seems that the problem is only homeDirectory.

      I use a hook: user, postcreate with this "script": echo "uid: %uid% | last name: %sn% | first name: %givenName% | Home: %homeDirectory%"

      I activated "display errors" and debug level for Shell in the configuration.

      I created a user. Behind the debug output and the PHP errors.


      DEBUG[8] (/usr/share/fusiondirectory/include/class_plugin.inc:callHook():1506) - Execute: 'echo "uid: mylogin | last name: myLastName | first name: myFirstName | Home: "' DEBUG[8] (/usr/share/fusiondirectory/include/class_plugin.inc:callHook():1520) - Result: uid: mylogin | last name: myLastName | first name: myFirstName | Home:: 'echo "uid: mylogin | last name: myLastName | first name: myFirstName | Home: "'


      Oups. Seems like you've catched some kind of bug inside FusionDirectory/PHP. You may want to help us to improve the software stability. If so, please provide some more information below.

      *** FusionDirectory bug report *** FusionDirectory Version: 1.0.8

      Please describe what you did to produce this error as detailed as possible. Can you reproduce this bug using the demo on http://demo.FusionDirectory.org ?

      *** PHP error information ***

      === Error === PHP error: 'homeDirectory' was not found in attributes (/usr/share/fusiondirectory/include/class_plugin.inc, line 616) === /Error ===

      === Trace === Trace[0]:function html_trace File : /usr/share/fusiondirectory/include/php_setup.inc Line : 226 Type : - "'homeDirectory' was not found in attributes"

      Trace[1]:function gosaRaiseError File : Line : Type : - "1024","'homeDirectory' was not found in attributes","/usr/share/fusiondirectory/include/class_plugin.inc","616",array("homeDirectory",array("mylogin","myLastName","myFirstName","","","","","","","","","","","","","","","","","removed","","","","","myFirstName myLastName","","","","",array(),"","uid=fd-admin,ou=people,dc=opensides,dc=be","uid=mylogin,ou=people,dc=opensides,dc=be","default"),"",array())

      Trace[2]:function trigger_error File : /usr/share/fusiondirectory/include/class_plugin.inc Line : 616 Type : - "'homeDirectory' was not found in attributes"

      Trace[3]:class plugin / function tpl_parse_mask File : /usr/share/fusiondirectory/include/class_plugin.inc Line : 761 Type : static "homeDirectory",array("mylogin","myLastName","myFirstName","","","","","","","","","","","","","","","","","removed","","","","","myFirstName myLastName","","","","",array(),"","uid=fd-admin,ou=people,dc=opensides,dc=be","uid=mylogin,ou=people,dc=opensides,dc=be","default")

      Trace[4]:class plugin / function tpl_parse_string File : /usr/share/fusiondirectory/include/class_plugin.inc Line : 1466 Type : static "echo "uid: %uid% | last name: %sn% | first name: %givenName% | Home: %homeDirectory%"",array("mylogin","myLastName","myFirstName","","","","","","","","","","","","","","","","","removed","","","","","myFirstName myLastName","","","","",array(),"","uid=fd-admin,ou=people,dc=opensides,dc=be","uid=mylogin,ou=people,dc=opensides,dc=be","default")

      Trace[5]:class plugin / function callHook File : /usr/share/fusiondirectory/include/class_plugin.inc Line : 1404 Type : static CLASS: user,"POSTCREATE",array("mylogin")

      Trace[6]:class plugin / function handle_hooks File : /usr/share/fusiondirectory/include/class_plugin.inc Line : 1432 Type : method "POST","add",array("mylogin")

      Trace[7]:class plugin / function handle_post_events File : /usr/share/fusiondirectory/plugins/personal/generic/class_user.inc Line : 1057 Type : method "add",array("mylogin")

      Trace[8]:class user / function save File : /usr/share/fusiondirectory/include/class_tabs.inc Line : 357 Type : method

      Trace[9]:class tabs / function save File : /usr/share/fusiondirectory/plugins/admin/users/tabs_user.inc Line : 130 Type : method

      Trace[10]:class usertabs / function save File : /usr/share/fusiondirectory/include/class_management.inc Line : 765 Type : method

      Trace[11]:class management / function saveChanges File : /usr/share/fusiondirectory/plugins/admin/users/class_userManagement.inc Line : 406 Type : method

      Trace[12]:class userManagement / function saveChanges File : /usr/share/fusiondirectory/include/class_management.inc Line : 474 Type : method "save",array(),array("save",array())

      Trace[13]:class management / function handleActions File : /usr/share/fusiondirectory/include/class_management.inc Line : 181 Type : method array("save")

      Trace[14]:class management / function execute File : /usr/share/fusiondirectory/plugins/admin/users/main.inc Line : 47 Type : method

      Trace[15]:function require File : /usr/share/fusiondirectory/html/main.php Line : 332 Type : - "/usr/share/fusiondirectory/plugins/admin/users/main.inc" === /Trace ===

      (from redmine: written on 2014-08-22)

      By Jonathan Swaelens on 2017-09-02T15:12:45 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 10 years ago
      Author Maintainer

      The bug come from the hook "posixAccount". It's the same in 1.0.8 and 1.0.8.1.

      (from redmine: written on 2014-08-24)

      By Jonathan Swaelens on 2017-09-02T15:12:46 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 10 years ago
      Author Maintainer

      Hello,

      applied to 1.0.8.1-fixes and develop

      Cheers

      (from redmine: written on 2014-08-25)

      By bmortier on 2017-09-02T15:12:46 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 10 years ago
      Author Maintainer

      Close issue

      (from redmine: written on 2014-08-25)

      By bmortier on 2017-09-02T15:12:46 (imported from GitLab)

    • bmortier closed 7 years ago

      closed

      By bmortier on 2017-09-02T15:12:47 (imported from GitLab)

    • bmortier added Fixed fusiondirectory-core labels 6 years ago

      added Fixed fusiondirectory-core labels

      By bmortier on 2018-10-09T19:42:35 (imported from GitLab)

    Please register or sign in to reply
    Assignee
    bmortier's avatar
    bmortier
    Assign to
    Labels
    0
    None
    0
    None
      Assign labels
    • Manage project labels

    Milestone
    No milestone
    None
    Due date
    None
    None
    None
    Time tracking
    No estimate or time spent
    Confidentiality
    Not confidential
    Not confidential

    You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

    Lock issue
    Unlocked
    0
    0 Participants
    Reference:

    Menu

    Explore Projects Groups Topics Snippets