J3 Issue ?
avatar artur-stepien
artur-stepien
2 Mar 2016

Steps to reproduce the issue

  • Enable Editing Layout/Enable Versions in Content component
  • Create article with title "Article 1" and click "Save"
  • Now edit that article content and click on "Save and Exit"
  • At this point you should have 2 versions of "Article 1" and the last one should be marked with star (so we know what version we have)
  • Create new article with title "Article 2" and click on "Save and Exit"
  • Get back to "Article 1" and check versions

Expected result

Current version of "Article 1" should be marked with a star

Actual result

There is no current version marked

System information (as much as possible)

Starts at least from Joomla! 3.4.5 but I think this issue exists from the start of version history.

Additional comments

This is caused by reordering of articles when new article is saved. Each article gets new ordering value and this value is a part of article checksum generation. Recreating version of each article(in same category as new one) when new is created is a bad idea I think. Cause there can be many websites with 100+ articles in a category. That would lead to performance huge drop on save.

There are 2 ways to deal with that. Remove ordering field from checksum generation (I can create proper PR) or disable reordering on article save.

It is also worth to mention that reordering of all articles in single category after new article has arrived is a bad idea. That is not a single query. That is N+1 queries to database where N is a number of articles in a category. That should be improved investigated. I think reordering can be done in a single query (just reorder items after the new one?).

Votes

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

avatar artur-stepien artur-stepien - open - 2 Mar 2016
avatar shubhamnba2009
shubhamnba2009 - comment - 2 Mar 2016

I'm finding difficulty in searching the option Content history.Can you tell me more specifically where i can find it?


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

avatar artur-stepien
artur-stepien - comment - 2 Mar 2016

I'm finding difficulty in searching the option Content history.Can you tell me more specifically where i can find it?

Sorry I'm using Polish Version. Here is the exact route to enabling history:
Content -> Articles -> Options -> Editing layout -> Enable Versions ->Yes
I'm not sure if this is not enabled by default.

avatar shubhamnba2009
shubhamnba2009 - comment - 2 Mar 2016

Thanks for helping. The enable versions option is enabled by default.


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

avatar brianteeman
brianteeman - comment - 2 Mar 2016

I have followed your instructions and I can confirm that the star disappears.


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

avatar brianteeman brianteeman - change - 2 Mar 2016
Status New Confirmed
avatar alikon
alikon - comment - 3 Mar 2016

can you test with this pr #8576 applied
version
works for me
it changes the artcicle order managment with some speed

avatar brianteeman
brianteeman - comment - 3 Mar 2016

After applying #8576 and repeating the test the issue is solved by that PR

On 3 March 2016 at 07:07, Nicola Galgano notifications@github.com wrote:

can you test with this pr #8576
#8576 applied
[image: version]
https://cloud.githubusercontent.com/assets/181681/13487008/8d030838-e116-11e5-8d1a-21c9bd67ccd0.PNG
works for me
it changes the artcicle order managment with some speed


Reply to this email directly or view it on GitHub
#9287 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar artur-stepien
artur-stepien - comment - 3 Mar 2016

@brianteeman Nope. #8576 is a performance issue fix in article model that does reorder articles in category each time article is marked as featured. This just swaps JTable::reorder() with JTable::getNextOrder() in article model. #8576 should be applied independently. In a worst situation this can happen twice (#8576 issue + #9287 when user creates new article and then mark it as featured).

What we have in here is something different. What happens here is caused by JTable::reorder() that is executed in JTable::store() that is executed in JTableContent::store() (when new article is created). ordering field should be excluded from counting version checksum cause every time JTable::reorder will be executed all articles matching $where in JTable::reorder() will lose their version identity.

Also as addition JTable::reorder should be removed from JTable::store() and/or optimized. As I mention before running N+1 queries when new item is saved is a really bad idea. I think it can be done by just reordering every item that has higher ordering then new one. It will not be the fastest query cause there will be multiple records updated at once but still better then updating each item separately.

There is another problem. Because this is caused by ordering field that is part of most Joomla! components every component with ordering and version history implemented can be affected (if ordering is not present in ignoreChanges section of content type declaration in database).

Components that can be affected by this content versions issue cause they have ordering field and lacks entry in ignoreChanges section:
com_contact ()
com_newsfeeds
com_banners (partialy?)
com_weblinks (not sure)

avatar alikon
alikon - comment - 7 Mar 2016

@artur-stepien

#8576 should be applied independently

if so can you mark a successfull test on #8576
I will be happy to test your pr#

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 29 Jan 2017

Current Version of Article is marked, cannot conform Issue.
Tested on Joomla! 3.7.0-staging.

avatar brianteeman
brianteeman - comment - 21 May 2017

I have followed the original report as defined and this is still an issue on 3.7.1

avatar artur-stepien
artur-stepien - comment - 21 May 2017

Because no one in charge decided about the solution. And as I described in the ticket its not only about lost version identity, it is also about performance. Try to add an article to 2,000 articles category.

avatar wojsmol
wojsmol - comment - 21 May 2017

@artur-stepien Cen you create PR for version identity part? Ping me and I will test this PR.

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Nov 2017
The description was changed
Status Confirmed Discussion
avatar joomla-cms-bot joomla-cms-bot - edited - 8 Nov 2017
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Aug 2018

@artur-stepien any Comment on above Question?


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

avatar artur-stepien
artur-stepien - comment - 2 Aug 2018

@franz-wohlkoenig That is over 2 years old issue.... Have no idea if that still exists. Other matter is that to be honest after last 2 conversations with devs I decided not to waste any more time on PR's or ideas (arguments like "no cause no" or "it is old so we can't change it now" doesn't get to me). So from now on, you can count on me only as a bug reporter.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Aug 2018

@artur-stepien thanks for Answer and to be a Bug Reporter.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Aug 2018

@artur-stepien can you please check if this Issue still exist?

avatar wilsonge
wilsonge - comment - 18 Aug 2018

Deleted brians comment on his request as we just confirmed it is still broken

avatar wilsonge
wilsonge - comment - 18 Aug 2018

OK so we definitely can add the field to the ignoreChanges field in the list here which will fix this bug https://github.com/joomla/joomla-cms/blob/staging/installation/sql/mysql/joomla.sql#L410 However it would invalidate any existing sha1 's in versioning

avatar alikon alikon - change - 26 Apr 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-04-26 18:24:43
Closed_By alikon
Labels
avatar joomla-cms-bot joomla-cms-bot - change - 26 Apr 2019
Closed_Date 2019-04-26 18:24:43 2019-04-26 18:24:44
Closed_By alikon joomla-cms-bot
Labels
avatar joomla-cms-bot joomla-cms-bot - close - 26 Apr 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 26 Apr 2019

Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/9287

avatar alikon
alikon - comment - 26 Apr 2019

closing as we have a pr ready for testing #24731


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

Add a Comment

Login with GitHub to post a comment