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

How to fix number image

Scheduled Pinned Locked Moved
General Problems
3
9
864
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.
  • K
    kduy1508
    last edited by Jun 8, 2020, 4:02 AM

    2020-06-08_10-37-00.bmp

    I deleted the image, After I created a new image but the number of photos did not decrease in order. Please help me to fix it. Thanks for all!

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Jun 8, 2020, 5:40 AM

      @kduy1508 I am not sure if you are aware of hoy databases work in general!? You have an id to identify entries and those need to be unique. So the technique used by almost all databases is to simply use a counter that keeps increasing no matter what. Even if you delete an entry the Id counter won’t go back.

      If you really keen and know databases well you can take a dump, drop, manually edit the dump in several places to match ids and references and then let it re-create the whole lot from that modified dump file.

      There is no good reason to do this I reckon. Why do you worry about those numbers??

      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
      • K
        kduy1508
        last edited by Jun 8, 2020, 7:21 AM

        Beacause, When i delete the images, the numbers of image did not decrease in order is non-aesthetic numbers

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Jun 8, 2020, 7:27 AM

          @kduy1508 Did you actually read and understand my last answer?

          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

          K 1 Reply Last reply Jun 8, 2020, 7:36 AM Reply Quote 0
          • K
            kduy1508 @Sebastian Roth
            last edited by Jun 8, 2020, 7:36 AM

            @Sebastian-Roth I wanted After deleting the image, the numbers will be recreated in order.

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by Jun 8, 2020, 8:29 AM

              @kduy1508 FOG is open source und so you are free to modify it the way you want it to be. Go for it.

              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

              K 1 Reply Last reply Jun 9, 2020, 3:06 AM Reply Quote 0
              • K
                kduy1508 @Sebastian Roth
                last edited by Jun 9, 2020, 3:06 AM

                @Sebastian-Roth Please help me to path the fix number of image

                1 Reply Last reply Reply Quote 0
                • W
                  Wayne Workman
                  last edited by Wayne Workman Jun 8, 2020, 9:22 PM Jun 9, 2020, 3:21 AM

                  @kduy1508 I wrote a script that fixes this, it will re-number the image IDs. Link is below. Very happy to provide this to you.
                  https://github.com/FOGProject/fog-community-scripts/tree/master/RenumberImageIDs

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

                  K 1 Reply Last reply Jun 9, 2020, 4:34 AM Reply Quote 1
                  • K
                    kduy1508 @Wayne Workman
                    last edited by Jun 9, 2020, 4:34 AM

                    @Wayne-Workman
                    Can you give me a path to insert this code? Many Thanks!

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    1 / 1
                    • First post
                      6/9
                      Last post

                    151

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project