Current time: 04-18-2014, 08:40 AM Hello There, Guest! (LoginRegister)

Post Reply 
Javascript broken across all sites suddently?
02-15-2012, 02:16 PM
Post: #1
Javascript broken across all sites suddently?
Hey guys,

Weird thing has happened sometime yesterday. Anything that uses Javascript across our sites *and* sub-domains will not function. For example, on two different instances of Joomla on 2 different sites, our image slider module will not load properly.

Thinking this might be a Joomla-related issue, I looked into it a bit further, but in the process found out that our install of ActiveCollab (a project collaboration system completely different from Joomla) was also reporting to all users an error message that "Javascript is not enabled on your computer" as if that were the case (our users all use different browsers/hardware, and this error popped up at around the same time for all of them).

Also, the Joomla admin backend will not function properly. The drop-down menus that house all admin functions will not properly "drop-down", meaning we cannot administratively change any things related to our sites.

This is so strange and happened so suddenly. Does anyone have even any clue as to what might be going on here? You'd save us a lot of a trouble, we would reeeally appreciate it.

Thanks.
Find all posts by this user
Quote this message in a reply
02-15-2012, 07:34 PM
Post: #2
RE: Javascript broken across all sites suddently?
I assume you haven't made any changes to anything on the server lately? How about the mod times of your JS files? Have they all suddenly changed? Are the JS files actually being sent (check your logs and the developer tools in your browser).
Find all posts by this user
Quote this message in a reply
02-15-2012, 07:53 PM
Post: #3
RE: Javascript broken across all sites suddently?
(02-15-2012 07:34 PM)bobocat Wrote:  I assume you haven't made any changes to anything on the server lately? How about the mod times of your JS files? Have they all suddenly changed? Are the JS files actually being sent (check your logs and the developer tools in your browser).

Hey bobocat,

Yeah, you'd be right. No admin/server changes were made since over a week+ ago. I checked the mod times of my JS files, but again that's checking on the directories of 3 different sites. It's so weird something 'broke' on all 3 which all have different directories and different JS files. I replaced the Joomla JS files (like those from the Media/administration folders with ones from a fresh install of Joomla -- no luck).

I'm pretty new when it comes to some of this. How can I check logs and developer tools in my browser to look for hints as to what might be going wrong? Thanks so much for your reply!
Find all posts by this user
Quote this message in a reply
02-15-2012, 07:56 PM
Post: #4
RE: Javascript broken across all sites suddently?
it's not too weird if they are all on the same server and all running under the same user.

look in /home/USER/logs/SITE/http/(access|error).log
Find all posts by this user
Quote this message in a reply
02-16-2012, 06:51 AM
Post: #5
RE: Javascript broken across all sites suddently?
(02-15-2012 07:56 PM)bobocat Wrote:  it's not too weird if they are all on the same server and all running under the same user.

look in /home/USER/logs/SITE/http/(access|error).log

I checked there, and whenever I double-click to enter the directory in Filezilla (the FTP prog. I use), I get a "critical file transfer error". The file logo for it also resembles a shortcut and not a regular file folder, indicating there's like...nothing there or something. Any idea? Thanks again.
Find all posts by this user
Quote this message in a reply
02-16-2012, 07:03 AM
Post: #6
RE: Javascript broken across all sites suddently?
use ssh
Find all posts by this user
Quote this message in a reply
02-16-2012, 01:55 PM
Post: #7
RE: Javascript broken across all sites suddently?
What would happen if you point your browser to one of the JS file directly? Does it show the file at all? I suspect malicious .htaccess files were planted in you directories. php functions such as auto_prepend_file, if not used correctly, can stop your JS files from functioning properly. Look for suspicious files!
Find all posts by this user
Quote this message in a reply
02-16-2012, 10:53 PM (This post was last modified: 02-16-2012 10:54 PM by InsiderGamer.)
Post: #8
RE: Javascript broken across all sites suddently?
(02-16-2012 01:55 PM)perry Wrote:  What would happen if you point your browser to one of the JS file directly? Does it show the file at all? I suspect malicious .htaccess files were planted in you directories. php functions such as auto_prepend_file, if not used correctly, can stop your JS files from functioning properly. Look for suspicious files!

Hey perry,

You were right on the money. I used Google Chrome's Java console to find errors when displaying the page, and every .js file was throwing an error. When I went to the .js files themselves, they were still there, but there was a block of garbage code injected into the end of *each* .js file I have w/ Dreamhost, in every directory/sub-directory, etc. causing the error.

I removed the code on a few of my sites, and BAM, fixed it. But our main site, which has modules upon modules, has .js files all over the place. To remove this same identical block of code would be a veeery timely process.

Any insight as to how one might do this quickly? Write some quick script or something? I'm pretty newb when it comes to this stuff, so I'm afraid it might have to be manual cleansing of all my .js files if I can't think of anything. (Which is totally fine too, at least I now know what the culprit is!)
Find all posts by this user
Quote this message in a reply
02-16-2012, 10:56 PM
Post: #9
RE: Javascript broken across all sites suddently?
(02-16-2012 10:53 PM)InsiderGamer Wrote:  Any insight as to how one might do this quickly? Write some quick script or something? I'm pretty newb when it comes to this stuff, so I'm afraid it might have to be manual cleansing of all my .js files if I can't think of anything. (Which is totally fine too, at least I now know what the culprit is!)

Yes, as i mentioned before, learn a little bash and awk. It should take 5 minutes, tops.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: