Support

Admin Tools

#38583 Problem after installation of admin tool inside an existing webpage

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
4.2.8
PHP version
8.1
Admin Tools version
n/a

Latest post by nicholas on Wednesday, 01 March 2023 00:27 CST

HKai

I want to install the admin tool plugin inside an existing webpage. If I do this and clear the browser cache the backend page is destroyed (only text no formatting). I have now tested to start from scratch, install joomla 4, install admin tool and than the same plugins and components, it works. Does this mean that from an existing webpage, I have to delete all plugins and componets before I install admin tool?

nicholas
Akeeba Staff
Manager

Absolutely not!

God forbid if adding security to your site required you to start from scratch. That would be nonsensical.

Most likely, your existing site's configuration.php file has a non-blank $live_site line. That line must read:

public $live_site = '';

Nothing between the two single quotes.

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!

HKai

Inside of my configuration.php is no such entry. But now I have done the installation step by step in my complete webpage. The installation shows no problem, the activation of the plugin 'system admin tools' shows no problem. But if I rebuild the server config file, I see an error in frontend. An font, loaded inside of my templete can not be accessed.

nicholas
Akeeba Staff
Manager

Okay, now we're getting somewhere. The .htaccess Maker needs a bit of trial and error to tailor to your site and server. Please see https://www.akeeba.com/documentation/admin-tools-joomla/athtaccess500.html

Without having seen the site itself I can't know in advance which option(s) would need to be disabled. I can, however, make an educated guess that the most likely options to cause the problem would be “Protect against clickjacking”, “Reduce MIME type security risks”, or “Reflected XSS prevention”. If disabling these doesn't make a difference but disabling “Frontend protection” does then the problem may be what is described in How to determine which exceptions are required. This is something we've seen with some third party plugins which try to access files in the cache directory from the web, even though the cache directory is not supposed to be directly web-accessible.

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!

HKai

I have now found the files. The problem is always, to follow the information 'rebuild the server config file' and rebuild it. If I rebuild it the backend will not work any longer. The same happens now, if I move the webpage from my local system to the real web-adress. It is only possible to have the correct backend page one time, if I clear the browser cache, I have again the problem. The same happens, if I forget to delete the file 'autoload_psr4.php' inside of joomala cache. Then the first view is a joomla error message and if I delete the file, the backend is destroyed. If I use the standard joomla .htaccess-file it works, but all settings are lost. How can I solve this problem.

nicholas
Akeeba Staff
Manager

> The problem is always, to follow the information 'rebuild the server config file' and rebuild it.

This is the same as going to the .htaccess Maker and clicking on “Save & Create .htaccess”. If you have not followed the steps to determine what's wrong with your .htaccess Maker configuration you will always end up with the same problem.

> The same happens now, if I move the webpage from my local system to the real web-adress.

When restoring the site you need to pay attention at the Site Setup page. There's an option about what to do with the .htaccess file towards the top, right-hand side of the main content area of the Site Setup page. Tell it to use the default .htaccess so you can access your site's backend.

Keep in mind that after transferring your site you need to at the very least edit the .htaccess Maker configuration to change the HTTP Host, HTTPS Host, and Directory at the bottom of the page. You may have to change other options as well, as I told you three days ago.

Remember, the .htaccess Maker settings are specific to the current installation of the site i.e. the host, web server configuration, domain, subdomain, and directory the site is installed in. Whenever you move your site (between domains, subdomains, subdirectories, or hosts) you need to check and update this information before regenerating the .htaccess file.

> The same happens, if I forget to delete the file 'autoload_psr4.php' inside of joomala cache

This file should be regenerated automatically using the installed extensions' information. If it doesn't get created you will need to make sure that the administrator/cache directory is writeable to PHP. If it gets created but results in a class not found error it means that something is not installed correctly. Install the extension referenced in the error message twice in a row, without uninstalling it before or in between, then delete the autoload_psr4.php file once more and reload any page of your site to have Joomla regenerate it.

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!

HKai

I use the same php-version on my local system and my web system. In this case I have only to change the three settings: "Host name for HTTPS requests", "Host name for HTTP requests" and "Base directory of your site". Is this correct?

nicholas
Akeeba Staff
Manager

You definitely need to change these three settings.

If you are using the same PHP version on both live and local servers without any special .htaccess code in the “Code to add at the bottom of the file” then of course you don't need to change anything about it.

As for other .htaccess Maker settings, it depends solely on the configuration of your server. If you get a 500 Internal Server Error on the live server you will have to change the .htaccess Maker settings to find out which one doesn't work on the live site. This is something you cannot know in advance and which cannot be detected automatically (otherwise we'd be doing that for 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!

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!