Dates and [More] not working

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Dates and [More] not working

Post by Andrew Prior »

When I click on [more] in my news posts, i get an error.

This error (HTTP 406 Not Acceptable) means that Internet Explorer was able to receive information from the website you visited, but the information was not in a format that Internet Explorer can display.

This error is clearly to do with how I format the date. If I remove dateformat=" etc" it all works ok.

{cms_module module="news" detailpage="article" dateformat="%d %B,  %Y" category="Scots, Common, Scot-Worth, Common-Worth" number="35"}

I need Oz dates, ie dd/mm/yy not the US mm/dd/yy

The code I have above has worked intermittently, but there seems to something not consistent on the hosting server.  Can someone indicate to me a stable way of formatting my dates, please?  I am ignorant in this area.

CMS Made Simple 1.2.3 "Black Rock"
Andrew
nivekiam

Re: Dates and [More] not working

Post by nivekiam »

Can you create a test page that uses the offending call to the news module and post a link to it?

I can't duplicate this on my server.  I copy and paste your code (minus category, detailpage, and number parameters as I don't have those) and everything looks fine in FF and IE 7.0.

BTW, you can call the news module like so:

{news detailpage="article" dateformat="%d %B,  %Y" category="Scots, Common, Scot-Worth, Common-Worth" number="35"}

No need to use {cms_module ... }
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Re: Dates and [More] not working

Post by Andrew Prior »

Thanks Mate, I will.

http://202.60.89.114/~scotsch1/index.php?page=testtest which will show dates as  Posted: 29 January, 2008

Contrast with http://202.60.89.114/~scotsch1/index.ph ... sList   which shows dates as Posted: 01/29/08

The second date is USA style and incomprehensible to Oz. 

The code is
{cms_module module="news" detailpage="article" dateformat="%d %B, %Y" category="Scots, Common, Scot-Worth, Common-Worth" number="35"}

Same happens if I have lower case %b instead of %B

Andrew
nivekiam

Re: Dates and [More] not working

Post by nivekiam »

It's the %.  I'm betting your server has mod_security (probably also incorrectly configured) and it's rejecting ANY URL that has a % in it, meaning you can't even put in properly encoded URLs.

For a long term fix you'll need to contact your host and have them correctly configure mod_security.  For a "fix" for CMSms.  There is an option to set the time/date format for all articles.

Log in to the Admin section, Content > News > Options (tab all the way to the right), edit the option, "Format to display the article's post date with. This is based on the strftime function and can be used in your template with $entry->formatpostdate. It defaults to %x, which is the default date format for the server's locale.:"

Looks like you can set that there or even change that format on a per template basis.
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Re: Dates and [More] not working

Post by Andrew Prior »

Aha!!! The quick fix works, so far.  I've just put it in. We'll see how it holds up. The first way I had the dates (original posts) worked for a while, so it may drop out.  Many thanks!! Andrew
dlaitila
New Member
New Member
Posts: 8
Joined: Tue May 06, 2008 12:32 am

Re: Dates and [More] not working

Post by dlaitila »

Where do you put this code? How do you write it?
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Re: Dates and [More] not working

Post by Andrew Prior »

Yikes... that was a while ago!  I'll have a look tomorrow and see if I can find what I did. Andrew
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Dates and [More] not working

Post by Dr.CSS »

@dlaitila

If you read the News Help it has settings for the calls the tag takes, including time...
dlaitila
New Member
New Member
Posts: 8
Joined: Tue May 06, 2008 12:32 am

Re: Dates and [More] not working

Post by dlaitila »

Thank you for tryiing to help me. I have read the help menu for news, but I am so new to this that I might as well be reading a foreign language. I've tried putting this on the news page...

{news sortby="news_date"}

but that didn't do anything.

I would like it so that the date the news entry was posted does NOT show on the pages. I think it is confusing for people to see some event that happens on Independence Day for example with May 30 just above it, when we all know that in the United States Independence Day is July 4.

I know I am missing something very simple.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Dates and [More] not working

Post by Dr.CSS »

Ok, you might have wanted to start a new thread, as this one is old...

What is it you are trying to do?...
Post Reply

Return to “CMSMS Core”