? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
27 Oct 2019

Summary of Changes

Adapting code to the new columns featured_up and featured_down

Testing Instructions

Select a featured or a non-featured article and batch copy it to another category.

Before patch

Fails

After patch

All is fine

Documentation Changes Required

avatar infograf768 infograf768 - open - 27 Oct 2019
avatar infograf768 infograf768 - change - 27 Oct 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Oct 2019
Category Administration com_content
avatar alikon
alikon - comment - 27 Oct 2019

article copy to another category don't work, even with non featured article
and i'm testing with mysql

avatar richard67
richard67 - comment - 27 Oct 2019

Yes, just tested: With this PR the error goes away and success message is shown, but then I can't see any copied article.
Update: Can't see because it doesn't exist. Copying failed.

avatar alikon
alikon - comment - 27 Oct 2019

even if the article is present in the #__content table
maybe workflow ???

avatar richard67
richard67 - comment - 27 Oct 2019

Yes, in DB they exist, the copied ones have state=0. But then I set filter to show also trashed items I don't see them.

avatar richard67
richard67 - comment - 27 Oct 2019

No PHP warning or notice or error, nothing in MySQL log.

avatar brianteeman
brianteeman - comment - 27 Oct 2019

almost certainly workflow related.

avatar richard67
richard67 - comment - 27 Oct 2019

You can strike through the "almost" I would say.

avatar brianteeman
brianteeman - comment - 27 Oct 2019

i was being polite

avatar alikon
alikon - comment - 27 Oct 2019

politically incorrect comment "i hate workflow" ?

avatar richard67
richard67 - comment - 27 Oct 2019

Question is how we shall coninue with this PR here? It fixes the error "1136 Column count doesn't match value count at row 1" when batch copying a featured article. The general problem we've discovered here, should that be handled in a separate issue?

avatar alikon
alikon - comment - 27 Oct 2019

pr itself is correct imho
anyway the copy issue is workflow related
Screenshot from 2019-10-27 09-36-19

avatar infograf768
infograf768 - comment - 27 Oct 2019

The general problem we've discovered here, should that be handled in a separate issue?

We can separate if we merge this fast. Otherwise It can be closed and included in the full patch.

avatar infograf768 infograf768 - change - 27 Oct 2019
Labels Added: ?
avatar richard67 richard67 - test_item - 27 Oct 2019 - Tested successfully
avatar richard67
richard67 - comment - 27 Oct 2019

I have tested this item successfully on 22a19e7

Fixes the error "1136 Column count doesn't match value count at row 1" when batch copying a featured article.

Other problems with batch processing are out of scope of this PR.


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

avatar infograf768 infograf768 - change - 27 Oct 2019
Title
[4.0] Fixing Featured Articles batch copy
[4.0] Fixing Featured Articles batch copy (featured aspects)
avatar infograf768 infograf768 - edited - 27 Oct 2019
avatar infograf768
infograf768 - comment - 27 Oct 2019

Modified title to fit.

avatar richard67
richard67 - comment - 27 Oct 2019

@alikon My query shows an additional condition:

WHERE ws.condition IN (:preparedArray1,:preparedArray2) AND wa.extension='com_content'

Could this one be the problem? Unfortunately we don't see values of prepared statements in debug.

avatar alikon
alikon - comment - 27 Oct 2019

AFAIK com_content has not been converted to prepared statement.... maybe some MVC libraries...

avatar richard67
richard67 - comment - 27 Oct 2019

@infograf768 Please check infograf768#54. It implements @SharkyKZ 's comment that the dates of the copied article shall be used. Unfortunately it does not solve the other, more global problem.

avatar infograf768
infograf768 - comment - 27 Oct 2019

@richard67 See my comment in your PR

avatar anibalsanchez anibalsanchez - test_item - 27 Oct 2019 - Tested unsuccessfully
avatar anibalsanchez
anibalsanchez - comment - 27 Oct 2019

I have tested this item ? unsuccessfully on 22a19e7

Everything works normally, and the new article is added to the content and content_froentend table. But, the new article is not shown in the list.


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

avatar infograf768
infograf768 - comment - 28 Oct 2019

@anibalsanchez
The PR does not solve fully Batch Copy, it only solves the error due to wrong columns for featured_up and featured_down.

Solving fully batch copy will require another PR.

avatar richard67
richard67 - comment - 28 Oct 2019

@anibalsanchez Please test again with respect to the comment in my previous test result above:

Fixes the error "1136 Column count doesn't match value count at row 1" when batch copying a featured article.

Other problems with batch processing are out of scope of this PR.

avatar richard67
richard67 - comment - 28 Oct 2019

pr itself is correct imho
anyway the copy issue is workflow related
Screenshot from 2019-10-27 09-36-19

@alikon What happens if you enable again the commented out 3 lines and change the 2 joins from inner join to left join?

avatar richard67 richard67 - test_item - 28 Oct 2019 - Tested successfully
avatar richard67
richard67 - comment - 28 Oct 2019

I have tested this item successfully on bff961e

Fixes the error "1136 Column count doesn't match value count at row 1" when batch copying a featured article.

The general problem that batch copied articles are not visible in the list view but exist in the database is not subject of this PR and has to be handled separately.


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

avatar richard67
richard67 - comment - 28 Oct 2019

The reason for the other, general issue is that for the copied items no workflow assiciations are inserted.

Workflow associations are joined for each item with an inner join on the item id in the list query.

So the copied items are not shown because in database they definitely don't have corresponding records in the workflow associations table.

avatar richard67
richard67 - comment - 28 Oct 2019

I've just made a PR to @infograf768 's branch to solve the general problem, too. If he wants, he may merge it and change scope of this PR to solve the batch copy problem in general.

avatar richard67
richard67 - comment - 28 Oct 2019

But I am not sure if that is the correct final solution. Maybe it was intended that workflow for batch copied items starts from beginning. But then it seems it was not implemented and just nothing was done, i.e. the batch copied items did not have a workflow association. That's fixed if JM merges my PR, and I think for now that's sufficient. Otherwise, if he wants to keep things separate, I can make a new PR here.

avatar richard67
richard67 - comment - 28 Oct 2019

Hmm, there seems to be a PR already solving the general issue with batch copy caused by missing workflow stuff, #24519 . Is RTC but seems to be more complicated than my way. But maybe it's the more correct way? Anyway. Is RTC => someone merge.

avatar richard67
richard67 - comment - 12 Nov 2019

@infograf768 As @wilsonge commented here infograf768#55 (comment), my PR infograf768#55 seems to be ok. Do you want to merge it into this PR so it can be tested?

avatar alikon
alikon - comment - 12 Nov 2019

even if, apart wilsonge thinking,
i second this
?

avatar wilsonge
wilsonge - comment - 12 Nov 2019

I haven’t tested it but if it works it’s definitely the better fix to use the post install cleanup and the built in library

avatar richard67
richard67 - comment - 12 Nov 2019

Post install cleanup?

avatar richard67
richard67 - comment - 12 Nov 2019

How is the post install cleanup related to this here?

avatar wilsonge
wilsonge - comment - 12 Nov 2019

I meant the cleanupPostBatchCopy method :)

avatar richard67
richard67 - comment - 12 Nov 2019

Ah now I understand.

avatar richard67
richard67 - comment - 12 Nov 2019

Was confused because there is also a cleanup of post install messages issue ;-)

avatar infograf768
infograf768 - comment - 13 Nov 2019

Where do we stand here?

avatar richard67
richard67 - comment - 13 Nov 2019

@infograf768 As said above: Merge my PR for you, change title and description of this PR here so it‘s clear that it solves the issue with batch copying articles in general, also if not featured, then refer to this PR here in Brian‘s issue and finally wait for testers.

avatar infograf768
infograf768 - comment - 13 Nov 2019

@richard67
Done.

avatar infograf768 infograf768 - change - 13 Nov 2019
The description was changed
avatar infograf768 infograf768 - edited - 13 Nov 2019
avatar richard67
richard67 - comment - 13 Nov 2019

@infograf768 Now it needs to change title and description of this PR so it is clear that it solves the issue with batch copying articles in general, also if not featured. I can't do this for you now because am at work. I'll leave a reference to this PR in Brian's issue.

avatar infograf768 infograf768 - change - 13 Nov 2019
Title
[4.0] Fixing Featured Articles batch copy (featured aspects)
[4.0] Fixing Articles batch copy
avatar infograf768 infograf768 - edited - 13 Nov 2019
avatar richard67
richard67 - comment - 13 Nov 2019

I've left a reference comment in PR #24519 that this PR here does the same but in a mroe elegant way.

I've also left comments in issues #24478 and #27060 that this PR here solves these issues.

avatar infograf768
infograf768 - comment - 14 Nov 2019

@SharkyKZ @alikon
Please test again.

avatar SharkyKZ SharkyKZ - test_item - 14 Nov 2019 - Tested successfully
avatar SharkyKZ
SharkyKZ - comment - 14 Nov 2019

I have tested this item successfully on fc0d70a


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

avatar Quy Quy - test_item - 14 Nov 2019 - Tested successfully
avatar Quy
Quy - comment - 14 Nov 2019

I have tested this item successfully on fc0d70a


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

avatar Quy Quy - change - 14 Nov 2019
Status Pending Ready to Commit
avatar Quy
Quy - comment - 14 Nov 2019

RTC


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

avatar wilsonge wilsonge - change - 14 Nov 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-11-14 16:16:24
Closed_By wilsonge
Labels Added: ?
avatar wilsonge
wilsonge - comment - 14 Nov 2019

Thanks!

Add a Comment

Login with GitHub to post a comment