17452 Posts in 4473 Topics by 1971 members
|Go to End|
16 July 2008 at 12:41pm
Hi, I have managed to download the Gallery Widget but it cannot be unzipped. Please advice. Thank you.
17 July 2008 at 5:25pm
I cant untar it ether. Must be a corrupted zip. The author of the widget needs to submit a updated version.
8 August 2008 at 12:54pm Last edited: 8 August 2008 12:54pm
The current gallery widget in the download section is just a tar file (not .tar.gz). On Linux/Unix untar with
tar -xvf widgetsgallery.tar.gz
tar -zxvf widgetsgallery.tar.gz
But it would be nice to have a proper .tar.gz version.
I also noticed one bug in the Gallery Widget (this applies only if used on a Linux server). In the file LatestPicturesWidget.php find the line
$pictures = DB::query("SELECT f.`ID`, f.`Filename`, f.`Name`, f.`Title`, s.`URLSegment` FROM `gallerypage_live` g LEFT JOIN `sitetree_live` s ON g.`ID` = s.`ID` LEFT JOIN `file` f ON f.`ParentID` = g.`FolderID` WHERE f.`ClassName` = 'Image' ORDER BY f.`Created` DESC LIMIT 0,$nrtoshow;");
and replace it with
$pictures = DB::query("SELECT f.`ID`, f.`Filename`, f.`Name`, f.`Title`, s.`URLSegment` FROM `GalleryPage_Live` g LEFT JOIN `SiteTree_Live` s ON g.`ID` = s.`ID` LEFT JOIN `File` f ON f.`ParentID` = g.`FolderID` WHERE f.`ClassName` = 'Image' ORDER BY f.`Created` DESC LIMIT 0,$nrtoshow;");
On Unix systems MySQL table names are case sensitive so you get a MySQL error message and the page is not rendered.
I once had a similar problem when I developed a Silverstripe site on a Windows machine and then uploaded it to a Linux server. The problem here was the database dump that had all table names in lower case. It's quite easy to fix, but it's good to know about this possible pitfall.
|Go to Top|