[Sites plugin] Bug when import CSV file



  • Hi!
    I have installed Fog 1.5.8 with the Sites plugin.
    I have detected an error when I try to import a CSV hosts file. Most of the time the server gives a 500 error code when the file is imported, and when it doesn’t give an error the site is not assigned correctly.

    I was able to solve the error editing the file /var/www/html/fog/lib/plugins/site/hooks/addsitehost.hook.php decreasing the value assigned to the insertIndex variable in lines 372 and 374 by 1 and modifying lines 372 and 374 by this code:

    self::getClass('SiteHostAssociation')
        ->set('hostID', $arguments['Host']->get('id'))
    

  • Developer

    @iteixido Thanks for the report and as well thanks to @Fernando-Gietz for fixing the site plugin so quickly. I just merged the fix into dev-branch.


  • Developer

    @iteixido I will fix it as soon as possible


Log in to reply
 

319
Online

7.0k
Users

14.2k
Topics

134.4k
Posts