? bug PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
10 Oct 2023

Pull Request for Issue #42114 .

Summary of Changes

  • refactor the code so cli installation doesn't throw

Testing Instructions

Install joomla using cd installation and php joomla.php install.
Make sure that you set the public folder option --public-folder to a valid directory (or do not provide any options and follow the questions but provide a valid path for the public folder)

Actual result BEFORE applying this Pull Request

DB error

Expected result AFTER applying this Pull Request

No errors

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar dgrammatiko dgrammatiko - open - 10 Oct 2023
avatar dgrammatiko dgrammatiko - change - 10 Oct 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Oct 2023
Category Libraries
ec5c8d2 10 Oct 2023 avatar dgrammatiko CS
avatar dgrammatiko dgrammatiko - change - 10 Oct 2023
Labels Added: PR-5.0-dev
avatar richard67
richard67 - comment - 10 Oct 2023

@dgrammatiko Shouldn't the testing instructions tell to use the public folder option --public-folder? As far as I understood the issue, the CLI installation broke only with using that option. Or was that wrong and it's broken also when being called without that opzion?

avatar dgrammatiko
dgrammatiko - comment - 10 Oct 2023

Shouldn't the testing instructions tell to use the public folder option --public-folder?

Good call, fixed

avatar dgrammatiko dgrammatiko - change - 10 Oct 2023
The description was changed
avatar dgrammatiko dgrammatiko - edited - 10 Oct 2023
avatar dgrammatiko dgrammatiko - change - 10 Oct 2023
The description was changed
avatar dgrammatiko dgrammatiko - edited - 10 Oct 2023
avatar richard67
richard67 - comment - 10 Oct 2023

Shouldn't the testing instructions tell to use the public folder option --public-folder?

Good call, fixed

@dgrammatiko Where? I see no change in the description. Now it's there.

avatar dgrammatiko dgrammatiko - change - 10 Oct 2023
The description was changed
avatar dgrammatiko dgrammatiko - edited - 10 Oct 2023
avatar dgrammatiko
dgrammatiko - comment - 10 Oct 2023

@richard67 fwiw php joomla.php install without any options kicks an interactive set of questions, so the last question is about the public folder path. Leaving it empty skips the ceremony for the public folder...

avatar hans2103
hans2103 - comment - 10 Oct 2023

@dgrammatiko
This is what I see on my local machine at the end of cd installation;php joomla.php install before applying the PR.
I do not have a DB error.

Relative or absolute path to the public folder []:
 > 

OK
Validating DB connection...OK
Creating and populating the database...OK
Writing configuration.php and additional setup ...OK

                                                                                                                        
 [OK] Joomla has been installed                                                                                         
                                                                                                                        

hans2103@192 installation % 
avatar rabidgrowth
rabidgrowth - comment - 11 Oct 2023

Thank for the PR! Confirm is work now! ✅

Hope this includes in 5.0 at next Tuesday. I will use this + Ansible. Make build server easy for me.

avatar HLeithner
HLeithner - comment - 11 Oct 2023

this pr is scheduled for 5.0.1 thanks @rabidgrowth for the test

avatar ceford
ceford - comment - 11 Oct 2023

Clarification please: I unpacked the J5rc2 package and started from its installation folder. First try I answered all of the questions and entered the root folder:

/Users/ceford/Sites/j5rc2test

That ended in an error

OK
Validating DB connection...OK
Creating and populating the database...OK
Writing configuration.php and additional setup ...OK
Creating the public folder...
In PublicFolderGeneratorHelper.php line 112:
                                                                
  Unable to create the given folder, index.php already exists.                                                        

I did it again and left the public folder at the default [] and the installation went to completion with no errors. This is before applying the patch.

 Relative or absolute path to the public folder []:
 > 

OK
Validating DB connection...OK
Creating and populating the database...OK
Writing configuration.php and additional setup ...OK
                                                                                                                        
 [OK] Joomla has been installed

It has and works fine. So what error should I look for in the installed site?


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

avatar rabidgrowth
rabidgrowth - comment - 11 Oct 2023

@ceford You put all joomla files inside the folder /Users/ceford/Sites/j5rc2test, yes? Can not use same folder /Users/ceford/Sites/j5rc2test for public. Must use different folder. Example: /Users/ceford/Sites/rabidgrowth. After install ends the site is servered from /Users/ceford/Sites/rabidgrowth.

See my issue #42114 . I used folder outside from /var/www for joomla files, then folder inside /var/www for public.

Hope this is help for you!

avatar dgrammatiko
dgrammatiko - comment - 11 Oct 2023

@hans2103 @ceford the CLI installation is broken only if the user provided a path for the public folder (and maybe the path needs to be outside of the root path) otherwise nothing is broken

avatar ceford
ceford - comment - 11 Oct 2023

I see now, the cli installer is used for creating a site within a site or multiple sites on the same server. That did not occur to me. Thanks for the clarification.

avatar ceford ceford - test_item - 11 Oct 2023 - Tested successfully
avatar ceford
ceford - comment - 11 Oct 2023

I have tested this item ✅ successfully on ec5c8d2

To test I unpacked the download in ~/tmp/joomla5 and followed the instructions. Without the patch I got the Database error and with the patch I got a working site in ~/Sites/j5testcli (I keep all my test sites in ~/Sites). I had not twigged this is a way to keep most of the php code outside the public folder.


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

avatar richard67
richard67 - comment - 11 Oct 2023

Thank for the PR! Confirm is work now! ✅

@rabidgrowth Could you mark your test result right? It's not enough just to add a comment with a green check mark. It needs to submit your test result in the issue tracker. For doing this, go to https://issues.joomla.org/tracker/joomla-cms/42116 , then use the blue "Test this" at the top left corner, then select your test result and finally submit. Thanks in advance.

avatar rabidgrowth rabidgrowth - test_item - 11 Oct 2023 - Tested successfully
avatar rabidgrowth
rabidgrowth - comment - 11 Oct 2023

I have tested this item ✅ successfully on ec5c8d2


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

avatar rabidgrowth
rabidgrowth - comment - 11 Oct 2023

Sorry, didn't know. I now marked test inside tracker.

avatar richard67 richard67 - change - 11 Oct 2023
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 11 Oct 2023

RTC


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

avatar richard67
richard67 - comment - 11 Oct 2023

@ceford @rabidgrowth Thanks for testing.

avatar richard67 richard67 - change - 14 Oct 2023
Labels Added: ? bug
avatar HLeithner HLeithner - close - 18 Oct 2023
avatar HLeithner HLeithner - merge - 18 Oct 2023
avatar HLeithner HLeithner - change - 18 Oct 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-10-18 18:51:47
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 18 Oct 2023

thanks, there is another problem I will create a PR for

avatar dgrammatiko
dgrammatiko - comment - 18 Oct 2023

@HLeithner #42120 or another one?

avatar HLeithner
HLeithner - comment - 18 Oct 2023

I talk about #42168 no fix for #42120 yet

avatar dgrammatiko
dgrammatiko - comment - 18 Oct 2023

Nice but I think the error msg needs to be translatable

Add a Comment

Login with GitHub to post a comment