We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12491
    • 90 Posts
    [2011-10-25 00:17:52] (ERROR @ /index.php) SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`content`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override` FROM `modx_site_content` AS `modResource` WHERE ( modResource.parent IN (326,346,333,387,412,334,373,417,468,479,481,483) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`isfolder` = 0 ) ORDER BY publishedon DESC LIMIT 1


    Errors are on a live site, help would be very appreciated [ed. note: hurby last edited this post 15 years ago.]
      Sommige mensen hebben aan een half woord genoeg
      • 22303 MODX Staff
      • 10,725 Posts
      This is not an error; you have left a
      &debug=`1`
      property in a getResources call somewhere in your site.
        • 12491
        • 90 Posts
        Checked the db and sources of the site but there's no &debug=`1` ,
        In the snippet general properties it's off.

          Sommige mensen hebben aan een half woord genoeg
          • 12491
          • 90 Posts
          Could it have something to do with db cashing?
          When the website is completely cashed the mentioned error doesn't appear.
          But after editing any resource the cache gets completely rebuild incl pphpthumbof cache.

          In general there's something wrong with my approach to Modx.

          A lot of talk and code now i'm sorry...

          Main problems i experience are with image tv's , gallery custom tv's & cashing

          First the tv's:

          With the gallery custom tv;
          images get processed everytime a page get visited, i believe they are not cashed,
          besides that you can;t use more then one per resource in the manager this is buggy.
          Using phphumbof in combination with a custom gallery tv doesn't work.
          While with Gallery they do.

          So for single images i now use a normal image tv ,
          but here users have to get full access to files, giving a extra filemanager_path value to the user doesn't fix this.

          And the biggest problem:

          Phpthumb is generating error's like this first time a page is visited

           [2011-10-25 15:48:59] (ERROR @ /var/www/clients/client3/web284/web/core/model/phpthumb/phpthumb.class.php : 3210) PHP warning: file_get_contents(/var/www/clients/client3/web284/web/{"gal_src":false}): failed to open stream: No such file or directory
          [2011-10-25 15:48:59] (ERROR @ /index.php) [phpThumbOf] Could not generate thumbnail: {"gal_src":false} - Debug: Array
          (
              [0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216
              [1] => setCacheDirectory() starting with config_cache_directory = "/var/www/clients/client3/web284/web/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919
              [2] => setting config_cache_directory to realpath(/var/www/clients/client3/web284/web/core/cache/phpthumb) = "/var/www/clients/client3/web284/web/core/cache/phpthumb" in file "phpthumb.class.php" on line 947
              [3] => setCacheDirectory() starting with config_cache_directory = "/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 919
              [4] => setting config_cache_directory to realpath(/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache) = "/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947
              [5] => setSourceFilename({"gal_src":false}) set $this->sourceFilename to "{"gal_src":false}" in file "phpthumb.class.php" on line 243
              [6] => skipping CleanUpCacheDirectory() set to purge (3,000.0 days; 10,000.00MB; 10,000 files) in file "phpthumb.class.php" on line 652
              [7] =>   file_exists() = 0 in file "phpthumb.class.php" on line 1101
              [8] => is_executable() = 0 in file "phpthumb.class.php" on line 1102
              [9] => ImageMagickThumbnailToGD() aborting because cannot find convert in $this->config_imagemagick_path (), and `which convert` returned (/usr/bin/convert) in file "phpthumb.class.php" on line 1131
              [10] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 884
              [11] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 895
              [12] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 902
              [13] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 912
              [14] => $this->sourceFilename set to "/var/www/clients/client3/web284/web/{"gal_src":false}" in file "phpthumb.class.php" on line 813
              [15] => phpThumb() v1.7.9-200712090829
          
          "/var/www/clients/client3/web284/web/{"gal_src":false}" does not exist in file "phpthumb.class.php" on line 3647
              [16] => setCacheDirectory() starting with config_cache_directory = "/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 919
              [17] => setting config_cache_directory to realpath(/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache) = "/var/www/clients/client3/web284/web/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947
              [18] => SetCacheFilename() _src set from md5($this->sourceFilename) "/var/www/clients/client3/web284/web/{"gal_src":false}" = "3d5ea3f6f2acafcf9ff2ce689da41555" in file "phpthumb.class.php" on line 3077
              [19] => SetCacheFilename() _par set from md5(_farC_zc1_h200_w200_dpi150_q75) in file "phpthumb.class.php" on line 3110
              [20] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2897
              [21] => GetImageSize("/var/www/clients/client3/web284/web/{"gal_src":false}") failed in file "phpthumb.class.php" on line 2920
              [22] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
              [23] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1865
              [24] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2927
              [25] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2876
              [26] => SetOrientationDependantWidthHeight() setting w="200", h="200" in file "phpthumb.class.php" on line 2892
              [27] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 2979
              [28] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3229
              [29] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
              [30] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1865
              [31] => starting ImageCreateFromFilename(/var/www/clients/client3/web284/web/{"gal_src":false}) in file "phpthumb.class.php" on line 3152
              [32] => empty $filename or GetImageSize(/var/www/clients/client3/web284/web/{"gal_src":false}) failed in file "phpthumb.class.php" on line 3201
              [33] => Populating $rawimagedata in file "phpthumb.class.php" on line 3209
              [34] => cannot fopen(/var/www/clients/client3/web284/web/{"gal_src":false}) in file "phpthumb.class.php" on line 3212
              [35] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3278
              [36] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3330
              [37] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3332
              [38] => phpThumb() v1.7.9-200712090829
          
          Unknown image type identified by "" () in SourceImageToGD()[3444] in file "phpthumb.class.php" on line 3647
              [39] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323
          )



          But:
          after the first time loading this error disappears.

          In general cashing and images for me are the main bottle necks.
          Cashing is nice but as said every edit to a resource will set the cache to rebuild resulting in all these error's and reprocessing of all images.

          On another side, i have a similar problem with cashing:

          http://www.edart.nl/schilderijen,-ansichtkaarten-en-giclee-prints/werken.html?key=tags&tag=dieren

          i use this

          [[!getResourcesTag?  
            &elementClass=`modSnippet`  
            &tpl=`product-intro3`
            &parents=`[[UltimateParent? &topLevel=`3`]]`  
            &limit=`30`  
            &includeContent=`0`  
            &showHidden=`0`  
            &hideContainers=`1`
            &pageVarKey=`page`
            &processTVs=`1`
            &includeTVs=`1`
            &processTVList=`Image 1,Bestelnummer`
            &includeTVList=`Image 1,Bestelnummer`
          ]]


          and in the chunck this:

          <div class="productintrotype3">
          	<h2 class="productintrotype3"><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle:ellipsis=`10`]]</a></h2>	 
              
          							<div class="entry-content">
          <div class="productimage">
          
          <a href="[[~[[+id]]]]" title="[[*pagetitle]]">
          <img src="[[++site_url]]assets/components/gallery/files/[[+tv.Image 1:phpthumbof`w=102&h=102`]]"></a> 
          
          </div> 
          <br />
             <b>Bestelnummer</b>: [[+tv.Bestelnummer]]<br />
          <div class="clear"></div>
           
          							</div><!-- end .entry-content -->
          					</div>
          


          it generates this error:

          [2011-10-25 15:14:02] (ERROR @ /var/www/clients/client3/web235/web/core/cache/includes/elements/modsnippet/4.include.cache.php : 384) PHP warning: in_array() expects parameter 2 to be array, boolean given


          or this example

          http://www.edart.nl/schilderijen,-ansichtkaarten-en-giclee-prints/werken/bibberhondje.html

          Here proccessing time of the page is above 5 sec, after cashing it's fast.

          But again editing something will resort in cash being rebuild including phpthumbof cashe images.

          Hope someone will help me get a grip on these things.


            Sommige mensen hebben aan een half woord genoeg
            • 22303 MODX Staff
            • 10,725 Posts
            It definitely could be a problem with the cache_db setting if you have that enabled. I would recommend disabling it and waiting to use it until you upgrade to a 2.2.x release in the future. Some significant bugs were recently identified and fixed with the db caching features in xPDO which could likely be the source of your issue.
              • 12491
              • 90 Posts
              Thanx for your help!

              Phpthumb errors seem to be solved by setting the db cache setting to No.

              but...This error persists

              [2011-10-25 17:43:20] (ERROR @ /index.php) SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`content`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override` FROM `modx_site_content` AS `modResource` WHERE  ( modResource.parent IN (405,407,406,413) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`isfolder` = 0 )  ORDER BY publishedon DESC LIMIT 4 



              On the other website the error is still there
              a visit to:

              http://www.edart.nl/schilderijen,-ansichtkaarten-en-giclee-prints/werken.html?key=tags&tag=dieren

              generates this error

              [2011-10-25 15:14:02] (ERROR @ /var/www/clients/client3/web235/web/core/cache/includes/elements/modsnippet/4.include.cache.php : 384) PHP warning: in_array() expects parameter 2 to be array, boolean given

              Looks like it' has something to do with the new and very cool vars:
              &processTVList
              &includeTVList

              These new functions made loading of this page a lot faster.


                Sommige mensen hebben aan een half woord genoeg
                • 22303 MODX Staff
                • 10,725 Posts
                The "error" is simply a result of the debug property being enabled for a getResources call.

                As for the in_array error, you'll have to provide the calls in order for us to help diagnose the issue.
                  • 12491
                  • 90 Posts


                  Here the call and the output tpl.

                  gr
                  Hurby


                  The snippet call:

                  [[getResourcesTag?  
                    &elementClass=`modSnippet`  
                    &tpl=`product-intro3`
                    &parents=`[[UltimateParent? &topLevel=`3`]]`  
                    &limit=`30`  
                    &includeContent=`0`  
                    &showHidden=`0`  
                    &hideContainers=`1`
                    &pageVarKey=`page`
                    &processTVs=`1`
                    &includeTVs=`1`
                    &processTVList=`Image1,Bestelnummer`
                    &includeTVList=`Image1,Bestelnummer`
                  ]]	



                  Chunck



                  
                  <div class="productintrotype3">
                  	<h2 class="productintrotype3"><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle:ellipsis=`10`]]</a></h2>	 
                             <div class="entry-content">
                                 <div class="productimage">
                                          <a href="[[~[[+id]]]]" title="[[*pagetitle]]"> <img src="[[++site_url]]assets/components/gallery/files/[[+tv.Image1:phpthumbof`w=102&h=102`]]"></a> 
                                 </div> 
                                     <br />
                                         <b>Bestelnummer</b>: [[+tv.Bestelnummer]]
                                      <br />
                                  <div class="clear"></div>
                          </div><!-- end .entry-content -->
                   </div>




                  Error:

                  [2011-11-13 15:24:57] (ERROR @ /var/www/clients/client3/web235/web/core/cache/includes/elements/modsnippet/4.include.cache.php : 384) PHP warning: in_array() expects parameter 2 to be array, boolean given
                    Sommige mensen hebben aan een half woord genoeg
                    • 22303 MODX Staff
                    • 10,725 Posts
                    I think this is a bug in the current release with the processTVs property—see issue #55. Try removing that — it should perform the same as with it since you already limited the TVs being included.