Page 1 of 1
Gallery: 'showlatest' shows no images
Posted: Wed Feb 12, 2014 4:38 pm
by RappScallion
Hi all!
I've used Gallery on a couple of different sites, and think its a great module!
Only this time i'd like to make use of the action="showlatest" variable, but no matter what I try it always says 'Gallery 0 images', although there are images in the gallery and i've visited them as well as in the admin section and on the site itself. I've also tried 'showrandom' and 'showlatestdir' but they won't work neither.
I've also tried it on some existing websites which use the module and are on the same host but they also won't show the latest images. Could the problem be with the host?
If anybody could help that would be much appreciated,
Thnks
Re: Gallery: 'showlatest' shows no images
Posted: Wed Feb 12, 2014 8:23 pm
by JohnnyB
I haven't used that feature yet, but my first thought would be to make sure the template it uses for that option is bug free.
You can also create a new template used just for debugging by doing something like this:
{foreach from=$images item=image name=galleryimg}
<pre>{$image|@print_r}</pre>
{/foreach}
If you get data listed, then it might just be a template error preventing the display.
Re: Gallery: 'showlatest' shows no images
Posted: Thu Feb 13, 2014 8:27 am
by velden
Just tested and works for me:
Code: Select all
{Gallery action="showlatest" number=1}
Gallery itself has only sub galleries containing photos, so it does (as described in help) find photos from sub galleries.
CMSMS 1.11.9
Gallery 1.6.1
Re: Gallery: 'showlatest' shows no images
Posted: Thu Feb 13, 2014 8:58 pm
by RappScallion
Hi, thanks for the response. Still no luck here.
I've tried the code from Johnny B but it gives me nothing.
Also, when adding a new subgallery it asks for the new directory name and on that screen the upload button is gone. Then when I hit save it gives me the error "Updating the gallery failed.", it refreshes and the directory name input is gone and upload buttons are back. Could this have anything to do with me not being able to use the "showlatest" variable? The normal gallery works like a charm.
Using CMSMS 1.11.10 and Gallery 1.6.1
Re: Gallery: 'showlatest' shows no images
Posted: Thu Feb 13, 2014 10:53 pm
by Jo Morg
Please read this
Is this a fresh install?
How was it uploaded? By ftp?
What about your system info and installed modules?
TBH, it appears to be a
corrupted files type of issue, but hard to tell from what you posted...
Re: Gallery: 'showlatest' shows no images
Posted: Fri Feb 14, 2014 8:26 am
by RappScallion
Hi, sorry about that.
I did a fresh install, twice actually. And also tried it on an existing site running gallery. All uploaded via ftp.
Running these modules:
[list]
CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.4
MenuManager: 1.8.6
MicroTiny: 1.2.6
ModuleManager: 1.5.5
News: 2.14.2
Search: 1.7.11
ThemeManager: 1.1.8
CGSimpleSmarty: 1.7.1
CGExtensions: 1.38.1
CGBlog: 1.10.3
CGSmartImage: 1.15
CGCalendar: 1.13.3
Gallery: 1.6.1
[/list]
But it also didn't work on a fresh install without extra modules.
Config Information:
[list]
php_memory_limit:
process_whole_template:
max_upload_size: 50000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true[/list]
Php Information:
[list]
phpversion: 5.3.3
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 32M
upload_max_filesize: 50M
session_save_path: /tmp (0777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)[/list]
Server Information:
[list]
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 4.1.21
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found
[/list]
Re: Gallery: 'showlatest' shows no images
Posted: Fri Feb 14, 2014 10:41 am
by Jo Morg
RappScallion wrote:I've also tried it on some existing websites which use the module and are on the same host but they also won't show the latest images. Could the problem be with the host?
RappScallion wrote:Also, when adding a new subgallery it asks for the new directory name and on that screen the upload button is gone. Then when I hit save it gives me the error "Updating the gallery failed.", it refreshes and the directory name input is gone and upload buttons are back. Could this have anything to do with me not being able to use the "showlatest" variable? The normal gallery works like a charm.
RappScallion wrote:All uploaded via ftp.
With the the given info, and given the equal behavior on all sites on the same host, either there is a file permission issue or Open Basedir restrictions may be in effect. BTW why do you use ftp to upload modules? Can't you use Module Manager for some reason or is it your option?
Re: Gallery: 'showlatest' shows no images
Posted: Fri Feb 14, 2014 10:49 am
by RappScallion
Oh no I do use the Module Manager, thought you meant how I upload CMSMS
Is it possible for me to fix those permissions and/or restrictions myself or is it better to search for a different host?
Re: Gallery: 'showlatest' shows no images
Posted: Fri Feb 14, 2014 10:56 am
by velden
If you have access to (error) log files of apache, they could help.
It could well be a mod_security issue and those should appear in the apache error logs.
I've also seen strange behavior on some hosts where the /module/Gallery directory had too HIGH permissions (then needed to change 777 to 755 recursively).
Re: Gallery: 'showlatest' shows no images
Posted: Fri Feb 14, 2014 1:54 pm
by Jo Morg
RappScallion wrote:Is it possible for me to fix those permissions and/or restrictions myself or is it better to search for a different host?
Depends... Some host allow for some control on the part of user regarding settings, and these come in a few flavors:
- - through CPanel (or the equivalent control/admin panel);
- - by using a directive on .htaccess;
- - by using a custom php.ini on the site (or domain/sub-domain) root with just the settings you need to override;
Ultimately you can try to contact the host support and eventually have them explain how to do it, or even have them do it for you. If all that fails, well... yes, hunting for a new host is advised.
Regarding permissions it's easier: you can set them either through ftp or file manager. If for some reason doing it via ftp doesn't work it may have to be done by php (file manager on cpanel for instance) - meaning there are some other server settings that affect ownership too.
Re: Gallery: 'showlatest' shows no images
Posted: Fri Feb 14, 2014 2:24 pm
by JohnnyB
If you have shell access / SSH you can chmod them
cd /full/path/to/www
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
Re: Gallery: 'showlatest' shows no images
Posted: Sat Feb 15, 2014 11:06 am
by RappScallion
Hi guys, thanks for all the help. Much appreciated!
I'm googling my ass off right now searching for what to do with php.ini and htacces. Could you maybe give me a hint on what to search for? I'm not an expert with these things but have used them both in the past.
I have also chmoded the directory a couple of times from 777 to 755 and back via ftp with no results, and I don't have acces to SSH.
The phpinfo file gives a "no value" for open_basedir. I'm guessing this is good right? I've changed something with php.ini and open_basedir but that messed the whole site up a bit.
Re: Gallery: 'showlatest' shows no images
Posted: Sat Feb 15, 2014 1:06 pm
by velden
You're focusing on the permissions now. I'm not sure that is the problem.
I don't think 'showlatest' has something to do with permissions (as those files are already uploaded etc).