Support

Admin Tools

#30711 Inability to publish/upload media w/o any .htacess change

Posted in ‘Admin Tools 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
Admin Tools version
n/a

Latest post by nicholas on Friday, 28 December 2018 11:29 CST

allfive
I've had the same .htaccess and .htaccess.admintools running for several years that covered the 1.5.26 site as well as a subdirectory Joomla 3.9 development install. Everything in both has been working fine. (No errors as reported below in the 3.9 install.)

Recently the live site (subject of this ticket) will not allow me to upload images for Joomla articles. (I use only the backend to publish.)

Error: "The server returned an invalid JSON response"

I can create new articles and save as published and they are saved but do not publish. I can edit previously published articles and their images just fine.

Akeeba backup works fine. Admin Tools however cannot publish modified .htaccess rules - JFTP::write: Bad response

Permissions seem fine.

The configuation.php file cannot be accessed from the Joomla Install. No errors show in the browser Developer Tools.

Access to the server is no problem with my FTP app. Those credentials match what is in FTP setup in Joomla install.

I read previous tickets, including "#11829 – JFTP bad response after fix permissions in admin tools". Also reviewed "Exceptions" and "How to determine which exceptions are required" in documentation.

The server error logs show lots of errors prefixed with:
"PHP Strict Standards: Non-static method JLoader::register() should not be called statically in"

…as prefixed to, for example:

/libraries/joomla/document/document.php on line 19
/libraries/joomla/cache/storage.php on line 173
/libraries/joomla/cache/cache.php on line 19
/libraries/koowa/http/uri.php on line 454
/libraries/loader.php on line 186

…and etc.

I need to keep publishing under this old site for several more weeks until I can complete the new site.

I'm completely stumped as to what is going on. Way above my level at this point.

Thanks for the help.

nicholas
Akeeba Staff
Manager
I'm sorry, Don, we have stopped providing support for Joomla! 1.5 six years ago, in 2012. That's a lifetime. I no longer have the tools to help you with such an old site. I can only make a guess.

Regarding the FTP issue, try setting the permissions of the .htaccess file to 0777 and immediately after that click on Save & Create .htaccess. If that works the problem was wrong ownership of the file (don't worry, by overwriting it the permissions are now back to 0644). If that did not work and you are 100% sure that your FTP credentials are correct then the problem is likely the FTP server doing something which is incompatible with the ancient Joomla! 1.5 code base. I can't think of what -- I've not looked at Joomla! 1.5's code base in 7-odd years.

About the image upload, sorry, no idea anymore. As I said, I haven't looked at 1.5's code in over 7 years, I can't even remember how the media manager worked back then. I THINK that back then we had two ways to upload an image, a browse field with an upload button and a drag'n'drop area. I THINK that the drag'n'drop area used Flash and expected a JSON response but that stuff should have broken a while ago due to security changes in modern browsers (even IE10). Using the regular browse filed & upload button should still work just fine since it's a simple upload form. Now, I know that in Joomla! 3 you can restrict uploads through the Options of the Media Manager. I can't remember if we had something like that in 1.5. Probably go to Content, Media and click on Preferences. Finally, make sure PHP has an adequately large post_max_size and upload_max_filesize for the image you're uploading.

If that works exactly as I said I will be surprised, mostly with myself for retaining knowledge after 7 years of not using Joomla! 1.5 :) But hopefully I am at least pointing you down the right path.

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!

allfive
Thanks, Nicholas, for the valiant attempt to help. :)

try setting the permissions of the .htaccess file to 0777 and immediately after that click on Save & Create .htaccess.


Just so I'm clear:

There are two .htaccess files created by Admin Tools: .htaccess and .htaccess.admintools? You suggest I set the permissions of .htaccess to 0777 and click Save and Create in Admin Tools?

Regarding Global Configuration>FTP Root, I have tried "/" and "/httpdocs" (w/o quotes). Neither works currently. The server path of the install as shown in the Code Editor of Plesk is "website name.org/httpdocs". Any wrong assumptions there as to the FTP root?

Similarly, in Admin Tools > System Configuration, the base directory field should be what, based on the above?

As a last resort, can I disable Admin Tools' .htaccess files and enable the default Joomla for editing and publishing purposes, then revert. This server has tons of lockdowns, apparently, and something may have changed within the last month that conflicts with the 1.5 install, even though the up-to-date 3.9 install in the subdirectory works fine.

Many thanks again, kindly.

don



nicholas
Akeeba Staff
Manager
I mean .htaccess proper. The other file is a backup copy of the original file, in case something goes wrong and you want to get your site back up and running fast.

The FTP directory is a bit finicky. The best way is to connect to your site with FileZilla, go to the site's root and note down the folder displayed above the right hand folders pane. This is the directory you want to copy to Joomla.

Admin Tools does NOT see the FTP settings and there's nowhere to configure them. It simply writes to files using JFile::write() which automatically goes through Joomla's FTP settings.

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!

allfive
The solution was that I didn't notice that the FTP layer was ticked ON. I couldn't remember whether it was originally on or off, I hadn't changed settings forever, it seemed.

Turning Joomla! 1.5 FTP layer to OFF solved the problem.

However, I did need to change the site root in Admin Tools' .htaccess maker to "/".

I do have issues with the FTP layer in J 2.5, too, but I'm moving away from that version ASAP, as well as with this 1.5 version.

Good riddance 1.5 !

Happy New Year to all. :)

nicholas
Akeeba Staff
Manager
Amen to that! Happy New Year :)

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

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!