User tests: Successful: Unsuccessful:
follow up #24730.
copy permission when Batch copy items to a new category
the permission are copyied
permission are not copied
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
I have tested this item
I've tested with 2 articles which had differenc ACL modifications.
Both articles copied in 1 batch action.
Before patch: Copied articles have ACL like in new articles.
After patch: Each of the article copies has ACL like the particular copy source article.
@HLeithner and @wilsonge Release leads please check as also with PR #24730 if this is a bug fix so it goes into 3.9.next or a new feature for 4.0.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Status "Ready To Commit".
I'm not unhappy to call this a bug fix - but what happens if there isn't a entry in the permissions table for the asset - shouldn't we check in JTable that there actually is a asset_id for items
Agreed. The stuff that's component specific is fine. But this generic one needs more careful sanity checks
not so sure what "sanity check" you are talking about if target and/or source asset don't exists the query simply does nothing
Labels |
Added:
?
|
I guess just making sure there is an existing asset for the original item.
if ($oldAssetId)
query
Labels |
Added:
?
|
Labels |
Removed:
?
|
Labels |
Added:
?
|
I removed it because George requested more sanity checks, I'm also not sure if this is a bugfix because permission copying is missing or a new feature.
Atm I think it's a bugfix but ymmv.
for sanity check i've already answered #24736 (comment)
Inside JTable we check for asset support based on the asset id field being present
joomla-cms/libraries/src/Table/Table.php
Lines 178 to 182 in 6933bb1
we need something similar in the model so that we know if the item actually has an asset or not because right now we're just going to blindly try and clone assets even for items that don't have assets
did you mean something like $this->table->hasField($this->table->getColumnAlias('asset_id'))
?
Something like that yes
Status | Ready to Commit | ⇒ | Pending |
Labels |
Back to pending until change.
Labels |
Removed:
?
|
change made, please check, retest
I'll wait for the travis and appveyor and drone results, then test. Am already preparing.
yes you're right hasField()
was introduced in 4.x backported to 3.x now
I have tested this item
I have tested this item
I have tested this item
I have tested this item
In PHP error log when batching banners.
PHP Notice: Undefined property: BannersTableBanner::$asset_id in \joomla-cms-staging\libraries\src\MVC\Model\AdminModel.php on line 439
In PHP error log when batching banners.
PHP Notice: Undefined property: BannersTableBanner::$asset_id in \joomla-cms-staging\libraries\src\MVC\Model\AdminModel.php on line 439
Confirmed.
I have not tested this item.
I have not tested this item.
I have tested this item
@richard67 can you please retest?
@franz-wohlkoenig As soon as I have cooked and eaten I will re-test.
I have tested this item
1. Permissions are copied.
2. No "PHP Notice: Undefined property ..." anymore when batch copying banners.
I have tested this item
1. Permissions are copied.
2. No "PHP Notice: Undefined property ..." anymore when batch copying banners.
@franz-wohlkoenig Done.
Status | Pending | ⇒ | Ready to Commit |
Status "Ready To Commit".
Labels |
Added:
?
|
Basically what @Quy did in https://github.com/alikon/joomla-cms/pull/51/files is what I’m after - it makes more sense if we can make it work. Can we find out why that was failing?
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-08-03 10:11:04 |
Closed_By | ⇒ | alikon |
i've had 5 minutes of "send all to the hell" feeling...
...a little bit better now
Status | Closed | ⇒ | New |
Closed_Date | 2019-08-03 10:11:04 | ⇒ | |
Closed_By | alikon | ⇒ | |
Labels |
Removed:
?
|
Status | New | ⇒ | Pending |
@wilsonge I just see according to J3 database api doc my previous comment for you is wrong, i.e. this PR here is ok with "... ON ... " in 1 join condition. Is that right?
Regarding your sanity check, Nicola has merged noth PRs from @Quy so now it should be ok. Maybe reason why moving things down did not work is because the $this->table->get('id');
would be before that then and reset stuff somehow?
@HLeithner cause i'm not too much able to read only & fully understand code
i've made a test with your suggestion applyied ...... as a result permission are not copyied
so may I ask you to do the same test?
with your suggestion and without (only this silly pr)
........maybe you'll can confirm or deny my results
Tonight I can test again. But last changes were code style only so my old test should still be ok.
I have tested this item
I have tested this item
@viocassel or @Quy could you test again? Thanks in advance.
I have tested this item
I have tested this item
@viocassel Thanks for testing.
Status | Pending | ⇒ | Ready to Commit |
Status "Ready To Commit".
Labels |
Added:
?
|
Thank you for your engagement in Joomla!
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-08-08 11:21:07 |
Closed_By | ⇒ | HLeithner |
I have tested this item✅ successfully on c72d6f2
I've tested with 2 articles which had differenc ACL modifications.
Both articles copied in 1 batch action.
Before patch: Copied articles have ACL like in new articles.
After patch: Each of the article copies has ACL like the particular copy source article.
@HLeithner and @wilsonge Release leads please check as also with PR #24730 if this is a bug fix so it goes into 3.9.next or a new feature for 4.0.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24736.