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
Dates and [More] not working
-
- Forum Members
- Posts: 247
- Joined: Sun Oct 28, 2007 4:14 am
Re: Dates and [More] not working
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 ... }
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 ... }
-
- Forum Members
- Posts: 247
- Joined: Sun Oct 28, 2007 4:14 am
Re: Dates and [More] not working
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
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
Re: Dates and [More] not working
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.
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.
-
- Forum Members
- Posts: 247
- Joined: Sun Oct 28, 2007 4:14 am
Re: Dates and [More] not working
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
Re: Dates and [More] not working
Where do you put this code? How do you write it?
-
- Forum Members
- Posts: 247
- Joined: Sun Oct 28, 2007 4:14 am
Re: Dates and [More] not working
Yikes... that was a while ago! I'll have a look tomorrow and see if I can find what I did. Andrew
Re: Dates and [More] not working
@dlaitila
If you read the News Help it has settings for the calls the tag takes, including time...
If you read the News Help it has settings for the calls the tag takes, including time...
Re: Dates and [More] not working
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.
{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.
Re: Dates and [More] not working
Ok, you might have wanted to start a new thread, as this one is old...
What is it you are trying to do?...
What is it you are trying to do?...