User tests: Successful: Unsuccessful:
Pull Request for Issue #10355
No column with modification date was present and sorting articles by the last modification date was not possible.
So I have added one column with the modified date and sorting articles by the last modification date is possible now.
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
Just a thought: How about showing a different date in that column depending on which date is being used to sort the list? So by default it would show a column "Created" with the created dates, but if you sort by modified date using the dropdown it would show the same column as "Modified" with the modified dates. That way you're not using any more screen space.
Better indeed as this anyway needs a change in filter_articles.xml.
Category | ⇒ | Administration Language & Strings UI/UX |
Rel_Number | 0 | ⇒ | 10355 |
Relation Type | ⇒ | Pull Request for | |
Labels |
Labels |
Added:
?
|
Labels |
Category | Administration Language & Strings UI/UX | ⇒ | Administration Feature Request Language & Strings UI/UX |
Having two columns for dates is not required. We can collapse them as Chris mentioned or #10355 (comment) or a mix of both.
Please note this does not apply to articles only, many other list views will subsequently follow this as standard.
If you collapse them into one column, then you have the downside that you can only change to another date sorting by using the dropdowns. You can't go to created date by clicking on the header of the table.
Imho it's still better than cluttering the list with multiple dates, which will get confusing fast.
Yeah right, thats valid if we have two dates in the data cell and only one
heading in the header.
The example was a screenshot from a custom component that shows/uses
modified date only (clients sometime have weird choices, I know) in the
header but we can have Created (Modified) *or *Modified (Created) in the
header as per the case.
This needs to have the filter updated so that there are both Modified Ascending and Modified Descending AND that they are ordered in the list in the same order as the columns
Also dont forget that you need to apply the changes to the hathor administrator template overrides
I have tested this item
I have applied the patch and found that, If there is no modify date then it should be "0000-00-00 00:00:00" but currently showing "-0001-11-30".
Attached screen dump of that.
I have tested this item
I have tested this, "Modified" column appears on the table and in the drop-down too and sorting works. But I found that articles which are never modified shows '-0001-11-30' in the modified date column instead it should show either blank or anything user friendly text.
I apologies that I was using joomla 3.5.1 for testing. Now I will test it with staging branch and get back with results.
I have not tested this item.
I have tested this item
I have tested using staging branch.
I have tested this item
Tested successfully with Joomla Version: Joomla! 3.6.0-rc Release Candidate [ Noether ] 28-June-2016 20:34 GMT
Found this "-0001-11-30" when article never modified
The date issue is because the default date in recent versions of MySQL has been changed to 1000-01-01 00:00:00. I think there's a separate PR to address that issue.
Whether the default date is 0000-00-00 00:00:00
or 1000-01-01 00:00:00
, the JHtml::date
would always return such meaningless text for it. Its better to validate the date inside that method if possible and return null
in such case. Which we'd handle something like:
echo JHtml::_('date', $date, 'F d, Y h:i A') ?: JText::_('JNEVER');
I tried to find that PR but so far could not find it.
All database types are not very consistent about the default date value/format. However, in Joomla we do have the $nullDate
property to check for the same.
Since we have multiple possible default date values in MySQL, we can have a property $nullDates
similar to protected $nullDate = '0000-00-00 00:00:00';
in JDatabaseDriver
that holds all possible default dates for the specific driver class. Further:
JDatabaseDriver::isNullDate
to check whether a given date is a null date.JDatabaseDriver::date
to return a date string for valid/real date and null
otherwise.// The date values processed with $db->date() within the model
echo $date ? JHtml::_('date', $date, 'F d, Y h:i A') : JText::_('JNEVER');
If the article has never been modified its best to show that than a fictitious date (assuming that doesnt effect the ordering)
-0001-11-30
it is old PHP issue/feature when try parse 0000-00-00 00:00:00 date, not MySql issue
http://stackoverflow.com/questions/29917598/why-does-0000-00-00-000000-return-0001-11-30-000000
0000-00-00 00:00:00 - is an invalid date, because there is no month zero, no day zero
@vijaykhollam can you please look at the issue of the date display when there has not yet been a modification - it cant be merged as it is right now
Status | Pending | ⇒ | Information Required |
Labels |
@vijaykhollam if you are not going to update this then please let us know
I have used JHTML and its format to show modified date. It's correctly saved in the database. Need to check the issue with JHTML and its DATE_FORMAT_LC4 format. Will check and update here.
Have used following syntax to show modified date.
<?php echo JHtml::('date', $item->modified, JText::('DATE_FORMAT_LC4')); ?>
I am closing this at this time as it appears to have been abandoned by @vijaykhollam - it can always be reopened if updated
Labels |
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-02 14:14:22 |
Closed_By | ⇒ | brianteeman | |
Labels |
I am not very familiar with the development process so I don't know what it means that the issue has been 'closed at this time'. If it means that we're not going to get sorting by modification date in an upcoming release, then what can I do to get this back on track?? It is a feature that my clients have requested and that makes sense given how they use Joomla! - modifying the content of certain articles (that contain plugin code) rather than creating new articles. I've attempted to get them to copy the existing articles to new articles instead, but they don't understand why they cannot see and sort articles by modification date so they don't have to change what they do. I can only tell them that the core requires changes to implement this and that I hope to see those changes in an upcoming release.
@davidascherG this Pull Request (PR) seems to be abandoned by the Developer (@vijaykhollam). So it needs another Developer to work on this PR or to create another PR for this Issue.
If the modification date was already available by adding it to the list of
filter fields in components/com_content/models/articles.php wouldn't it
then be possible to add the "modified" field to the articles list in a
template override? This doesn't seem like it should be as complex as the
prior discussion made it appear. Also, is the "language" field so important
that it should be included in articles lists? In the US, the vast majority
of sites are single language - English only. I can imagine that many in
Europe and elsewhere are multi-language, but why have the 'language' field
be included in articles listings by default by NOT the 'modified' field?
How does a Developer get persuaded to work on this?? What does one have to
do to become a Developer?
On Wed, Jul 19, 2017 at 2:06 PM, Franz Wohlkönig notifications@github.com
wrote:
@davidascherG https://github.com/davidascherg this Pull Request (PR)
seems to be abandoned by the Developer (@vijaykhollam
https://github.com/vijaykhollam). So it needs another Developer to work
on this PR or to create another PR for this Issue.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11014 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJOtNnt2v7fZc_Z7raRDm1uvoG-eqHEdks5sPkWbgaJpZM4JEHCi
.
The problem as highlighted above is what to display if there is no modified date
The language column thing is unrelated to this and is being addressed for Joomla 4
I mist be missing something, but I never see 'no modified date'... I see
"0000-00-00 00:00:00". It is unfortunate, I think, that Joomla doesn't
consider the creation of an article to be its first 'modification', and
automatically fill in the created value in the modified field when the
article is first saved.
what about adding "Modified" to the filters, and only if that filter is
chosen display and sort on the 'modified' field? It is a little
"off-kilter" but semester workable.
Another alternative could be to, as part of a future update, copy the
created and created_by fields to the modified and modified_by fields,
respectively, for those articles that have not been modified... Then there
would be no issue of what to display...
My clients are usually interested in seeing which articles have been
modified in the past few months... I don't know about why other people
might want this feature.
Thanks
On Jul 20, 2017 11:46 AM, "Brian Teeman" notifications@github.com wrote:
The problem as highlighted above is what to display if there is no modified
date
The language column thing is unrelated to this and is being addressed for
Joomla 4
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11014 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJOtNvGNsNzA0c5wY67yzrcN5T9XL-A1ks5sP3ZZgaJpZM4JEHCi
.
Not sure about adding a new column as the UI is already crowded.
In any case please alpha order the new string.