We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45767
    • 13 Posts
    After adding an Image to the gallery the thumbnail is the minishop standard image.

    Here are some screens to show what the problem is:

    Editing a product:
    http://gyazo.com/b72cc85bf2f451505fb5b3a008c5b369

    Display on live website:
    http://gyazo.com/ef074a789489d8e5d6a7696803845fc9

    I've cleared cache's, flushed sessions. reuploaded, renammed, tried different files even ones that have worked on another site that i use minishop on and nothing seems to be working.
      • 45767
      • 13 Posts
      Done some more digging today into the issue as this is the only thing left I need to do now until it goes live.

      In the msGallery snippet i've located the problem area, or atleast I think;
      else {
      		if (empty($outputSeparator)) {$outputSeparator = "\n";}
      
      		$output = implode($outputSeparator, $output);
      
      		if (!empty($tplOuter) && !empty($output)) {
      echo "<pre>";
      print_r($images);
      echo "</pre>";
      			$arr = array_shift($images);
      			$arr['rows'] = $output;
      echo "<pre>";
      var_dump($output);
      echo "</pre>";
      			$output = $pdoFetch->getChunk($tplOuter, $arr);
      		}
      		elseif (empty($output)) {
      			$output = !empty($tplEmpty)
      				? $pdoFetch->getChunk($tplEmpty)
      				: '';
      		}



      it seems as though the $output variable is technically empty; the var_dump brings this
      string(298) "
      	
      
      		
      	
      
      "


      Any ideas on why this is happening?

      Thanks, Ross.
        • 3109 ☆ A M B ☆
        • 894 Posts
        Does the image have the right path on the live website? Any errors in DevTools or MODX Error Log? Check those first.
          Benjamin Marte
          Interactive Media Developer
          Follow Me on Twitter | Visit my site | Learn MODX
          • 45767
          • 13 Posts
          If i click the image it takes me right to it, so the right is correct on the <a href> but the <img src> is wrong:

          <a rel="fancybox" href="/ebstarsecurity.co.uk/3/cfb91aa0a7c447371a107d377976e483467bddd0.jpg" target="_blank">
          		<img src="/assets/components/minishop2/img/web/ms2_medium.png" width="360" height="270" alt="" title="" id="mainImage" />
          	</a>


          Just checked the Error Log (probably should have done this before posting to add additional info):
          [2014-01-13 11:29:57] (ERROR @ /ebstarsecurity.co.uk/assets/components/minishop2/connector.php) Could not generate thumbnail for "/ebstarsecurity.co.uk/assets/images/products/4/cfb91aa0a7c447371a107d377976e483467bddd0.jpg". Array
          (
              [0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216
              [1] => setCacheDirectory() starting with config_cache_directory = "/home/sites/ebstarsecurity.co.uk/public_html/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919
              [2] => setting config_cache_directory to realpath(/home/sites/ebstarsecurity.co.uk/public_html/core/cache/phpthumb) = "/home/sites/ebstarsecurity.co.uk/public_html/core/cache/phpthumb" in file "phpthumb.class.php" on line 947
              [3] => setSourceFilename(/home/sites/ebstarsecurity.co.uk/public_html/ms_4kSr23) set $this->sourceFilename to "/home/sites/ebstarsecurity.co.uk/public_html/ms_4kSr23" in file "phpthumb.class.php" on line 243
              [4] =>   file_exists() = 0 in file "phpthumb.class.php" on line 1101
              [5] => is_executable() = 0 in file "phpthumb.class.php" on line 1102
              [6] => using ImageMagick path from `which convert` (/usr/bin/convert) in file "phpthumb.class.php" on line 1121
              [7] => ImageMagick version checked with "convert --version" in file "phpthumb.class.php" on line 1148
              [8] => ImageMagick did not return recognized version string (Version: ImageMagick 6.8.3-6 2013-03-15 Q16 http://www.imagemagick.org
          Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
          Features: DPC OpenMP Modules
          Delegates: bzlib fontconfig freetype gslib jng jp2 jpeg lcms pango png ps rsvg tiff wmf x xml zlib) in file "phpthumb.class.php" on line 1154
              [9] => ImageMagick convert --version says "Unknown" in file "phpthumb.class.php" on line 1157
              [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 "90" in file "phpthumb.class.php" on line 912
              [14] => !$this->config_allow_src_above_docroot therefore setting "/home/sites/ebstarsecurity.co.uk/public_html/ms_4kSr23" (outside "/var/www/html") to null in file "phpthumb.class.php" on line 1066
              [15] => $this->sourceFilename set to "" in file "phpthumb.class.php" on line 813
              [16] => phpThumb() v1.7.9-200712090829
          
          "" does not exist in file "phpthumb.class.php" on line 3647
              [17] => setCacheDirectory() starting with config_cache_directory = "/home/sites/ebstarsecurity.co.uk/public_html/core/cache/phpthumb" in file "phpthumb.class.php" on line 919
              [18] => setting config_cache_directory to realpath(/home/sites/ebstarsecurity.co.uk/public_html/core/cache/phpthumb) = "/home/sites/ebstarsecurity.co.uk/public_html/core/cache/phpthumb" in file "phpthumb.class.php" on line 947
              [19] => !$this->config_allow_src_above_docroot therefore setting "/home/sites/ebstarsecurity.co.uk/public_html/ms_4kSr23" (outside "/var/www/html") to null in file "phpthumb.class.php" on line 1066
              [20] => SetCacheFilename() _src set from md5($this->sourceFilename) "" = "d41d8cd98f00b204e9800998ecf8427e" in file "phpthumb.class.php" on line 3077
              [21] => SetCacheFilename() _par set from md5(_bg000000_farC_zc1_h90_w120_dpi150_q90) in file "phpthumb.class.php" on line 3110
              [22] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2897
              [23] => GetImageSize("") failed in file "phpthumb.class.php" on line 2920
              [24] => $this->useRawIMoutput=false because "bg" is set in file "phpthumb.class.php" on line 1226
              [25] => $this->useRawIMoutput=false after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
              [26] => ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1279
              [27] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2927
              [28] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2876
              [29] => SetOrientationDependantWidthHeight() setting w="120", h="90" in file "phpthumb.class.php" on line 2892
              [30] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 2979
              [31] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3229
              [32] => $this->useRawIMoutput=false because "bg" is set in file "phpthumb.class.php" on line 1226
              [33] => $this->useRawIMoutput=false after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
              [34] => ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1279
              [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
          )



          I am using a domain reference at the moment: http://217.199.187.68/ebstarsecurity.co.uk/ could this be a problem?
            • 3109 ☆ A M B ☆
            • 894 Posts
            Can you post your gallery call and your tpls? Not sure if the domain thing can be the issue but phpthumb is complaining about something so once that is sorted we can see if the domain is the problem.
              Benjamin Marte
              Interactive Media Developer
              Follow Me on Twitter | Visit my site | Learn MODX
              • 45767
              • 13 Posts
              Gallery tpls are all standard:
              .row
              <div class="span2 col-md-2">
              	<a href="[[+360x270:default=`[[+url]]`]]" class="thumbnail" data-image="[[+url]]">
              		<img src="[[+120x90]]" alt="" title="[[+name]]" width="120" height="90">
              	</a>
              </div>


              .outer
              <div id="msGallery">
              	<a rel="fancybox" href="[[+url:default=`/assets/components/minishop2/img/web/ms2_big.png`]]" target="_blank">
              		<img src="[[+360x270:default=`/assets/components/minishop2/img/web/ms2_medium.png`]]" width="360" height="270" alt="" title="" id="mainImage" />
              	</a>
              	<div class="row">
              		[[+rows]]
              	</div>
              </div>


              .empty
              <div id="msGallery">
              	<img src="[[++assets_url]]components/minishop2/img/web/ms2_medium.png" width="360" height="270" alt="no photo" title="" />
              </div>



              Just installed it on another domain I have on the same hosting and it seems to work fine; leads me to believe its a domain reference thing, although I can click the picture and it takes me to where it's located. Blagging my head a little bit.