Search
Other Articles Anywhere questions
Forum

Relative Data not works

Hitsch's Avatar Hitsch
We use a Calendar CustomField, called "calendar". We have 9 items spread over 3 days - yesterday today tomorrow.
<ul>
  {articles category="uncategorised" calendar=">date('today')"}<li>[title]</li>{/articles}
</ul>

Unfortunately does not show any articles, although there are three articles that meet the
>date('today')
criterion.

Why?
Peter van Westen's Avatar Peter van Westen ADMIN
Is this the Joomla core Calendar field? Or a 3rd party field?
Please post a rating at the Joomla! Extensions Directory
Hitsch's Avatar Hitsch
the custom field is a simple Joomla core field
Peter van Westen's Avatar Peter van Westen ADMIN
It is working fine on my testing sites…
Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Hitsch's Avatar Hitsch
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
The name of your Calendar field is not "calendar". It is "termin".
So you should use that:
{articles category="uncategorised" termin=">date('today')"}
Please post a rating at the Joomla! Extensions Directory
Hitsch's Avatar Hitsch
Sorry, the test page for you contained an incorrect field. is corrected and shows that
{articles category="uncategorised" termin="date('-30 days') to now()"}
works, but
{articles category="uncategorised" termin="date('+1 days') to date('+3 days')"}
does not work, although I would expect the logic to be coherent. Why?
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Hitsch's Avatar Hitsch
fine!,
date('-1 days') to date('+3 days')
works, but the result of
date('+1 days') to date('+3 days')
it empty
Peter van Westen's Avatar Peter van Westen ADMIN
If you tell it to return articles where the date value is greater than +1 day from now, then that date value should be greater than - at this moment - '2022-07-31 15:29:00'.
A date of '2022-07-31' is seen as '2022-07-31 00:00:00', and is therefor not greater than date('+1 day').
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
Read here for more info on how the date() function works:
docs4.regularlabs.com/articlesanywhere/p...alues-relative-dates
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription