No Code Attached Yet bug
avatar Rolli1962
Rolli1962
21 Nov 2022

Steps to reproduce the issue

User with Author-Rights and owner of an article want to preview an older version in edit-mode via versions.

Expected result

Can view the older article

Actual result

Get access right error 403

System information (as much as possible)

J4.2.5 (even fresh installed)

Additional comments

Try this feature with fresh installed Joomla-Versions 4.2.5 and 3.10.11.
With 3.10.11 it is working for the user with Author-Rights. With 4.2.5 not.
In 4.2.5 it is only working, if the user has general edit-rights like user-group editor.

nversions-accesserror

avatar Rolli1962 Rolli1962 - open - 21 Nov 2022
avatar joomla-cms-bot joomla-cms-bot - change - 21 Nov 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Nov 2022
avatar Rolli1962
Rolli1962 - comment - 24 Nov 2022

Would be only a hint I think ...
Found out, if I deactivate the access check in PreviewModel, than a Author is able to watch an older article via versions.
Don't understand, why the access-check is not working for a preview - the access-check for CompareModel is looking quite similar - but there are no access-errors for an author.
Changed (deactivated) lines in
administrator/components/com_contenthistory/src/Model/PreviewModel.php
`

   $user = Factory::getUser();

    // Access check
    //if (!$user->authorise('core.edit', $table->item_id) && !$this->canEdit($table)) {
    //    throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
    //}` 

Hopefully somewhere is reading this with more understanding how that all is working...

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar alikon alikon - change - 5 May 2026
Status New Closed
Closed_Date 0000-00-00 00:00:00 2026-05-05 18:37:27
Closed_By alikon
avatar alikon alikon - close - 5 May 2026
avatar alikon
alikon - comment - 5 May 2026

thank for checking @CSGoat0 i will close this issue for now
@Rolli1962 thank you for reporting as said before i'll close it , if you still have this issue feel free to open new issue, i'll link to this one for better understanding

avatar Rolli1962
Rolli1962 - comment - 5 May 2026

Have just tested with J6.1 - still the same issue.
For test-situation
a) User has only author-rights
b) User is mapped as author to an article
c) User try to overwork the article, klick the versions button and want to have a preview of an older version of this article. Still the error-message comes.

But as I have already written, if I am the lonely one who has the opinion this is a bug and should be fixed I can live with this. The workaround I have described is still working, even now with J6.1

Best - Roland

Image
avatar Rolli1962
Rolli1962 - comment - 5 May 2026
Image

Have just tested with J6.1 - still the same issue.
For test-situation
a) User has only author-rights
b) User is mapped as author to an article
c) User try to overwork the article, klick the versions button and want to have a preview of an older version of this article. Still the error-message comes.

But as I have already written, if I am the lonely one who has the opinion this is a bug and should be fixed I can live with this. The workaround I have described is still working, even now with J6.1

Best - Roland

Image
avatar Rolli1962
Rolli1962 - comment - 5 May 2026
Image

Have just tested with J6.1 - still the same issue.
For test-situation
a) User has only author-rights
b) User is mapped as author to an article
c) User try to overwork the article, klick the versions button and want to have a preview of an older version of this article. Still the error-message comes.

But as I have already written, if I am the lonely one who has the opinion this is a bug and should be fixed I can live with this. The workaround I have described is still working, even now with J6.1

Best - Roland

Image
avatar CSGoat0
CSGoat0 - comment - 5 May 2026

Have just tested with J6.1 - still the same issue. For test-situation a) User has only author-rights b) User is mapped as author to an article c) User try to overwork the article, klick the versions button and want to have a preview of an older version of this article. Still the error-message comes.

But as I have already written, if I am the lonely one who has the opinion this is a bug and should be fixed I can live with this. The workaround I have described is still working, even now with J6.1

Best - Roland

No, you are right @Rolli1962 .
It's a bug, I have tried again and there is 404 error.

@alikon it seems like I made a mistake, sorry.
Could you reopen this issue again? I will work on it.

avatar CSGoat0
CSGoat0 - comment - 5 May 2026

Have just tested with J6.1 - still the same issue. For test-situation a) User has only author-rights b) User is mapped as author to an article c) User try to overwork the article, klick the versions button and want to have a preview of an older version of this article. Still the error-message comes.

But as I have already written, if I am the lonely one who has the opinion this is a bug and should be fixed I can live with this. The workaround I have described is still working, even now with J6.1

Best - Roland

No, you are right @Rolli1962 .
It's a bug, I have tried again and there is 404 error.

@alikon it seems like I made a mistake, sorry.
Could you please reopen this issue again? I will work on it.

avatar CSGoat0
CSGoat0 - comment - 5 May 2026

Have just tested with J6.1 - still the same issue. For test-situation a) User has only author-rights b) User is mapped as author to an article c) User try to overwork the article, klick the versions button and want to have a preview of an older version of this article. Still the error-message comes.

But as I have already written, if I am the lonely one who has the opinion this is a bug and should be fixed I can live with this. The workaround I have described is still working, even now with J6.1

Best - Roland

No, you are right @Rolli1962 .
It's a bug, I have tried again and there is an error.

@alikon it seems like I made a mistake, sorry.
Could you please reopen this issue again? I will work on it.

avatar CSGoat0
CSGoat0 - comment - 6 May 2026

Hi @Rolli1962, I have written a fix for this issue.
It would be nice if you can test it.
Thanks!

avatar CSGoat0
CSGoat0 - comment - 6 May 2026

Hi @Rolli1962, I have written a fix for this issue at #47735.
It would be nice if you can test it.
Thanks!

avatar Rolli1962
Rolli1962 - comment - 6 May 2026

Even I am already on J6.1 - have changed the script there, is running. Thanks! Will it by also changed in a J6.x version?

avatar CSGoat0
CSGoat0 - comment - 6 May 2026

Even I am already on J6.1 - have changed the script there, is running. Thanks! Will it by also changed in a J6.x version?

I don't know to be honest, but in order to be merged faster I need you to mark this as tested successfully at issue tracker after signing in with your github.
Thanks for the test!

avatar Rolli1962
Rolli1962 - comment - 6 May 2026

Hope I have clicked on the right field …

Best - Roland

Von: Abdelrahman Nabil @.>
Gesendet: Mittwoch, 6. Mai 2026 16:32
An: joomla/joomla-cms @.
>
Cc: Roland @.>; Mention @.>
Betreff: Re: [joomla/joomla-cms] article - versions preview: No access with author-rights (Issue #39268)

https://avatars.githubusercontent.com/u/163023550?s=20&v=4 CSGoat0 left a comment (#39268) #39268 (comment)

Even I am already on J6.1 - have changed the script there, is running. Thanks! Will it by also changed in a J6.x version?

I don't know to be honest, but in order to be merged faster I need you to mark this as tested successfully at issue tracker https://issues.joomla.org/tracker/joomla-cms/47735 after signing in with your github.
Thanks for the test!


Reply to this email directly, view it on GitHub #39268 (comment) , or unsubscribe https://github.com/notifications/unsubscribe-auth/AONGHHF3NHCGXLC4H46WSW34ZNEELAVCNFSM6AAAAACYJRE2DCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DGOBZGA4TKNBVHE .
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
You are receiving this because you were mentioned. https://github.com/notifications/beacon/AONGHHG45LTJ5DFISBWZ3MD4ZNEELBFCNFSM6AAAAACYJRE2DCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTYAAAAACBM4JAR2M4TFMFZW63VHNVSW45DJN5XA.gif Message ID: @.*** @.***> >

avatar CSGoat0
CSGoat0 - comment - 6 May 2026

Hope I have clicked on the right field …

Best - Roland

@Rolli1962, I appreciate your help.😊
I need you to log in to the issue tracker at https://issues.joomla.org/tracker/joomla-cms
Then navigate to https://issues.joomla.org/tracker/joomla-cms/47735
Then Press the button in the photo, mark as successful and post your comment.
Thank you!

Image

Add a Comment

Login with GitHub to post a comment