• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

[Sites plugin] Bug when import CSV file

Scheduled Pinned Locked Moved Solved
Bug Reports
3
3
309
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    iteixido
    last edited by iteixido Mar 9, 2020, 11:01 AM Mar 9, 2020, 4:51 PM

    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'))
    
    F 1 Reply Last reply Mar 9, 2020, 5:24 PM Reply Quote 0
    • F
      Fernando Gietz Developer @iteixido
      last edited by Mar 9, 2020, 5:24 PM

      @iteixido I will fix it as soon as possible

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Mar 10, 2020, 10:33 PM

        @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.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          2/3
          Last post

        196

        Online

        12.0k

        Users

        17.3k

        Topics

        155.2k

        Posts
        Copyright © 2012-2024 FOG Project