Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Upmerge 2024-06-18 #43670

Merged
merged 18 commits into from
Jun 18, 2024
Merged

[5.2] Upmerge 2024-06-18 #43670

merged 18 commits into from
Jun 18, 2024

Conversation

pe7er
Copy link
Contributor

@pe7er pe7er commented Jun 18, 2024

Pull Request for Issue # .

Summary of Changes

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

MacJoom and others added 18 commits May 28, 2024 15:25
Signed-off-by: Martin Kopp <kopp05@infotech.ch>
* com_plugins

* order change

* close

* typo
- fixed tests/System/README.md broken link 
- renamed Cypress to System tests to have unique naming in documentation
- extended a little bit and linked Cypress.io
…oomla#43466)

* Fix for issue joomla#43465 writing configuration.php

Fix for issue joomla#43465 'Cypress System Tests fail when writing configuration.php'
. remember the original file permission
. set 644
. write file
. restore original file permission

additional:
. writing file to ${Cypress.env('cmsPath')}/configuration.php` and no more to 'configuration.php'
. error handle file is not existing

* typo

* updated system tests README

* corrected task names

* Update tests/System/README.md

of course, thank you for checking

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>

* deleted failure handler config_setParameter()

deleted failure handler for readFile as it is not needed, tested with chmod 0, Cypress fails with clear reason:

	CypressError: `cy.readFile("./configuration.php")` failed while trying to read the file at the following path:
	`.../43465/joomla-cms/configuration.php`
	The following error occurred:
	> "EACCES: permission denied, open '/Users/hlu/Desktop/no_backup/43465/joomla-cms/configuration.php'"

* typo

Co-authored-by: Brian Teeman <brian@teeman.net>

* typo

Co-authored-by: Brian Teeman <brian@teeman.net>

* chain the then()-calls

Chaining the then()-calls for a not so deeply nested code source
looks catchy - thank Allon for the recommendation

* adopted code formatting for better readability

* fixing lint:js errors

- deleted console.log statements
- used const for never changing value
- refactored file mask to not use bitwise operation '&'

* fixed lint:testjs errors

* Better fix for configuration.php permission issue

Working with the code when fighting with the drone shows that a `chmod`
was already implemented in `writeFile()`. Following changes with this commit:
- Only using `chmod` method synchronously
- Replaced setting directory mode to setting file mode before writing
- Setting file mode only if the file exists
- Having final file mode as parameter with default 0o444
- Using 0o444 as default file mode and not hard-wired 0o777
- The methods `getFilePermissions()` and `changeFilePermissions()` created for this PR earlier are deleted.

Enhancement of the `tests/System/README.md` for troubleshooting three-user-problem in having
Cypress running user, web server running user and `root` user.

This commitment has been extensively tested in various combinations. Every test contains:
- Checking error before
- Doing the patch
- Running installation twice and running overall test suite

Tests are:
- macOS 14.5 Sonoma, local with apache & Cypress same user, branch 4.4-dev
  - error before `> EACCES: permission denied, open './configuration.php'`
- Docker, one container with joomla and one container with Cypress, using `root` users inside containers
  - no error before, but `configuration.php` is 777
  - after the patch `configuration.php` is 444 inside container and shown 644 on host
  - tested four times, branches 4.4-dev, 5.1-dev, 5.2-dev and 6.0-dev
- Ubuntu 24.04 LTS local installation, one non-root users running Cypress and
  another non-root user running Apache, branch 4.4-dev
  - error before `> EACCES: permission denied, open './configuration.php'`
  - need to use `sudo` and need to set `umask 0`, see troubleshooting
- Windows 11 Pro, Laragon with Cmder, branch 4.4-dev
  - error before `> EPERM: operation not permitted, open 'C:\laragon\www\joomla-cms\configuration.php'`

All tests are successful:
- running `Installation.cy.js` twice, checking `configuration.php` 444 and params are set
- running complete system test suite without errors

* configuration.php CMS path relative && umask 0

- corrected mistake task writeFile was used with cmsPath + 'configuration.php'
- extended writeFile to set process umask 0
  - to prevent the 3-user-problem == no need to set umask 0 in sudo anymore

This commitment has been tested in various combinations. Every test contains:
- Checking error before
- Doing the patch
- Running Installation.cy.js only and running overall test suite

Tests are:
- Docker environment with drone images, root running Cypress and www-data running Apache, branch 4.4-dev
  - no error before, but /tests/www/cmysql/configuration.php has 777
- Ubuntu 24.04 LTS local installation, one non-root user running Cypress and
  another non-root user running Apache, branch 4.4-dev
  - error before `> EACCES: permission denied, open './configuration.php'`
  - need to use `sudo`, see troubleshooting (umask 0 is no more needed)
- Windows 11 Pro, Laragon with Cmder, branch 4.4-dev
  - error before `> EPERM: operation not permitted, open 'C:\laragon\www\joomla-cms\configuration.php'`
  - found out that on the second run cy.exec('rm configuration.php') does not work under Windows
    - deleted file manually and i will create an issue afterwards to avoid enlarging this one
- macOS 14.5 Sonoma, local with apache & Cypress same user, branch 4.4-dev
  - error before `> EACCES: permission denied, open './configuration.php'`

All tests are successful:
- running `Installation.cy.js`, checking `configuration.php` 444 and params are set
- running complete system test suite without errors

---------

Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>
* nested set table

* nested set table

* cs

* cs

* cs

* cs

* mainmenu

* before

* drone

* feedback

* feedback

* chain

* async

* cs

* cs

* return

* easier2read

Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>

---------

Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>
* com_languages

* typo

* silly lint

* Update tests/System/integration/administrator/components/com_languages/Installed.cy.js

Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>

* Update tests/System/integration/administrator/components/com_languages/Installed.cy.js

Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>

* Update tests/System/integration/administrator/components/com_languages/Installed.cy.js

Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>

* Update tests/System/integration/administrator/components/com_languages/Installed.cy.js

Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>

---------

Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com>
* System Tests README extended

- Extended with software architecture pictures and
  new folder tests/System/images for used architecture diagrams, see README.md there
- Described software architecture as overview and second time in detail
- Detailed and updated the existing documentation
- Added hints for testing and development
- Added troubleshooting

* added images folder to exclude

* Update tests/System/README.md - Better English

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update tests/System/README.md - Better English

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update tests/System/README.md - Better English

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update tests/System/README.md - Better English

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update tests/System/README.md - Better English

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update tests/System/images/README.md – British English spelling

Co-authored-by: Brian Teeman <brian@teeman.net>

* corrected exclude list to tests/System/images

* one paragraph reworded after the suggestion

---------

Co-authored-by: Brian Teeman <brian@teeman.net>
* Small spelling correction in dock blocks

* also fixed double

* also fixed double to-s

* also fixed double for

---------
* fix missing areialabel in pagenavigation

* Better aria-label

* loadlanguage

* Update plugins/content/pagenavigation/tmpl/default.php

Co-authored-by: Brian Teeman <brian@teeman.net>

---------
* remove unused inline event handler

* remove other instances of onload handler

* remove obsolete media attributes

---------
A very simple PR just to remove an unnecessary newline character in a comment.
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.2-dev Unit/System Tests labels Jun 18, 2024
@pe7er pe7er enabled auto-merge June 18, 2024 07:37
@pe7er pe7er merged commit f961e0d into joomla:5.2-dev Jun 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.2-dev Unit/System Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants