RTC PBF bug PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
24 Jan 2024

Pull Request for Issue ##42181 .

Summary of Changes

Adds a check to see if the symlink function is available in php before proceeding with the cli script to create a public folder and provide an informative error message

Testing Instructions

php .\cli\joomla.php site:create-public-folder

Actual result BEFORE applying this Pull Request

if the function is not available

php cli/joomla.php site:create-public-folder

Create a public folder
======================

 Please enter the absolute path to the public folder:
 > /home/webmaven/public_html/pubtmp6


In PublicFolderGeneratorHelper.php line 199:
                                                          
  Call to undefined function Joomla\CMS\Helper\symlink()  

Expected result AFTER applying this Pull Request

if the function is not available

 php8 cli/joomla.php site:create-public-folder

Create a public folder
======================

 Please enter the absolute path to the public folder:
 > /home/brian/public_html/ttt66
                                                                                                                        
 [ERROR] symlink() function is not enabled on the server. Please enable it to proceed   

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

avatar brianteeman brianteeman - open - 24 Jan 2024
avatar brianteeman brianteeman - change - 24 Jan 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Jan 2024
Category Libraries
avatar HLeithner
HLeithner - comment - 24 Jan 2024

symlink disabled in cli, wow, sorry I don't think we can and should check if every function is available.

avatar brianteeman
brianteeman - comment - 24 Jan 2024

Why not?

10e2ea7 24 Jan 2024 avatar brianteeman cs
avatar brianteeman brianteeman - change - 24 Jan 2024
Labels Added: PR-5.0-dev
avatar HLeithner
HLeithner - comment - 24 Jan 2024

because we use 100ts of php functions and can't check everyone and if you can't create symlink in the cli something is broken with your isp

avatar HLeithner
HLeithner - comment - 24 Jan 2024

but what every don't want to be a stopper here do what you like

avatar brianteeman
brianteeman - comment - 24 Jan 2024

Then we might as well remove all the other checks for php functions that already exist. This cli command relies 100% on the symlink function and it is VERY common that this is disabled.

avatar wilsonge
wilsonge - comment - 24 Jan 2024

symlink disabled in cli, wow, sorry I don't think we can and should check if every function is available.

On a lot of shared hosting symlinks are disabled in php.ini files - there's quite a lot of places we already check in core this this stuff. It seems like a very sensible check to me.

avatar Hackwar
Hackwar - comment - 20 Feb 2024

Can you implement the request from @wilsonge so that this can be tested during PBF?

avatar brianteeman brianteeman - change - 21 Feb 2024
Labels Added: PBF bug
avatar brianteeman brianteeman - change - 21 Feb 2024
The description was changed
avatar brianteeman brianteeman - edited - 21 Feb 2024
avatar brianteeman
brianteeman - comment - 21 Feb 2024

Changes requested by @wilsonge have been made and I have updated the description to show the new "expected result"

avatar alikon alikon - test_item - 25 Feb 2024 - Tested successfully
avatar alikon
alikon - comment - 25 Feb 2024

I have tested this item ✅ successfully on d0b138d


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

avatar Hackwar Hackwar - test_item - 26 Feb 2024 - Tested successfully
avatar Hackwar
Hackwar - comment - 26 Feb 2024

I have tested this item ✅ successfully on d0b138d


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

avatar Hackwar Hackwar - change - 26 Feb 2024
Status Pending Ready to Commit
avatar wilsonge wilsonge - change - 3 Mar 2024
Labels Added: RTC
avatar wilsonge
wilsonge - comment - 3 Mar 2024

Thanks!

avatar brianteeman
brianteeman - comment - 3 Mar 2024

@wilsonge did you intend to merge this? /me confused

avatar wilsonge
wilsonge - comment - 3 Mar 2024

I did - enabled automerge and updated the branch (so when tests pass after that it gets merged). But someone disabled it without comment so ?

avatar bembelimen
bembelimen - comment - 4 Mar 2024

Yeah, it was me, it was targeting the 5.0 branch and I just saw it on my mobile phone...that's why I disabled it, but thanksfully Martina rebased.

avatar bembelimen bembelimen - change - 4 Mar 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-03-04 11:00:41
Closed_By bembelimen
Labels Added: PR-5.1-dev
Removed: PR-5.0-dev
avatar bembelimen bembelimen - close - 4 Mar 2024
avatar bembelimen bembelimen - merge - 4 Mar 2024
avatar bembelimen
bembelimen - comment - 4 Mar 2024

Thx

Add a Comment

Login with GitHub to post a comment