? No Code Attached Yet
avatar itsam
itsam
2 Nov 2015

Steps to reproduce the issue

On Joomla 3.4.5 (but I am pretty sure it also happens to prior versions back to the 1.5 era) if you edit an article and change the status to unpublished (or any other status) and you save, then correctly (and as expected) the modified date of the article is updated.

BUT when you change its status from the articles list by clicking on Status checkbox column OR when you trash an article THEN the modified date left unmodified (which is wrong).

Expected result

modified date to be updated

Actual result

modified date remains the same

System information (as much as possible)

Joomla 3.4.5 on Apache 2.x with PHP 5.5

Additional comments

The same happens on custom components and my impression is that no one really had notice that all this time.
The bug is quite serious especially when you are dealing with REST API and you need to tell which record is modified after a specified date (timestamp) and of course is a matter of consistency.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar itsam itsam - open - 2 Nov 2015
avatar zero-24 zero-24 - change - 2 Nov 2015
Category JavaScript Administration Components
avatar peterpeter
peterpeter - comment - 4 Nov 2015

THEN the modified date left unmodified (which is wrong).
Why? I would argue that changing a article's state is not modifying the article itself. That's why this is not a bug, at least for me.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8244.

avatar n9iels
n9iels - comment - 4 Nov 2015

In my opinion the article state and modified time are two different things. "Last modified" is about the article text itself. Unpublished and publish are for the state of the article, and when set an article on publish the article itself isn't modified.

avatar zero-24 zero-24 - change - 4 Nov 2015
Status New Needs Review
avatar zero-24
zero-24 - comment - 4 Nov 2015

Moving to Needs Review so a Maintainer / PLT can take the decision what is wrong or not. Thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8244.

avatar itsam
itsam - comment - 4 Nov 2015

Then why when you change the status from inside (on edit) and save the article the modified date IS changed?
Definitely there is an inconsistency here.

In my opinion the correct action (no matter from where you change the status) is to update the modified date.
Let me stand my opinion with a real example on my custom component.

"I have created a complete REST based API wrapper on my component based on a controller that returns data in JSON format. One of the methods in the controller is called getModified(timestamp) that returns all modified records from a certain timestamp and beyond.
Unpublishing an article (or whatever record my/any component uses) will never "catch" the change. Imagine that you want to synchronize your joomla data with let's say a mobile app..."

Hope I make myself clear
Thanks in advance.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8244.

avatar vijaykhollam
vijaykhollam - comment - 22 Feb 2016

In this scenario when you change only status from inside (on edit) it should not change last modified date. This is some kind of inconsistency. It should be same for editing through list view or editing through edit layout.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8244.

avatar itsam
itsam - comment - 4 Mar 2016

Would be really nice to let administrators flag this on Options.
Thinking forward, this feature (updating the date on publish/un-publish) is of HIGH IMPORTANCE when dealing with REST API and you try to synchronize your data with external apps (say for example a mobile application)

Please think twice. Thank you in advance


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8244.

avatar AndyGaskell
AndyGaskell - comment - 18 Mar 2016

We are hitting this issue.

I would prefer if the modified date was also a reflection of status changes, as well as content text changes.

Our use case is API related too, particularly related to generating "HTTP/1.1 304 Not Modified" responses for a set of articles.

The inconsistency is also a problem really. I noticed if you change an article's category from the view at /administrator/index.php?option=com_content&view=articles it updates the "modified" date, but if you update the status from that view, then it doesn't.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8244.

avatar chrisdavenport
chrisdavenport - comment - 7 May 2016

The last modified field is intended for users to know when something relevant to them has changed in the article. It is not intended for technical use in generating an API. There is an inconsistency between the different views which should be fixed. However, using the last modified field to generate an HTTP Last-Modified: header is not an appropriate use for that field. You might consider storing a separate field in a linked table for that purpose.

When considering a PR to fix the inconsistency, consideration should be given as to whether the last modified date should be changed when the article is trashed. If the article is subsequently un-trashed, should it retain the original last modified date, or the date it was trashed?

A PR specifically to fix the inconsistency issue would be welcome.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8244.

avatar chrisdavenport chrisdavenport - change - 7 May 2016
Status Needs Review Confirmed
avatar rdeutz
rdeutz - comment - 17 Aug 2016

Changing the ordering also updates the modified_date, I think the easiest way to go is to modify the modified_date when an article data is save in whatever way. At some point it must be explained to a user and this should be easy to understand.

avatar AlexRed
AlexRed - comment - 30 Mar 2017

I can confirm in Joomla! 3.7.0-staging


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8244.

avatar AlexRed
AlexRed - comment - 2 May 2017

I can confirm the problem on Joomla! 3.7.1-dev (nightly Build)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8244.

avatar brianteeman
brianteeman - comment - 2 May 2017

@AlexRed as this is still open then of course nothing has magically changed

Please stop trolling

avatar AlexRed
AlexRed - comment - 11 May 2017

Please @brianteeman can you tell the same rule also here: 15621#issuecomment-300410530

avatar nicksavov
nicksavov - comment - 29 Jun 2017

+1 for changing the modified date when status is changed.

In Content Versioning, the status and modified date change is recorded and compared if another field is modified.

For example, if the Finish Publishing date is changed, a new Item Version is created. Comparing the Item Version to the previous version shows Status as changed, as well as Modified Date.

Why is it important to change Modified Date when Finish Publishing is changed? Yet, when an article is immediately unpublished (or even trashed), it doesn't get recorded. Seems inconsistent at the least.

avatar CiverBlack
CiverBlack - comment - 21 Aug 2017

There are two different kinds of people who see the modification date and both have different needs. One is the Administration who should see that that someone changed the Metadata. The other is the visitor of the site, who wants to see when the information in the article was updated. If i go to wikipedia and see that an article was changed the day before, i would expect that the information are up with current events. So i would use two modified dates one for the backend user and one for the frontend user.

@icampus


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8244.
avatar nicksavov
nicksavov - comment - 22 Aug 2017

Good point

avatar mbabker
mbabker - comment - 22 Aug 2017

As it relates to change tracking, a record generally only has one updated at or modified timestamp. It is an indicator of when the record (as a whole) was updated. You get into a very fuzzy and borderline confusing data model and UI if you try to implement two updated/modified trackers based on selective criteria (easiest example, I change something in the metadata fields, it's a frontend change but doesn't actually change the page content; which modification timestamp(s) are updated?).

I'm not saying that the arguments for either workflow (only change based on certain fields or always change) are invalid, in the end it all boils down to user preference. But ultimately, in the context of Joomla it should be consistent one way, and we need to decide what way that should be that way it can be explained to users and the underlying API behaviors updated to match that definition.

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Nov 2017
The description was changed
Status Confirmed Needs Review
avatar joomla-cms-bot joomla-cms-bot - edited - 8 Nov 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Nov 2017

Status is set on "Needs Review".

avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar wilsonge
wilsonge - comment - 19 Aug 2018

I agree this should update the modified status. However I would say that the correct way to do this is to instead of building up a custom db query in publish method is to loop through load and call the store function in the publish method. https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Table/Table.php#L1568-L1636

That way components store logic will be called (which in our case will save the modified date). I would suggest just in case of any b/c minor issues doing this in the 4.x branch and accepting this behaviour in 3.x

avatar brianteeman brianteeman - change - 19 Aug 2018
Labels Added: ?
Removed: J3 Issue
avatar brianteeman brianteeman - labeled - 19 Aug 2018
avatar brianteeman brianteeman - unlabeled - 19 Aug 2018
avatar brianteeman brianteeman - change - 28 Aug 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 28 Aug 2018
avatar gnanakeethan
gnanakeethan - comment - 22 Jan 2019

@wilsonge Are there any scope on fixing this issue?

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Apr 2019
Labels Added: ?
Removed: J4 Issue ?
avatar franz-wohlkoenig franz-wohlkoenig - unlabeled - 22 Apr 2019
avatar coolcat-creations
coolcat-creations - comment - 19 Dec 2020

I confirm that the issue still exists

avatar jwaisner jwaisner - change - 12 Sep 2022
Labels Added: ? No Code Attached Yet ?
Removed: ? ?
avatar jwaisner jwaisner - labeled - 12 Sep 2022
avatar alikon alikon - change - 19 Sep 2022
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2022-09-19 09:03:16
Closed_By alikon
avatar alikon alikon - close - 19 Sep 2022
avatar alikon
alikon - comment - 19 Sep 2022

please test #38783

avatar richard67 richard67 - change - 26 Nov 2022
Status Closed New
Closed_Date 2022-09-19 09:03:16
Closed_By alikon
avatar richard67 richard67 - reopen - 26 Nov 2022
avatar richard67
richard67 - comment - 26 Nov 2022

Reopen because PR #38783 has been closed.

avatar Terrykhan
Terrykhan - comment - 21 Dec 2022

The last modified field is intended for users to comprehend when something of interest to them has altered in the article. It is not intended for technical use in producing an API. There is a disparity between the various perspectives which should be rectified. However, capitalizing on the last modified field to make an HTTP Last-Modified: header is not a suitable usage for that field. You should think about stashing a separate field in a linked table for that intent.When evaluating a PR to correct the discrepancy, thought should be given to whether the last modified date should be amended when the article is discarded. Should the article be un-trashed subsequently, should it maintain the initial last modified date, or the time it was trashed?

A PR particularly addressing the inconsistency issue would be appreciated.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8244.

avatar Temadari
Temadari - comment - 21 Dec 2022

With regards to the 'last modified' field, this is intended for users to understand when relevant information has been changed in the article - not for technical use to create an API. Consequently, an inconsistency between views should be resolved. Utilizing the 'last modified' field to construct a HTTP Last-Modified: header is not suitable for this purpose. A different field in an associated table should be considered for that purpose.For the PR in order to resolve the inconsistency, thought should be given to whether the last modified date should be modified when the article is trashed. In the event the article is then unbanned, should the original last modified date be maintained, or the date it was trashed?

A PR purely to fix the inconsistency problem is appreciated.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8244.

avatar Zamankhan12
Zamankhan12 - comment - 21 Dec 2022

The last modified field is meant for users to be aware of any alterations to the article that concern them. It is not intended for the development of an API. There is a difference in the views which should be corrected. The use of the last modified field to create an HTTP Last Modified: header is not suitable for the field. It might be a good idea to have a distinct field in an associated table for this purpose.When considering a PR to fix the inconsistency, it should be taken into account if the last modified date should be changed when the article is put in the trash. If the article is then un-trashed, should the original last modified date be kept or should it be the date it was trashed?

A PR specifically to resolve the inconsistency problem would be appreciated.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8244.

avatar crystalenka
crystalenka - comment - 21 Dec 2022

Whoa there, no reason to spam with identical comments.

avatar crystalenka
crystalenka - comment - 21 Dec 2022

@richard67 @Quy not sure if you're the right people to tag but those last three comments are spam, check out the hidden unrelated links.

avatar chmst
chmst - comment - 28 Dec 2022

This issue could only be solved without b/c break if we add two new fields into tables: state_modified and state_modified_by or with special flags - but all in combinqtion with database changes, changes in models and layouts.

avatar chmst chmst - change - 28 Dec 2022
Labels Added: ?
avatar chmst chmst - labeled - 28 Dec 2022
avatar Hackwar Hackwar - change - 21 Feb 2023
Labels Removed: ?
avatar Hackwar Hackwar - unlabeled - 21 Feb 2023
avatar laoneo laoneo - change - 6 Apr 2023
Labels Removed: ?
avatar laoneo laoneo - unlabeled - 6 Apr 2023

Add a Comment

Login with GitHub to post a comment