?
avatar Bakual
Bakual
20 Sep 2017

Steps to reproduce the issue

I guess any extension using the FTPClient class is broken with J3.8.0.
I have an example one, but it needs an FTP account on the german DWD server. Unfortunately they don't give them out anymore since the service is going to shut down soon ?

Expected result

Works

Actual result

White page of death due to missing wrapper for "buffer"

System information (as much as possible)

J3.8.0

Additional comments

The failing code line is https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Client/FtpClient.php#L858:
$tmp = fopen('buffer://tmp', 'br+');

Since J3.8.0 it returns false.

The responsible PR is #16934 which renamed JBuffer.
Thus pinging @laoneo

According to Michael it worked before due to the way JLoader loads the classes into memory. With the namespaced classes and its autoloader, that is no longer the case and we need to somehow register the wrapper in a better way.

Adding stream_wrapper_register('buffer', '\\Joomla\\CMS\\Utility\\BufferStreamHandler'); to the constructor of FtpClient did get it back to work, but I got a warning "stream_wrapper_register(): Protocol buffer:// is already defined." so that's not right.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar Bakual Bakual - open - 20 Sep 2017
avatar joomla-cms-bot joomla-cms-bot - change - 20 Sep 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Sep 2017
avatar jpreville
jpreville - comment - 21 Sep 2017

I can verify that i'm also getting the same error. On a couple plugins on my site. Is there a easy solution?


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Sep 2017
Category Libraries
avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Sep 2017
Priority Medium Urgent
Status New Confirmed
avatar Bakual
Bakual - comment - 21 Sep 2017

Didn't try yet. I was to tired to look further ?

avatar Bakual
Bakual - comment - 21 Sep 2017

@jpreville You can add the line new JBuffer; to your code and it will work. Looks like a hack to me though.

avatar jpreville
jpreville - comment - 22 Sep 2017

@Bakual Thank you for the reply. Exactly where do i try placing the

stream_wrapper_register('buffer', '\Joomla\CMS\Utility\BufferStreamHandler');

in the FtpClient.php file?


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

avatar Bakual
Bakual - comment - 22 Sep 2017

In the constructor or before the line I referenced in the issue description.

avatar laoneo
laoneo - comment - 22 Sep 2017

Can you guys test #18060, does it fix the issue?

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Sep 2017
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2017-09-22 08:49:13
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - close - 22 Sep 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Sep 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Sep 2017

closed as having Pull Request #18060


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

Add a Comment

Login with GitHub to post a comment