magento - $ is not a function. But only on local dev server - magento

I took a backup of my live Magento site yesterday (zipped up the files and took a DB dump then created the site from those dumps).
Oddly though, on my local machine I get a firebug error that states "$ is not a function" and this error occurs every 500ms or so. So after a minute or 2 I have thousands of errors in the console all the same.
The site is an exact replica of my live site and I don't get the error on that so I'm stumped!
Usually I would think this is a prototype/jquery conflict, but it only seems to happen on my local machine.
Any one have a clue what might be going on?
Thanks

Load a page where you see the error.
View the source of the page.
Find the line that's supposed to load prototype.js by searching for the string prototype.js.
ex. http://magento.example.com/js/prototype/prototype.js
Discover that, for one of myriad reasons, the file isn't loading. (wrong URL, permissions, corrupt file, etc.)
Address problem discovered above.

Ok so this was the problem:
The reason it worked on live and not dev was because I had merge JS enabled on live and not on dev. Live was therefore looking at an old cached bunch of js. Disabling merge js on live highlighted that the problem did in fact occur on the live site.
This knowledge allowed me to debug further and I discovered that the problem lay with my jquery.hove.intent.js file. I updated this to the latest version and it solved everything! :)
Thanks all for your help and input though.

Related

INET_E_DOWNLOAD_FAILURE - how to clear cache?

I recently updated a website, removing an old CMS and converting the website to static html files and changing the hosting server.
Everything is working fine, except that my client tells me that everyone at his office is getting the error : INET_E_DOWNLOAD_FAILURE
They all use Internet Explorer 11.
I cannot reproduce it, I've tried loading on IE on my side but I cannot get the error. After some googling, I've seen that this is probably due to cache/cookies.
I understand that we cannot force browsers to remove cache, but is there a way to fix this without telling the client that he has to delete the temporary files on all their computers?

Drupal 7 very slow due to cache clearing at each page

I don't know exactly why my drupal 7 website became suddenly slow last week, after few days in production.
With xhprof, i see that at each page load,the system_list_reset() function triggers a call to cache_clear_all() function.
I deactivated all cache features.
I've read that it may due to missing files in modules and/or themes, but I didn't find missing files (except a wrong issue in 'missing module message fixer' module that indicates a missing module in view_export sub-module of view module).
I manually searched them , I didn't find where drupal can list these missing files.
Or maybe it's due to another problem.
Regards,
Open page inspector of your browser and in network tab check what files have unusually long loading time. It maybe be that some external service is causing this. Also it can be that your site is hacked...
Check most banal reason, the storage space - maybe disc of your server is full?
Check if file paths drupal is using are writable. Go to Configuration -> Median -> File system and just click Save. If some path is not writable it will get red outline.
Go to Reports -> Recent log message and check if some issue is maybe logged there. Also check for web server/php logs.
Try updating modules and drupal core - maybe some bug caused that and it's hopefully fixed in module update.
If not, try disabling modules one by one and see will that still happen. If you don't find problematic module try the same method with your theme. Would be good not to try this in production development and/or make backup before doing this.
thanks a lot,
by disabling module one by one, and by "datamining" in drupal DB, i've found that ADVAGG module was guilty.
The clean was difficult, because some entires remains in some tables of Drupal DB afther the module removing, but I hope it Ok.
BEWARE OF ADVAGG MODULE !
Funny :-/ with 'top', I've found a mining soft in /var/tmp/
systemd-private-a5422b1e6694466bbb0b63203573cad1-apache2.service-jMBN4U : nullcrew (from https://github.com/xmrig/xmrig)
I will investigate how it could land on my webserver
Best regards,

Joomla 2.5.16 take up to 2min to load

A relative asked me to fixed a Joomla website (v2.5.16) who has been hacked last year, probably due to lack of update (is up to date now), unfortunately I have no information about this. The issue is that the front end take 2~ min to load. The administration is loading normally so whatever the issue is, it depend of the front end. I already disabled all modules one by one and switched the template with another one to make sure that thebug is not in template or plugins folders, without success.
I must add that the problem is "probably" more recent than the hack, according to this person. So maybe there was a script somewhere reaching a random server which may not work anymore.
PS : the website is on a shared hosting. I have the FTP access but no ssh.
I know that I don't give any details which can lead to resolve this, but I need more a method to track what can go wrong and where than a solution.
Thanks in advance,
We have written a lengthy post explaining why a website might be slow: http://www.itoctopus.com/20-questions-you-should-be-asking-yourself-if-your-joomla-website-is-slow
From the looks of it, it might that the website is still hacked. Try overwriting the Joomla files with a fresh Joomla install and see if that addresses the problem.
Solving this issue will probably involve some or all of the following:
updating Joomla and all third party extensions to the latest versions
checking for and fixing malicious files using http://myjoomla.com or
https://sucuri.net or similar
analysing the performance of the website using http://gtmetrix.com
(it's free) or similar to pinpoint and fix what is taking the most time to
load
If the website has been hacked, you may need to reset passwords etc once the malicious files have been removed. See https://joomla.stackexchange.com/a/180/120 for more information about securing the website once it is fixed.

Magento maintenance.flag mysteriously created, shutting Website down

For some reason my Magento 1.6.2 site has gone into maintenance mode twice in the past 12 days, yet I haven't installed or updated any extensions (as far as I'm aware) during that time. It's pretty frustrating, since I don't even realize my site is down until I hear it from a potential customer. I can easily fix the problem by deleting the maintenance.flag that gets created in my root directory, but I want to know how to stop this from occurring. I'd hate for my Website to go down while I'm sleeping or over the weekend, and lose out on hours-days of potential revenue.
Has anyone else encountered this issue of phantom maintenance.flags being created? Is it possible one of my previously installed extensions is automatically updating and causing a problem? Is there any way to disable my site going in to maintenance mode without my consent? Any help is appreciated!
The problem might be error in one of your page rendering, like your one of file might contain error and on execution of that particular page(on request by customer) it gets error and goes into maintenance mode.
If you check index.php file, you’ll notice one interesting thingy, it checks for existence of “maintenance.flag” file in store root, if it’s found your store is put into maintenance mode. Service Temporarily Unavailable page is displayed with Please try again later message.

Flex 4 with PHP and BulkLoader - Assets getting deleted

Has anyone ever encountered a situation where your assets (image png files) got deleted from your web path?
Let me explain it little more clearly.
I am loading some images located in my localhost (not in flex4 application path) from my flex4 application using the loader and also with BulkLoader
This is the second time it happened that some of the images got deleted from the path which are in localhost.
I am not sure what is causing this? is that the loader? or bulkloader or the webserver? (WAMP) or any virus?
It happened 2nd time in last 7 days. I was lucky that I had a copy in the remote host so I got them back easily. But its a mistrey what and why it is getting deleted.
Any thoughts what might have caused this? or anyone knows any bug in the Loader or BulkLoader?
Well I found the answer. The culprit is the Flash Builder.
I am prity sure many of flash developers have faced the debugger launching issue where the flash builder never launches the app as it might have struck up some where and it halts the launching process at around 50-60% progress. It happened to me too and happens considerable enough times in a day.
I just found that this is linked to the issue which I have asked.
FB cleans the debug/output folder every time the app is compiled. I wouldn't have mind if it cleans only the project files. However, it just removes all the contents in the folder and adds them back. This happens in the back ground every time I change the code and save and run or "Clean" the project to build a fresh copy.
During this process (removing and adding files back) if the FB struck up and I forcefully terminate the process (which is must some times); my files are gone.
The flash output folder is my web root where I will have all my php, assets and all server-side stuff.
I will open a topic to discuss on how to avoid it which also I have problem there too.

Resources