? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
14 May 2021

Closes #29455

Summary of Changes

Move check for offline mode from render to dispatch method so that modules are not rendered on 403

Testing Instructions

Set your Joomla 4 site to offline mode in Joomla global config

Visit the frontend.

Attempt to login as admin - you can - great - you can see the site - great.

Attempt to go to https://example.com/index.php/component/config = 403 Error (Some module positions will render like headers and footers and maybe menus depending on your template

Apply PR, repeat test, this time at https://example.com/index.php/component/config you will get a login box.

Actual result BEFORE applying this Pull Request

Attempt to go to https://example.com/index.php/component/config = 403 Error (Some module positions will render like headers and footers and maybe menus depending on your template

Expected result AFTER applying this Pull Request

this time at https://example.com/index.php/component/config you will get a login box. You can login to see your site

Also

Cleans up two unused language vars.

Documentation Changes Required

None

avatar PhilETaylor PhilETaylor - open - 14 May 2021
avatar PhilETaylor PhilETaylor - change - 14 May 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 May 2021
Category Libraries
avatar PhilETaylor PhilETaylor - change - 14 May 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 14 May 2021
avatar sandramay0905 sandramay0905 - test_item - 15 May 2021 - Tested successfully
avatar sandramay0905
sandramay0905 - comment - 15 May 2021

I have tested this item successfully on 3964cc9


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

avatar ceford
ceford - comment - 15 May 2021

With or without the patch I don't get 403 - just the Home page (multilingual site).


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

avatar PhilETaylor
PhilETaylor - comment - 15 May 2021

@ceford what url did you test to get the 403?

avatar ceford
ceford - comment - 15 May 2021

localhost/j4test/index.php/component/config/

but reloads as http://localhost/j4test/index.php/en/

also used https - Macbook Pro with Cataline / PHP8 / ... merged latest commits early this morning.


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

avatar PhilETaylor
PhilETaylor - comment - 15 May 2021

this just means your language redirects are kicking in before this PRs code, which is not a bad thing

What if you start at http://localhost/j4test/index.php/en/component/config/ - please run your testing starting at that url.

avatar ceford
ceford - comment - 15 May 2021

http://localhost/j4test/index.php/en/component/config/ gives me a 403 page with Banner, Top menu and Footer with Login. I also get an error call stack:

 403 You don't have permission to access this. Please contact a website administrator if this is incorrect. 

JROOT/components/com_config/src/Dispatcher/Dispatcher.php:50

with and without the patch applied


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

avatar ceford
ceford - comment - 15 May 2021

That last comment was wrong - I forgot to go off-line again. Actual result is as before.


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

avatar PhilETaylor
PhilETaylor - comment - 15 May 2021

So what you are saying is that yours was a successful test, when a site is multi-lingual, that you cannot replicate the issue this PR resolves, and your testing showed that this PR did not make your experience, with a multi-lingual site any worse.

avatar ceford
ceford - comment - 15 May 2021

Yes - I cannot reproduce the problem described on my multi-lingual test site. I do not get a 403 page.

avatar sandramay0905
sandramay0905 - comment - 16 May 2021

The successfully test above was on a multilanguage site.

I've been test now using index.php/de/component/config (+ fr, fa), always successfully.

avatar PhilETaylor
PhilETaylor - comment - 16 May 2021

DO NOT TEST on a multi-lingual site. That never had the issue to start with, so this PR doesn't solve anything on a multi-lingual site.

All your tests prove on a multi-lingual site is that I did not break anything further.

Please try to replicate the reported issue. Replicate the issue, Apply the PR, repeat, and see the issue is resolved.

avatar sandramay0905
sandramay0905 - comment - 16 May 2021

Please try to replicate the reported issue. Replicate the issue, Apply the PR, repeat, and see the issue is resolved.

That's what i have done.

I was not aware to not test on a multilang site, sorry.

avatar PhilETaylor PhilETaylor - change - 16 May 2021
Labels Added: ?
avatar sandramay0905
sandramay0905 - comment - 16 May 2021

I had the issue on the multilanguage site. That's the first thing i do: do i understand the issue, can i replicate it. Then i test the pull request, the test was successfully.

avatar chmst
chmst - comment - 31 Jan 2022

@PhilETaylor could you please resolve conflicts?

avatar PhilETaylor PhilETaylor - change - 6 Mar 2022
Labels Added: Conflicting Files ?
Removed: ?
avatar PhilETaylor
PhilETaylor - comment - 6 Mar 2022

@PhilETaylor could you please resolve conflicts?

There are no conflicts that I can see to resolve. I have merged the upstream branch for the second time.

avatar PhilETaylor PhilETaylor - change - 7 Mar 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-03-07 18:33:34
Closed_By PhilETaylor
Labels Removed: Conflicting Files
avatar PhilETaylor PhilETaylor - close - 7 Mar 2022

Add a Comment

Login with GitHub to post a comment