CGBlog post date older than 10 years ago can't choose year
Posted: Thu Mar 17, 2016 1:11 am
I have used Calguy's Wordpress to CGBlog converter to convert an old blog site which has been in existance since 2004 in to CMSMS. It works great. Thanks yet again CG.
However, some of the blog entries were posted more than 10 years ago, in 2004 & 2005 etc.
When they got converted the date was set to (or perhaps got changed to when later editing) 2006. This is because the Post Date drop down shows the years going back only 10 years:
So, over time this will cause an error if you go into and edit a blog post more than 10 years old. Even though the year in the database might be stored correctly (say 2005), the HTML of the article edit page doesn't include 2005 in the drop down options and so it will default to the first item in the list (2006 here). Then when you save (without spotting what has happened), 2006 is stored as the year. So post date will be corrupted over time.
How can I show > 10 years back in the drop down to prevent this happening?
This sounds like a (pretty minor) bug to me?
----------------------------------------------
Cms Version: 2.1.2
Installed Modules:
AdminSearch: 1.0
CGBlog: 1.13.3
CGExtensions: 1.52.2
CGSimpleSmarty: 2.0.5
CG_WP2CGBlog: 1.0.6
CMSContentManager: 1.1
CMSMailer: 6.2.14
DesignManager: 1.1.1
FileManager: 1.5.2
FrontEndUsers: 1.31.1
JQueryTools: 1.3.8
MicroTiny: 2.0.3
ModuleManager: 2.0.2
Navigator: 1.0.2
News: 2.50.4
Search: 1.50.2
Config Information:
php_memory_limit:
max_upload_size: 32000000
url_rewriting: none
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/London
permissive_smarty: false
Php Information:
phpversion: 5.5.30
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 22519
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 120
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 32M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On
Performance Information:
allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)
Server Information:
Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 2.6.18-471.3.1.el5.lve0.8.72 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.48
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Permission Information:
tmp: /home/maidblokeadmin/public_html/mb/tmp (0755)
tmp_cache: /home/maidblokeadmin/public_html/mb/tmp/cache (0755)
templates_c: /home/maidblokeadmin/public_html/mb/tmp/templates_c (0755)
modules: /home/maidblokeadmin/public_html/mb/modules (0755)
uploads: /home/maidblokeadmin/public_html/mb/uploads (0755)
File Creation Mask (umask): /home/maidblokeadmin/public_html/mb/tmp/cache (0755)
config_file: 0444
----------------------------------------------
However, some of the blog entries were posted more than 10 years ago, in 2004 & 2005 etc.
When they got converted the date was set to (or perhaps got changed to when later editing) 2006. This is because the Post Date drop down shows the years going back only 10 years:
So, over time this will cause an error if you go into and edit a blog post more than 10 years old. Even though the year in the database might be stored correctly (say 2005), the HTML of the article edit page doesn't include 2005 in the drop down options and so it will default to the first item in the list (2006 here). Then when you save (without spotting what has happened), 2006 is stored as the year. So post date will be corrupted over time.
How can I show > 10 years back in the drop down to prevent this happening?
This sounds like a (pretty minor) bug to me?
----------------------------------------------
Cms Version: 2.1.2
Installed Modules:
AdminSearch: 1.0
CGBlog: 1.13.3
CGExtensions: 1.52.2
CGSimpleSmarty: 2.0.5
CG_WP2CGBlog: 1.0.6
CMSContentManager: 1.1
CMSMailer: 6.2.14
DesignManager: 1.1.1
FileManager: 1.5.2
FrontEndUsers: 1.31.1
JQueryTools: 1.3.8
MicroTiny: 2.0.3
ModuleManager: 2.0.2
Navigator: 1.0.2
News: 2.50.4
Search: 1.50.2
Config Information:
php_memory_limit:
max_upload_size: 32000000
url_rewriting: none
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/London
permissive_smarty: false
Php Information:
phpversion: 5.5.30
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 22519
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 120
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 32M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On
Performance Information:
allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)
Server Information:
Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 2.6.18-471.3.1.el5.lve0.8.72 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.48
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Permission Information:
tmp: /home/maidblokeadmin/public_html/mb/tmp (0755)
tmp_cache: /home/maidblokeadmin/public_html/mb/tmp/cache (0755)
templates_c: /home/maidblokeadmin/public_html/mb/tmp/templates_c (0755)
modules: /home/maidblokeadmin/public_html/mb/modules (0755)
uploads: /home/maidblokeadmin/public_html/mb/uploads (0755)
File Creation Mask (umask): /home/maidblokeadmin/public_html/mb/tmp/cache (0755)
config_file: 0444
----------------------------------------------