Skip to content

Conversation

@twister65
Copy link
Contributor

@twister65 twister65 commented Feb 23, 2020

Pull Request for Issue #27945 .

Summary of Changes

Provides the FTP configuration details, depending on the installation method.
Fix the FTP connection.

Testing Instructions

  • System -> Global Configuration -> Server -> Enable FTP -> Yes

  • Save & Close

  • System -> Update - Joomla -> Upload & Update

  • Installation method -> Write files directly

It hides all FTP fields.

  • Installation method -> Write files using FTP

or -> Hybrid (use FTP only if needed)

Expected result

It displays the FTP fields (host, port, username, password, root).

Actual result

It hides the FTP fields (host, port, username, password, root).

Additional comment

You can push the test to the end by clicking on the "Upload & update" button, but you will need an update package containing these modifications, and of course an ftp configuration corresponding to your test server.

@twister65
Copy link
Contributor Author

@richard67, if the selected file cannot be uploaded because it is larger than the maximum upload size, we have to use the FTP upload method, but I cannot make it work.
Depending on the outcome of the debate raised by @brianteeman , this will require some work.
#27945 (comment)

@richard67
Copy link
Member

@wilsonge It seems we need a decision about FTP, if to keep it or if to drop it.

@wilsonge
Copy link
Contributor

wilsonge commented Mar 1, 2020

We're keeping it.

@twister65
Copy link
Contributor Author

twister65 commented Mar 2, 2020

I can't make it work with Joomla! 3.x too.
Upload and update Joomla! via FTP does not seem to work.
We have ftp options, but it is not functional.
Has anyone experienced this?

@twister65
Copy link
Contributor Author

As I understand it, we only use FTP to update (write) files on the server but not to upload the selected file.
In this case, this PR is ready to be tested. It should work like Joomla! 3.x.
Question: Do I have to create a new PR to implement the upload via FTP ?

@wilsonge
Copy link
Contributor

wilsonge commented Mar 2, 2020

As I understand it, we only use FTP to update (write) files on the server but not to upload the selected file.

Not as far as my understanding went (admittedly I've never tested FTP Modes). We use JFile::write https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_joomlaupdate/models/default.php#L443 (downloads) and JFile::upload when uploading a zip https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_joomlaupdate/models/default.php#L995

anything using JFile should respect the global configuration settings for FTP - that's the entire point of the JFile class to have the FTP wrapper

Use FTP options from the configuration.
Fix the connect function.
@twister65 twister65 requested review from rdeutz and zero-24 as code owners March 2, 2020 17:40
@zero-24 zero-24 removed their request for review March 2, 2020 21:45
@twister65 twister65 changed the title [4.0] Supply the FTP details [4.0] Upload & update Joomla via FTP Mar 3, 2020
@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label Mar 8, 2020
@Quy
Copy link
Contributor

Quy commented Mar 8, 2020

Tested locally with XAMPP on Windows 10.

PHP Warning: fileowner(): stat failed for /tmp/330759cc93812163319df93121148c7f in \libraries\src\Filesystem\Path.php on line 279

@twister65
Copy link
Contributor Author

Tested locally with XAMPP on Windows 10.

PHP Warning: fileowner(): stat failed for /tmp/330759cc93812163319df93121148c7f in \libraries\src\Filesystem\Path.php on line 279

@Quy , which FTP server are you using in Windows 10 (XAMPP is just a web server) ? For example, with the Filezilla server, you must grant privileges to your FTP user.
Have you also correctly defined the root path of your joomla site in the global FTP configuration ?

in AKPostprocHybrid class
@yasin-96
Copy link

yasin-96 commented Aug 3, 2020

I have tested this item 🔴 unsuccessfully on 0447602

So I could reproduce the issue but it does not occur every time you select the "write files directly" option. This does not happen when you switch to another option and then switch back to the write files directly option. If you for the first time en ther the tab and switch to that option for the first time when ur in the upload & update tab then this behavior occurs.

After I applied the patch and executed the command npm install this issues was not fixed and the same happened as like I didnt apply the patch.


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

@nurcihandem
Copy link
Contributor

Tested the patch by following the instructions. Selecting "Write files directly" causes the form fields always to disappear. Selecting second or third option will display the form fields. Is this the expected behaviour?

Previously, the form fields did disappear once. But after selecting around, the form fields were always displayed.


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

@degobbis
Copy link
Contributor

degobbis commented Aug 5, 2020

Since the FTP credentials were implemented as a workaround for the wwwrun problem on web servers, such a server is necessary for a reliable test.

Windows with xampp is the wrong system for this.

A Unix based system with Apache and PHP as mod_php/apache2handler is required to test the correct use of FTP credentials.

Do we have testers with such a base here?

@joomla-cms-bot joomla-cms-bot removed the NPM Resource Changed This Pull Request can't be tested by Patchtester label Aug 8, 2020
@twister65 twister65 closed this Aug 8, 2020
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants