Support

Akeeba Backup for Joomla!

#9092 Frontend CSS and Backend Wierdness after Site Transfer

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 Thursday, 20 October 2011 02:50 CDT

timbreese
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.23
PHP version: 5.2.17
MySQL version: 5.1.56
Host: CompuGeeks
Akeeba Backup version: 3.3.4

EXTREMELY IMPORTANT: Please attach your Akeeba Backup log file in order for us to help you with any backup or restoration issue.

Description of my issue:

After transferring my site to a new server with Kickstart and then trying it again to make sure that the settings are correct, I still get CSS template issues in the frontend http://72.52.155.159/~fusworg/
and template strangeness in the backend.
I have asked the new host to check for any problems on his end but as far as Kickstart goes it all looked good. Any ideas?

nicholas
Akeeba Staff
Manager
Hi Tim,

You are restoring to a temporary URL, not a real domain. This makes your .htaccess Maker setup incompatible with this temporary URL. Just rename your .htaccess file to something like htaccess.bak and when your site is ready to go live, go to .htaccess Maker, update the System Configuration settings and click on Save and Create .htaccess.

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!

timbreese
I have been using AdminTools to create .htaccess limitations. should I not have done that until the site was live?

Can I disable the .htaccess file in the new location? and then create a new one with AdminTools once the site is live?

dlb
Tim,

The problem is the tilde "~" in the url. Those temporary addresses are a problem. Your final site won't have that, so the .htaccess file will work.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

timbreese
.htaccess maker worked when I set it up on the other test site but after I made the current one into a .htaccess.bak the site now works. Thank you!! I will wait until we are live to make a new one with AdminTools.

timbreese
This corrected most of the issues but even after I removed the .htaccess file or renamed it there were still some issues:

- I was trying to change the color of a module by altering the Module Suffix and it would change but then not revert back.
- The PHP Settings appear but PHP Information does not.

Both of these things work fine on the old server!

Thanks for your help.

nicholas
Akeeba Staff
Manager
Hi Tim,

The first issue seems to be related with Joomla!'s cache, not server setup. When you assign a module suffix, this is tucked to the CSS class used in that module. If you have Joomla!'s cache enabled, the resulting HTML is cached and any change in the module suffix won't be reflected in the HTML output of your site unless the cache expires, you clean it manually or you disable it.

Regarding the second issue, Admin Tools can not block this function - but your host can! Ask your host what are the disabled_functions in their PHP setup. If they have included phpinfo in the list, then this page of Joomla! won't work, as the phpinfo() method used to produce the PHP information is no longer available.

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!

timbreese
I hope people tell you every day that you are BRILLIANT! Thank you so much- that was the problem!

I just wonder why the cache would not work the same way on the two servers. When I make changes like that on GreenGeeks the cache does not bother the process. Is there a server setting which might affect this?

nicholas
Akeeba Staff
Manager
You're welcome :)

Normally, if the cache is really operational, it will cause the same problem independent of the server environment it's running on. That's the purpose of the cache: to store the HTML output for a specific time in order to not have to generate it from scratch on every request, leading to considerable CPU usage reduction and, as a result, a faster loading site. My guess is that the cache wasn't really working on your old server.

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!

timbreese
You were so helpful before perhaps you can help me solve this issue which is probably related to the move to the new server.

This was not happening on the old host so I suspect it may have something to do with the move or the new server environment.

The problem is with my JomSocial registration. After the registration information has been entered and the register button clicked, the next page is a 403 Forbidden Error page. An email is sent to the person registering with the username and password and the text: "Once you have completed the rest of registration process, you will receive another email with activation link." However no other email is sent.
Steps to Reproduce: Just register either through the Member Login module or the Members Area menu link.

A 403 Forbidden error page that says:
Access is forbidden to the requested page:

72.52.155.159/~fusworg/index.php?option=com_community&view=register&task=registerProfile&profileType=0&Itemid=155 (port 80)

Thanks for your help!!

nicholas
Akeeba Staff
Manager
Hi Tim,

I don't really know much about JomSocial, so I may be of limited help here. First, make sure that it's not Admin Tools blocking the request by taking a look at WAF's Security Exceptions Log and making sure there is no entry there.

If it's not WAF, I've seen a lot of servers with Apache mod_security2 installed which throw such error pages when you have a password with special characters (anything except numbers and letters). In this case, try using a simple password consisting of only numbers and letters. Does that work?

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!

timbreese
I have deleted the .htaccess file for now. Would AdminTools still be running in a different way?

nicholas
Akeeba Staff
Manager
Hi Tim,

YOu are using a temporary URL (the one with ~username in it). .htaccess files generally do not play very well on those temporary URLs. I would suggest you to keep the .htaccess file turned off until when you launch the site. Then just go to .htaccess Maker, make sure the System Settings correspond to your new domain name and click on Save and Create .htaccess.

If you still have the same problem despite turning off the .htaccess file, please note that this means that you have a server issue. It could be something as simple as a conflict with the temporary URL you're using for your site, or a server-side protection kicking in as I explained in my last email. In both cases, only your host can help you out with that.

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!

timbreese
I suspect there may be an issue with AdminTools, I just can't figure out what is causing the error. Even though I removed the .htaccess file, it was replaced. I tried creating one with .htaccess maker and that didn't change things (it also didn't seem to alter anything else). I re-read the section of the AdminTools manual about trying to figure out what is causing the problem but I can't tell from this URL what the problem is:

http://72.52.155.159/~fusworg/index.php?option=com_community&view=register&task=registerProfile&profileType=0&Itemid=155

I am including a screen shot of the problem page with Developer Tools turned on.

Is there a setting in AdminTools which might reference the old URL?

Thanks, Tim

timbreese
This is what I find odd- when I turn on the debug system in Joomla I get this in the code of the second JomSocial registration page. Where is the old IP address coming from? and what is turned on in AdminTools to create this code?

nicholas
Akeeba Staff
Manager
Hi Tim,

Admin Tools DOES NOT automatically create a .htaccess file for you. There is exactly one way to create a .htaccess file using Admin Tools and that is by using the .htaccess Maker page. There is also exactly one place where the domain name and directory is configured in .htaccess Maker, in the System Configuration pane. The first two options there need your domain name without the the http:// or https:// prefix and the last option needs the subdirectory, or / in the typical case where Joomla! is installed on the site's root.

The only other place where you might find a reference to an old domain name is the SEO and Link Tools page, but this domain name is used to redirect from, not redirect to, the old domain name.

Regarding the IP addresses you see in the query, this is the IP address of the user currently accessing the site, not the site's IP. Look at the query. It's checking to see if you're on a blacklist. How this IP ended up there? Well, you access your site from this IP, this IP is reported to the web server, the web server reports it to PHP and PHP reports it to Admin Tools.

Overall, I am convinced that your problems have nothing to do with Admin Tools but have everything to do with the use of a temporary URL which, as I have said a gazillion times, is known to cause issues. Redirections rarely work with a temporary URL and, guess what, Joomla! uses a ton of redirections, after each data modification step. Likewise for POST requests. Moreover, a temporary URL does not allow the web server to report the correct domain name and path to Joomla!, therefore you must edit your configuration.php file and set the $live_site parameter to your temporary URL, i.e. http://72.52.155.159/~fusworg in your case. Let me reiterate this: temporary URLs and Joomla! don't mix very well. Every time I've tried it, I've had huge issues. When activating the regular domain name on the host, all those weird problems ceased. My advice is to have a "spare" domain name and attach it to your in-development site instead of using a temporary URL. When you're done developing, attach the regular domain name to your site and you're done. Trust me, it will save your sanity.

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!

timbreese
Thank you so much for your assistance. I tried putting in http://72.52.155.159/~fusworg in the configuration.php file but then the links stopped working.

I will try a temporary domain name to test it. I just wonder why it worked on the other server for development and not this one. I appreciate the clarification on the IP as well.

Best, Tim


nicholas
Akeeba Staff
Manager
Hi Tim,

Yeah, the temporary domain name is what most likely will do the trick. Temporary URLs are full of pitfalls :) Please let me know how it goes!

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!

timbreese
Yes! Pointing the DNS and domain name to the site did solve the registration issue! Yay!

Now unfortunately other issues have popped up. I had set up a firewall on the old site and when the DNS propagated suddenly I had a user name/password request on the backend before I got to the Joomla Admin login page. Huh!?

Also- before and after the DNS change I published an article on the backend for others to edit on the frontend and as soon as they changed the text and hit Save, a 403 Error screen appeared.

This kind of weirdness is so disconcerting and time consuming!

Thanks for your help!

timbreese
I realized it must have been a firewall file that got moved to the new site but didn't activate for some reason until the DNS change. It is the same user name and password that I had set up on the old server. Where is that file? Should I update the user name and password on AdminTools Firewall to overwrite the file?

I don't understand the 403 Error on saving an article on the frontend though. It was only on newly created articles on the backend. The older articles can be edited. It happens when you try to Save or Cancel editing the new article. This was the case even after I trashed the new article and created a new one in its place.

nicholas
Akeeba Staff
Manager
Hi Tim,

The password protection you get is most likely due to the .htaccess file inside your administrator directory. You seem to have used Admin Tools' "Administrator password protection" feature. You can either use that again to disable the password protection, or remove the .htaccess and .htpasswd files from the Administrator directory.

The 403 error is coming from Admin Tools. I will know exactly what happens once you do this:
- Trigger the 403
- Go to your site's back-end, Components, Admin Tools, Web Application Firewall, Security Exception Log. Take a look at the topmost row on the table. What is the Reason mentioned?

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!

timbreese
I re-engaged the Administrator Password. All is cool with that.

The hosting company thought that the problem with not being able to save an edited article was related to the MOD security.

When I went on the Joomla Forums others who had this problem switched editors to solve it. Switching to JCE did work for me.

When I went to the Security Exceptions Log the reason given was XSS Shield. What does that mean? Even though it is working I would still like to know!

nicholas
Akeeba Staff
Manager
Hi Tim,

As mentioned in the documentation:

When enabled, Admin tools will try to detect common cross-site scripting (XSS) attacks and block them. The filtering is able to detect many such attacks, comprising of malicious Javascript and PHP code, but it can not be exhaustive. Hackers find new types of attack every day. You are advised to follow sane security practices (like updating all of your extensions and templates to their latest releases immediately) on top of using this feature.


If you're wondering what a cross-site scripting (XSS) attack may be, I recommend starting by reading the Wikipedia entry for XSS.

That said, no automatic XSS filtering is perfect. All XSS filters, including Admin Tools' XSSShield, are either incomplete or operate on a hairline trigger. I chose the latter approach, but it throws a lot of false positives - more so if you have a forum. Practically, I'd say that it's not even required. The architecturally correct solution to XSS is extensions escaping their user-originating output and all current versions of extensions coming from reputable developers do that. For example, I have turned it off on this site without any adverse effects.

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!