We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36675
    • 56 Posts
    Hi,

    experiencing a rather big problem here.

    I have set a galleryItem TV for a large group of resources.

    I had chosen and cropped pictures for all of these.

    But today they were all wiped clean (except one).

    Is this a bug? Is there a way I can stop this from happening again?

    Have recently updated to Revo 2.2, have newest gallery version, developing on an OSX (snow leopard) MAMP (2.0.3)


    (initially posted in the wrong forum. removed it, and reposted here. sorry about that) [ed. note: jorgeca last edited this post 14 years, 7 months ago.]
      • 3749
      • 24,544 Posts
      Did you look in the DB to see if they are really gone?


      ---------------------------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36675
        • 56 Posts
        Thanks for the reply!

        I spent the last hour scouring the database.

        Am I right that the TVs are located in _site_tmplvar_contentvalues ?

        I looked for the specific tmplvarid, and discovered they are all still there. Good call!

        However, the problem seem to be that the values have been altered (no idea how or why).

        The one that works looks like, as you probably know, this
        {"gal_id":156,"gal_name":"akb1.jpg","gal_filename":"9/156.jpg","gal_description":null,"gal_mediatype":"image","gal_url":null,"gal_createdon":"2012-02-01 20:55:32","gal_createdby":1,"gal_active":1,"gal_duration":"","gal_streamer":null,"gal_watermark_pos":"tl","gal_image_width":170,"gal_image_height":170,"gal_image_type":2,"gal_src":"/modx/assets/components/gallery/files/9/156.jpg","gal_orig_width":1891,"gal_orig_height":1891,"gal_album":"9","gal_watermark-text":"","gal_watermark-text-position":"BL","gal_other":"","gal_rotate":0,"gal_sizer":"9","gal_cropCoords":"","gal_cropTop":0,"gal_cropRight":0,"gal_cropBottom":0,"gal_cropLeft":0}


        While the rest, that suddenly stopped working, look like this (included the three different variants of altered values):

        {"gal_id":87
        
        {"gal_src":false}
        
        {"gal_src":0


        As you can see, the values have more or less been "stripped". Some of the have lost the closing "}", some have been changed to false src or 0 src.

        So at some point, these changes have occurred. Although I am uncertain as to when, why and how.
          • 36675
          • 56 Posts
          Software details

          modx Revolution 2.2.0 pl2 traditional
          MAMP 2.0.3
          Apache Version Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
          PHP Version 5.3.6
          MySQL client version: 5.5.9
          PHP addon: mysql
            • 36675
            • 56 Posts
            I wonder if this might be linked to a PHP script I installed.

            Its called adaptive images, and runs via the .htaccess file
              • 3749
              • 24,544 Posts
              You're right about which table it is. It's hard to believe that the adaptive images script would do it unless it accesses that particular DB table, which seems pretty unlikely.

              OTOH, I can't think of anything that would truncate all the values in that table. I'm afraid a bug in Gallery would be the most likely cause, or some kind of hiccup in the database server. You could try repairing that table in PhpMyAdmin. At this point, it can't hurt.


              ---------------------------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
              MODX info for everyone: http://bobsguides.com/modx.html
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 36675
                • 56 Posts
                Thanks.

                Actually, it happened again in a different part of the project. I added completely new galleryItem TVs as a part of an Articles call, and one of the items in the table got truncated right off the bat.

                Hard to say if its Gallery, Revo 2.2 or the php script (supposed to be unintrusive).

                I am approaching first delivery to my client, so I am starting to sweat a little. Basically I could not pass this over to client should this behaviour continue.

                I have submitted a new issue on github for now.