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

    How to fix number image

    Scheduled Pinned Locked Moved
    General Problems
    3
    9
    840
    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

      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

        @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

          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

            @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 Reply Quote 0
            • K
              kduy1508 @Sebastian Roth
              last edited by

              @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

                @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 Reply Quote 0
                • K
                  kduy1508 @Sebastian Roth
                  last edited by

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

                  1 Reply Last reply Reply Quote 0
                  • Wayne WorkmanW
                    Wayne Workman
                    last edited by Wayne Workman

                    @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 Reply Quote 1
                    • K
                      kduy1508 @Wayne Workman
                      last edited by

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

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

                      221

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project