Support

Admin Tools

#29216 404 'not found' for json file

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 vthomas on Thursday, 15 February 2018 05:27 CST

vthomas
I am using a rockettheme template (gantry 4) that lets me select from a list of google fonts for the template font. That list is found in the file: libraries/gantry/admin/widgets/fonts/js/google-fonts.json

RIght after selecting a google font the client wanted, I installed admin tools and created the htaccess file. I THINK then I did not happen to open the template settings section until today. When I did, the google fonts wouldn't 'load' and the error in the inspector console was:
"Failed to load resource: the server responded with a status of 404 (Not Found)" for public_html/libraries/gantry/admin/widgets/fonts/js/google-fonts.json
...and the font displayed on the front end was no longer that google font.

The file was there, right here: libraries/gantry/admin/widgets/fonts/js/google-fonts.json
So, the file was not really missing.

I remembered a list of file type extensions allowed in the htaccess file set up ... so I went back to check and json was not in that list. Just as a guess, I added that file extension. Then, the google fonts list loaded properly again in the templates setting, the error is gone, and the site is displayed in the desired google font again.

I submit this ticket in case someone else runs into this issue, with the suggestion that maybe json should be added to the list of file type extensions allowed by default and to ask if there is any security reason not to have json on that list.

Sincerely, Vicky
 Vicky Thomas

nicholas
Akeeba Staff
Manager
The correct fix would be RocketTheme finally figuring out after 12 (twelve) years that the libraries folder is NOT meant to be web accessible. The only web accessible folder that may be used by extensions to place web accessible assets is the media folder. This file should have been placed in media/lib_gantry/admin/widgets/fonts/js/google-fonts.json instead.

I have to stress that Joomla does allow the location of the "libraries" folder to be modified and have that folder even be placed outside the site's root. There's nothing stopping me from putting this folder one level up and name it "clinteastwood". I'd just need to update my defines.php file and that would still be a perfectly valid Joomla site, doing things the Joomla way. And it'd break Gantry. Because Gantry does not even pretend to follow Joomla's standards.

I have been telling Andy about these things. Last time -back in the Gantry 3 days- he agreed with me. You can see how much he cared to fix these fundamental issues in the next two major versions of Gantry. Meh.

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!

vthomas
Thank you so much! Vicky
 Vicky Thomas

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!