0

I have a problem with Magento. My admin part doesn't work because here is what I found in the source:

<script type="text/javascript" src="/var/www/vhosts/vps355363-1.lcnservers.com/myshoponline.co.uk/tesc/js/prototype/prototype.js"></script>
<script type="text/javascript" src="/var/www/vhosts/vps355363-1.lcnservers.com/myshoponline.co.uk/tesc/js/prototype/window.js"></script>
<script type="text/javascript" src="/var/www/vhosts/vps355363-1.lcnservers.com/myshoponline.co.uk/tesc/js/scriptaculous/builder.js"></script>
<script type="text/javascript" src="/var/www/vhosts/vps355363-1.lcnservers.com/myshoponline.co.uk/tesc/js/scriptaculous/effects.js"></script>

instead of

<script type="text/javascript" src="http://myshoponline.co.uk/tesc/js/prototype/prototype.js"></script>
<script type="text/javascript" src="http://myshoponline.co.uk/tesc/js/prototype/window.js"></script>
<script type="text/javascript" src="http://myshoponline.co.uk/tesc/js/scriptaculous/builder.js"></script>
<script type="text/javascript" src="http://myshoponline.co.uk/tesc/js/scriptaculous/effects.js"></script>

Can someone tell me why it does this and how can I fix it?

Andrei RRR
  • 3,068
  • 16
  • 44
  • 75

4 Answers4

1

Does your frontend work correctly? It looks like you probably have wrong 'base_uri' config data.

If you are not able to access admin, it can be changed directly in database (table core_config_data, path web/unsecure/base_url and web/secure/base_url).

Jürgen Thelen
  • 12,745
  • 7
  • 52
  • 71
Jakub Šimon
  • 361
  • 1
  • 7
  • Are you using any 'non core' modules? Have you tried deleting cache directory (magento-folder/var/cache)? – Jakub Šimon Feb 09 '12 at 11:18
  • Please provide the result of this SQL query "SELECT * FROM `core_config_data` WHERE value LIKE "/var/www%";" (assuming you're not using table prefix). – FbnFgc Feb 09 '12 at 11:33
0

This question has been answered before on SO:

Why is Magento 1.4 including javascript files by filesystem path?

Some people mentioned that the merge js option: go to System -> Configuration -> Developer Settings -> Javascript Settings -> Merge JavaScript Files (beta) and set it to "no".

This was not the case for me. In my case it was a permissions error. Use these commands on the root of your site via SSH to reset the permissions:

find . -type d -exec chmod 755 {} \;


find . -type f -exec chmod 644 {} \;


chmod o+w var var/.htaccess app/etc


chmod 550 pear


chmod -R o+w media


chmod 777 var/cache

It is probably just the js directory that needs it's permissions set however if that is messed up, who knows what else has been changed, so I would just reset everything with the above mentioned chmods.

Community
  • 1
  • 1
Eric Bäcker
  • 211
  • 1
  • 3
  • 8
  • if you are using magento version 1.5 or above, they switched the name of pear to mage trying to put their branding on everything. If this is the case for you please use: chmod 550 mage in place of: chmod 550 pear – Eric Bäcker Apr 25 '12 at 03:52
0

Check that media folder exists. If not, create it.

Jiří Chmiel
  • 876
  • 6
  • 20
0

You are probably generating the link using getBaseDir instead of getBaseUrl.

Max
  • 8,671
  • 4
  • 33
  • 46