Support

Akeeba Backup for Joomla!

#36850 JCE Amazon S3 Plugin Using Akeeba Backup AWS S3 Library

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Wednesday, 30 March 2022 02:50 CDT

lacwebadmin

Hello!

I'm posting this as a question and I hope you'll give me time to answer. I know my issue is not related to your Akeeba Backup product. I don't have a problem with your products. 

Anyhow, I am trying to debug an issue with JCE Editor using their Amazon S3 plugin and for some reason, I cannot list the bucket content. I am getting:

Alert

The server returned an invalid JSON response.

But prior to that, I got a more descriptive error:

An error has occurred.
0 Akeeba\Engine\Postproc\Connector\S3v4\Connector::putObject(): [6] Could not resolve host: lacwebsite.s3.s3.amazonaws.com.amazonaws.com

Debug info:
Is there a flag or a way to enable the Debug info in your S3 library so I can see what's going on?   I'm sorry to bother you but any help would be greatly appreciated, I've been trying to fix this issue for quite some time and Ryan from JCE doesn't have a clue why either since it is working in his instance. I also setup a new instance outside of the dev box and network that I am working on and it worked. I just can't drop the current dev box that I am working on.   Thanks,   Jackson

nicholas
Akeeba Staff
Manager

There is no debug mode, you are already getting the debug message and I can tell you exactly what the problem is. The s3.amazonaws.com part is repeated which tells me that there's an issue in how Ryan is using our library. Using the us-west-1 region and the bucket name lacwebsite yields the correct domain name lacwebsite.s3.amazonaws.com which does resolve fine:

$ dig lacwebsite.s3.amazonaws.com

; <<>> DiG 9.10.6 <<>> lacwebsite.s3.amazonaws.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39256
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;lacwebsite.s3.amazonaws.com.	IN	A

;; ANSWER SECTION:
lacwebsite.s3.amazonaws.com. 42821 IN	CNAME	s3-us-west-1-w.amazonaws.com.
s3-us-west-1-w.amazonaws.com. 5	IN	A	52.219.192.73

I know this is not a problem with our library since I am using it in the Amazon S3 Fileystem plugin for Joomla 4 I will be releasing this week (https://github.com/akeeba/plg_filesystem_s3). You can ask Ryan to take a look at how I am using the library in this plugin in case he can spot what the problem is with his implementation.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

lacwebadmin

Hi Nicholas,

Thank you so much for looking at it and for your instruction, I will relay that to Ryan.

 

lacwebadmin

Hi Nicholas,

I like the idea of this plugin, but can I use to create a field type via XML form and it will save the media file into S3? I wish it does, then it solves my issue and I don't need JCE Editor S3 plugin.

Can't wait and try it out.

Thanks,

Jackson

nicholas
Akeeba Staff
Manager

XML forms can have EITHER a media field to select a media file OR a file (upload) field. The upload field needs to be handled by code and is outside the scope of this plugin and JCE.

So, I assume that what you really mean is “if I have a Joomla media field and someone clicks on it will the media manager popup be able to upload to S3?”. The answer to that is yes.

Every filesystem plugin in Joomla defines roots. These roots appear in the left hand side of the media manager. Select the root and you are viewing files from and uploading files to that root. It doesn't matter if that root is a local filesystem, a remote FTP/SFTP server, an S3 bucket etc.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

lacwebadmin

So, I assume that what you really mean is “if I have a Joomla media field and someone clicks on it will the media manager popup be able to upload to S3?”. The answer to that is yes.

That's what I meant. Can't wait for your release to test it out.

Thanks!

nicholas
Akeeba Staff
Manager

You'll have to wait a few days, I spent yesterday trying to help some Joomla core developers understand why a feature they pushed was bad — as in you-can-easily-lock-yourself-out-of-the-site bad. Hopefully I will manage to make a release this week 🤞🏽

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Easter vacation: We will be closed from 17 April 2025 16:00 UTC to 21 April 2025 06:00 UTC due to observing the Christian Easter holiday. Support will be closed during that time for both new tickets, and replies to existing tickets.

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!