We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7690
    • 166 Posts
    I upload all my photo’s via FTP and than sync it.

    But after resync some photo’s are renamed with an "1" in front of the name.
    So for example:
    I have hello.jpg

    The sync renames it to 1hello.jpg
    and creates a tn_1hello.jpg

    but, the tn_hello.jpg also excist in the db. Therefor when you browser through the gallery, the photo of tn_hello.jpg can’t be found.

    I really don’t know how to fix this.
      • 7923
      • 4,213 Posts
      First try with the v0.6 test version if that works better. I have fixed some bugs in resych in it.

      If you are still having problems, it’s possible that the script is hitting the maximum run time or memory limits that is set to your php installation. Uploading/resynching many pictures at the same time can take alot of time and alot of memory. So try increasing those settings in your php.ini. See MaxiGallery wiki page for more information, especially the part at the top where it says "IMPORTANT NOTE!".


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 7690
        • 166 Posts
        thanks. Took a look at the changes and it’s looking good.

        Can i just overwrite all the files when uploading it?
          • 7923
          • 4,213 Posts
          Yes, overwrite everything..


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 7690
            • 166 Posts
            wow, it works perfectly now. Thanks again!
            The syncen is even faster than ever, so it seems!

            Good job man!
              • 2968
              • 2 Posts
              Gah.

              So, I’ve upgraded to the beta 0.6, and still (with the stock version) my (hosted) server duplicated multiple times any file when I click "resync".

              I found a fix -somewhere- (God forbid I could find it again, damn you Google) where I modified the core files - this allows me to sync perfect, except there’s a minor quirk - it deletes all =exisiting= pics when doing so.

              I’m clearly a PHP idiot, but I can’t for the life of me see why any PHP.ini setting would suddenly make the server do -more- work.

              The files are max 960px wide/long. In this case, it’s barfing after about 150 files or so. Fine, I figure, resync for a second time, right? Then, naturally, it deletes my -first- 150 files.

              So, "hacked" core files works well for files, excepting that I’m clearly running into server timeouts (and can’t edit the core PHP.ini file on my hosted site). 0.6 files, unmodified, results in an explosion of duplicate filenames.

              I give up and seek the help of you smart, smart people...:)
                • 22427
                • 793 Posts
                The following thread may help you out of your problem:
                http://modxcms.com/forums/index.php/topic,40443.msg243986.html#msg243986
                Regards
                ottogal
                  • 2968
                  • 2 Posts
                  THANK YOU, god, I couldn’t find that page again for the life of me...

                  However, =those= are the changes I made to the PHP file, and now, if (say) the first 150 or so successfully enter into the DB, then when I try to add the remaining, it deletes the former.

                  So, I’ve got it working 90% there for most of my folders, but this delete-when-synching-of-existing-files is a bit, well, annoying.

                  Thoughts? Or did I miss a crucial step from the previous thread in my haste and I’m being an idiot?


                  *****

                  K, I totally lied... The posts with the edited source was for the 0.6 beta, so it must have been a very, very similar thread that I also seem unable to find. I read the PHP but not your note closely enough (serves me right on a Sunday morning).

                  I re-loaded the 0.52 release, edited the PHP as per your instructions, and created the Orig folder (MUCH better idea than screwing with original files in the same folder, IMHO).

                  This -seems-, at first blush, to do what I want, namely, for when it barfs on a giant upload to simply require me to do it a couple times ’till it gets input into the DB.

                  Testing away...


                  ******

                  Well, it -seems- to have done the trick, with the "downgraded" version, for what it’s worth... It actually took a couple tries (for some reason it copied the 001 file but didnt’ make a thumb, and stopped at about 115. After that, resynching did nothing. I reuploaded, recreated the numbered folder, and it seemed to work)

                  Now I’ve gotta figure out what the hell I did to Firefox to make it so that the manager pages no longer are loading when logged in... To the search window!

                  Also, note that the line numbers on your previous page are off, at least on the build I downloaded, by about 5 lines.