Hi,
I am having a problem on a clients site, where if they use the Expiration Date checkbox in the News module, when you click on the article, it can't be found and the error page loads.
However if the Expiration Date checkbox is left unchecked, all is well and good.
System info below, I ran Checksum, and errors below resulted, however all files are on the server (I uploaded new ones just in case).
/admin/eventhandlers.php
/tmp/cache/index.html
/tmp/templates_c/index.html
Anyone with any ideas?
Cms Version: 1.11.6
Installed Modules:
CMSMailer: 5.2.1
FileManager: 1.4.3
MenuManager: 1.8.5
ModuleManager: 1.5.5
News: 2.12.12
CGSimpleSmarty: 1.6.1
Search: 1.7.8
ThemeManager: 1.1.8
TinyMCE: 2.9.12
FormBuilder: 0.5.12
simpletagging: 0.2.1
RSS: 1.1
CGBlog: 1.9.12
Comments: 1.9.2
Album: 0.9.3
CGExtensions: 1.32.6
CGFeedMaker: 1.0.17
Play: 1.0.3
DewPlayer: 0.2.1
avplayer: 1.0
FLVPlayer: 1.0.3
Twitter: 0.0.6
Backup: 0.5
CMSPrinting: 1.0.4
MicroTiny: 1.2.5
Config Information:
php_memory_limit:
process_whole_template:
output_compression:
max_upload_size: 50000000
url_rewriting: mod_rewrite
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
Php Information:
phpversion: 5.3.17
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 64M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 50M
upload_max_filesize: 50M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.63
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Thanks for any help.
[Solved] Expiration Date in News articles causes error?
[Solved] Expiration Date in News articles causes error?
Last edited by pwg on Wed Apr 24, 2013 6:57 am, edited 1 time in total.
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: Expiration Date in News articles causes error?
Did you set the correct TimeZone in your config.php?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Expiration Date in News articles causes error?
Expiration dates in the News module do work (tested them just a few days ago).
However: The timezone in the config.php has to match the timezone of the SERVER not where you think that most of your users may come from. Also, all times entered are wrt the server. This applies to all modules that have date dependant data. Unfortunately this means if you are building a website that uses News Expiry (or a blog or calendar module) for a local club or organization you should probably host it on a server that is in the same timezone as that club and organization. CMSMS has no capability to convert date data back and forth between a users timezone and server timezone..
When a URL comes in that represents an expired News article (or if the article is not available for display yet according to server time) a 404 error is generated. This is the intent.
However: The timezone in the config.php has to match the timezone of the SERVER not where you think that most of your users may come from. Also, all times entered are wrt the server. This applies to all modules that have date dependant data. Unfortunately this means if you are building a website that uses News Expiry (or a blog or calendar module) for a local club or organization you should probably host it on a server that is in the same timezone as that club and organization. CMSMS has no capability to convert date data back and forth between a users timezone and server timezone..
When a URL comes in that represents an expired News article (or if the article is not available for display yet according to server time) a 404 error is generated. This is the intent.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Expiration Date in News articles causes error?
Thanks so much for the replies.
I can see that I now need to alter my config file, as it is set to the clients time-zone (Australia/Sydney) whilst the server is set to GMT.
I just tested using $config['timezone'] = 'Etc/GMT'; and the Expiration date works.
Just checking on my hosting site, and they have some script to customise timezones.
See below.
<?
echo "Original Time: ". date("h:i:s")."\n";
putenv("TZ=Australia/Sydney");
echo "New Time: ". date("h:i:s")."\n";
?>
Do you think this would work? And where would I install it?
Thanks again for any help.
Cheers,
Paul
I can see that I now need to alter my config file, as it is set to the clients time-zone (Australia/Sydney) whilst the server is set to GMT.
I just tested using $config['timezone'] = 'Etc/GMT'; and the Expiration date works.
Just checking on my hosting site, and they have some script to customise timezones.
See below.
<?
echo "Original Time: ". date("h:i:s")."\n";
putenv("TZ=Australia/Sydney");
echo "New Time: ". date("h:i:s")."\n";
?>
Do you think this would work? And where would I install it?
Thanks again for any help.
Cheers,
Paul
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Expiration Date in News articles causes error?
Unfortunately that will not work either as that does not effect date comparisons done on the database itself... like
SELECT News.id FROM News where start_date > NOW();
SELECT News.id FROM News where start_date > NOW();
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.