[5.0] Make the includes check easier to read#41053
Conversation
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Brian Teeman <brian@teeman.net>
|
Proposal: If you change the following code, both files are identical except for line 4 (administator / site). Change this code to that of joomla-cms/includes/framework.php Line 81 in e6a7e95 |
|
I guess this is done on purpose as sites can include the index.php in an own script and then define that variable. If you want to change this, then please in another pr, but I'm not sure about the consequences, perhaps @wilsonge can shed some light into this. |
|
I have tested this item 🔴 unsuccessfully on b129c8d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41053. |
|
Can you post a screenshot of the error message and the url you have opened and the url you get redirected? |
|
Can you try with the latest fix? |
I can't shed any proper light. I mean it's always been intended that you can override defines.php rather than index.php at the top level of each app (https://github.com/joomla/joomla-cms/blob/4.3-dev/includes/app.php#L16-L23) so I assume this allows setting JDEBUG there. No clue why you'd choose to set it there. But making it consistent also makes sense to me. API should be included in this PR as it's based on administrator https://github.com/joomla/joomla-cms/blob/4.3-dev/api/includes/framework.php |
|
Should then API get the same logic as admin and site got in #40509? If yes, can you comment on the original pr? I will then update this one when the rest is done. |
Works, expected result. |
|
Can you mark it as a successful test? |
Ahh we error out instead of redirecting - one day I'll read code correctly the first time. Yeah just ignore me and I'll get back into my box |
Why these two files? Only file 1 seems to be addressed in this test. I access the root page of the joomla installation through the administrator (administrator/index.php?option=com_joomlaupdate). Or am I not testing it correctly? C:\xampp\htdocs\bugtesting5\joomla\administrator\includes\framework.php (file 1) C:\xampp\htdocs\bugtesting5\joomla\includes\framework.php (file 2) |
|
YOu can also test the second file when you go to the administrator subfolder and do the same. You can do it either from the joomla root or the administrator subfolder. |
|
I have tested this item ✅ successfully on 76d6a17 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41053. |
|
@sandewt can you give this one a test as well? |
|
thanks |

Summary of Changes
Makes the check if a configuration exists in the include files easier to read as it returns early when a condition doesn't exist.
Testing Instructions
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed