Support

Admin Tools

#10222 Help with AT system plugin problem

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 Wednesday, 11 January 2012 14:32 CST

Mobilepro
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)?Yes
Have I searched the forum before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 1.5.25
PHP version: (unknown)
MySQL version: (unknown)
Host: (optional, but it helps us help you)
Admin Tools version: 2.2.a2


Description of my issue:
Nicholas -

I'm hoping you can help shed some light on this issue I'm having. I came across a problem on one of my sites where images in Joomgallery (1.5.7.4) weren't displaying. I checked that there are no 404 or script errors showing in firebug but when I was troubleshooting by disabling system plugins it started working again when the AT plugin got disabled. All the settings in the plugin were default (all set to No)so my
first question is what is being impacted by having this disabled and secondly where should I be looking at this point.

Thanks for your help.

nicholas
Akeeba Staff
Manager
Well, if it is not the .htaccess Maker blocking the gallery, it has to be the Web Application Firewall. Please note that the "System - Admin Tools" plugin gets the security features configuration from the component, it's what you set in the Configure WAF page.

The good thing about WAF is that it is logging everything it blocks. So, enable the plugin, visit an affected gallery page and then immediately go to your site's back-end, Component, Admin Tools, Web Application Firewall, Security Exceptions Log. Take a look at the latest entry with your IP address on it. What does the "Reason" column read?

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!

Mobilepro
That's what's odd...I've never seen anything blocked with that component in any url in the exceptions log and I get the exceptions emailed also. I've also tried adding the component (com_joomgallery) as an exception in WAF with no effect but since it's not showing as being blocked I wouldn't expect it to matter.

Everything points toward the WAF as where the problem is but I can't find where it's being blocked. Can you think of anything I'm missing here?

nicholas
Akeeba Staff
Manager
Idea: Have you enabled WAF's "Remove all instances of Joomla from the output" feature? If so, try disabling it.

Moreover, you must be receiving some HTTP error code, be it a 403 or a 404. It's just not possible to see no errors and something not working. It defies common sense ;)

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!

Mobilepro
I checked that the "Remove all instances of Joomla from the output" is set to "No".

Just to verify, I loaded the page with the thumbnail gallery in webpagetest.org and it shows the images loading without errors. (I've attached a screen shot showing 3 of them loaded).

Normally I can bring up an image from one of the url links in the waterfall in an isolated window. When I do this with any of these gallery images it does a redirect pointing to this Joomgallery FAQ page:

"If images in detail view or the original images in pop ups aren't displayed this will be mostly caused by one or more certain system plugins.



It's pretty easy to check whether that's actually the case by disabling all system plugins in the plugin manager of Joomla and checking whether the images are displayed correctly after that. This is possible by filtering for 'system' first. Please note that it is very important to leave solely 'System - SEF' enabled (in order to not disable the SEF functionality).

If you are able to see the images in frontend after this step this is the proof that one of the installed system plugins is responsible for the problem.

Now you are able to find this plugin by enabling the system plugins again step by step while constantly checking whether the images are disappearing after a refresh of the page.



If you have find one or more such plugins please verify at first whether you site needs this plugin absolutely. In this case please report this with the name of the plugin in our forum and we may be able to help.



Additionally you could be able to help others by searching the plugin in the following list (it isn't complete). If it isn't there yet please report that in our forum, too. Thank you very much!"


I couldn't find anything in the Joomgallery forum relating to this issue (I love being the first :). Anyway there's no question which component I keep but would like to try and get Joomgallery working if at all possible.

nicholas
Akeeba Staff
Manager
Can you give me a URL to the affected page on your site?

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!

Mobilepro
http://www.thimblebee.com/Pantographs/pantographs.html

nicholas
Akeeba Staff
Manager
I visited that page and immediately received a 403. Please go to your site's back-end, Admin Tools, Web Application Firewall, Security Exceptions Log and look for the entry from the IP address 212.70.213.223. What does it read?

If you do not see such a record, please make sure that you're using Admin Tools 2.1.14 or 2.2.a2 and that "Log security exceptions" is set to Yes in the Configure WAF page. If it's set to No, set it Yes, Save and ping me so that I can visit the page again and generate a log entry you can see, paste the Reason here and help me help you :)

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!

Mobilepro
Sorry I forgot to clear the Geo-block for your location before I sent the link. Try it again...

nicholas
Akeeba Staff
Manager
I can not believe that a developer can be so ignorant... You have to disable the "Hide/customise generator meta tag" feature in Admin Tools' Configure WAF page.

Why? Because the developer of that gallery component does not understand how Joomla! works! This guy is using format=html to serve image data. Of course, this is just plain WRONG. Joomla! has format=raw exactly for this reason. Therefore, even though Admin Tools' plugin is using Joomla! 100% correctly, the gallery is using it 100% incorrectly, causing this problem upon itself when you use dynamic resizing (if you turn it off, it works properly). Well, you can disable this option in Admin Tools without compromising your site's security very seriously, but if I were you I'd just find a different gallery component, written by someone who at least understands the basics of how Joomla! works...

*sigh*

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!

Mobilepro
That was it...can't thank you enough for ALL your help with this....as always your support is second to none and I wish I had your patience :}.

btw Here's something you'll find interesting with format=raw vs. format=html from Joomgallery...

http://www.en.joomgallery.net/faq/general-faq/problem-with-certain-system-plugins.html

Thanks again,






nicholas
Akeeba Staff
Manager
Actually, the guy doesn't have a clue :) The proper solution is to use format=raw to serve non-HTML data. Admin Tools does not suppose it is running in HTML mode. Not ever. I write software which uses format=raw (that's how downloads are served by Akeeba Release System) so it would be stupid on my part, to say the least, to have Admin Tools break this behaviour. No, sir, we don't do that. We use JDocument's setGenerator() method. This is present in the base class (JDocument) out of which both JDocumentHTML and JDocumentRaw extend.

But since we're using JFactory::getDocument() to fetch the document, we do force Joomla! to create a specialised document object. If format=html or skipped altogether in the URL (or the SEF extension is .html) then a JDcoumentHTML is created. If you do set format=raw, however, a JDocumentRaw object is created.

Even the way things are right now, the developer could work around that! JDocument doesn't get rendered until AFTER the component has finished executing. If you want to abuse format=html to deliver non-HTML data (as I do, for the same reasons, in Akeeba Backup's backup page, where the AJAX requests no longer use format=raw) there is a workaround. Just use @ob_end_clean(), output your headers and data, then call JFactory::getApplication()->close() or jexit() (both are fine, but AFAIK jexit() is deprecated since Joomla! 1.7). This will halt Joomla! before it has the chance to use its internal document renderer. This is infinitely more stable than betting on being able to set the document type in a component.

Of course, all of this requires that the developer actually understands how Joomla! works. This guy has a few things to learn, but instead of learning he prefers to put the blame on plugins which are written to use the Joomla! Framework correctly, unlike his component...

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!