magento 1.9 store displaying css issues - php

I have installed a copy of my magento 1.9 store on my localhost PC as i am trying to upgrade to magento 2. I need to transfer my products to my new store. i have installed my backup on my localhost but the sites css is all messed up.
i have cleared the cache folders but this did not help, how to fix this. I need to get this working correctly before i transfer my products from magento 1 to magento 2. I can install magento 2 easily but i can not get the magento 1 store to load correctly.

How to check where is issue?
View the source of your page and click the css links, if it is pointed correctly it should bring you to the css page.
Case 1: The problem was a missing Slash "/" at the end of the domain.
Use the following to get both rows:
SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';
Then update them manually and make sure the domain has it's final "/", otherwise it will merge the domain name with the following folder name.
Case 2: Update Merge Css flag
Need go to sql manager and do this:
SELECT * FROM `core_config_data` WHERE `path` LIKE '%merge%'
Then change values from 1 to 0 Clear cache and all will be ok
Case 3 Disable rewrite rule
https://magento.stackexchange.com/questions/10961/magento-htaccess-error

Related

Magento add to cart / customer login hidden after copy to new domain

I'm having a strange behaviour after moving a running Magento 1.7 to a new host (apache2.4.7 php5.5).
It is a copy of all the same Magento files and DB, but with new domain running on different machine.
So far:
Admin login is working
homepage shows up
All CMS, product categories, menu and products work
But as soon as I log in as customer or add a product to cart,
nothing happens:
Login credentials request is just shown again
Product page with add to cart button just refreshes
I can see in the backend that the customer has successfully logged into the shop and the user is online. But on frontend there is no indication of this.
So far I've tried:
Cookie issue: hidden input in login.phtml (no change)
Cookie timeout set to 1 day (no change)
Any hints on how should I investigate further?
Clear all log tables and empty cache and session folder and reindex your magento. Check it is solved your problem or not. If not check your exception and system log and also check console for errors.
I found the solution and would like to share it with you:
My Magento website has two stores (same products, multiple languages)
In phpMyAdmin I updated everything to the new domain already in the first run:
update core_config_data set value = 'http://newdomain.com/' where path = 'web/unsecure/base_url';
update core_config_data set value = 'http://newdomain.com/' where path = 'web/secure/base_url';
So the shop came up in both languages ok as described above.
BUT: I forgot to modify the values where path = 'web/cookie/cookie_domain' and '../cookie_path' on per store level.
As customers can switch between the languages without loosing their cart, I had to make sure these cookie settings are correct.
Then I followed the steps from #urfusion - thanks.
So it was a cookie configuration problem.

WordPress changes some option by itself

I'm editing a WP template in order to fit my requirements. I firstly installed WP on a temporary server and then moved (files + DB) to the new server (without reinstallation).
Now, I'm almost done, but sometimes it happen that the logo has changes, and some menu disappears. If I look at the database I discover that in 'wp_option' table, all value where url should be www.newserver.com reverted to the old www.oldserver.com
How does is this possible? How can I fix this? Is there something I should know before going on?
thanks
You can easily overcome this problem just go to
Dashboard-> settings-> general and replace wordpress address (url) and site address(url) with your domains url.
But prior to this setting you must change the value in wp_options table of option_name ->siteurl in database to your new siteurl or else it wont be possible for you to login into the dashboard of your site on server as unchanged siteurl will keep on redirecting you to localhost.
wordpress url shoud contain path to your wordpress folder whereas site address will be your domains name.
You came across this problem because you migrated your local's database onto the server and in the wp_options table the siteurl is still the same representing your local siteurl. This needs to be updated as mentioned above.
Wordpress stores the siteurl and address of wordpress folder in wp_options table to make functions like bloginfo ("siteurl")
to work properly and give you site address independent of changes.

Magento - How to change URL of a link

Basically I need to change an URL to a page that does not exist in the admin panel -> CMS -> Pages
The link is http://www.mywebsite.com/contacts
I know how to edit the contents of this page, since it's located at "/app/design/frontend/shopper/default/template/contacts" but the issue is that I want to change the URL to http://www.mywebsite.com/kontakt
Any ideas?
Thanks!
Never Edit Core Magento files in any case. If you change the config.xml located at app/code/core/Mage/Contacts/etc/config.xml, all your changes will be lost when your Mage version is upgraded.
1) Make a new module and change frontname for your contacts page
OR
2) Make a new CMS page having URL key kontact, content having Contact form block, make a new URL rewrite and redirect contacts to kontact and you're done
You can easily do that, just update line 40 in app/code/core/Mage/Contacts/etc/config.xml
from <frontName>contacts</frontName>
to <frontName>kontakt</frontName>
try to remove cache and if your compilation is enble then try to recompile that
EDIT
Please override contact module after it test in core file and move into local folder

Magento 1.4 url rewrites in multi store environment

Long story short - I'm trying to restore my ver1.4 store (multi-store) but am doing so to a test environment first. (Production has one site working and I don't want to lose it entirely.)
On my test environment, I continue to get the following error message when I try to reindex the Catalog URL Rewrites:
An error occurred while saving the URL rewrite.
Before doing that, I had emptied the core_url_rewrites table in the database, cleared the var/cache, var/locks and var/session folders and cleared my browser cache.
I've done it repeatedly to see if I could figure out what was going on. I had read that there was often a problem with url rewrites in multi-store setups when products were in more than one root category. I had a lot of those, so I went through my cata.logs and products and limited each product to just one root category (store/domain.)
My configuration settings are as follows:
System -> Configuration -> Web
URL Options
Add Store Code to Urls No [GLOBAL]
Redirect to Base URL if requested URL doesn't match it No [GLOBAL]
Search Engines Optimization
Use Web Server Rewrites Yes [STORE VIEW] (all store views set to use Website)
System -> Configuration -> Catalog
Frontend
Use Flat Catalog Category No [GLOBAL]
Use Flat Catalog Product No [GLOBAL]
Allow Dynamic Media URLs in Products and Categories Yes [STORE VIEW]
Search Engine Optimizations
Autogenerated Site Map Enable [STORE VIEW]
Popular Search Terms Enable [STORE VIEW]
Product URL Suffix .html [STORE VIEW]
Category URL Suffix .html [STORE VIEW]
Use Categories Path for Product URLs Yes [STORE VIEW]
Create Permanent Redirect for old URLs if Url key changed yes [STORE VIEW]
Page Title Separator - [STORE VIEW]
Use Canonical Link Meta Tag For Categories No [STORE VIEW]
Use Canonical Link Meta Tag For Products No [STORE VIEW]
I confirmed that I have the proper .htaccess file in each of my directories (the root and each of the folders with symlinks denoting the various stores/domains.) I also double-checked my index.php files.
Each time I run the Reindexing, it indexes one more item. I have over 2500 items so am inclined to not want to go through it 2500 times. I feel I must be missing something, but I can't figure out what it is.
When I add a new product, it usually gives me an error message that it failed because it couldn't create a url rewrite, but the item is added. Then the next time I reindex, the new item is indexed for all four stores.
This didn't seem to be a problem with my previous setup so it might simply be the goofy way that my test environment is set up.
If anyone has any ideas of how I might identify and/or fix the problem, I'd be MOST appreciative!
Cheers!
Penny
Need more information about the error message. Look in the var/log folder or var/report folder for further information on the exact error and hopefully there is something there that will shed some light. Could be due to a variety of reasons so detailed message is required.

Wordpress host IP changed

I've got a Wordpress site on our home intranet that has run into trouble now that the IP address has changed - The index page loads, but not the CSS and I can't log in to the site administration panel.
Unfortunately I am a bit behind on backups. Is there a way to get Wordpress to refer to the new IP address?
You have two places to update this (well three, but we'll stick with the two).
If you can still log into your admin section, type the following for your URI /wp-admin/options.php - so for example, if your site is http://localhost then your full URL will be http://localhost/wp-admin/options.php. Once you've logged into your site you should see two fields (well you'll see a lot of fields), but you'll want to look for the two with URL's in them - the Site URL and the Blog URL (in WP 2.7 the fields are labeled "home" and "siteurl", not sure on the other versions).
Or, you can log into MySQL database and run the following.
Select * from wp_options where option_name IN('siteurl','home');
I just ran this today on one of my installs. If you're option_value is set to your localhost - you can then run the following:
update wp_options set option_value='http://www.yourblogname.com' where option_name = 'siteurl';
update wp_options set option_value='http://www.yourblogname.com' where option_name = 'home';
This should update your table structure.
You have to change the 'home' and 'siteurl' in the settings. Since you cannot open the admin side of wordpress, open the database in phpMyAdmin(or something similar).
The options can be found in the 'wp_options' table(wp_ prefix might be different). Find the necessary setting using this query...
SELECT * FROM `wp_options` WHERE `option_name` IN ('siteurl', 'home')
Change the values of both the options to the new IP.
To temporarily be able to login, use this code in your wp-config.php:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
or you can add this to your theme's functions.php:
update_option('siteurl','http://example.com/');
update_option('home','http://example.com/');
Warning: Updating the SQL database will be required in order for installed plugins to use the new URL/hostname. So if you use plugins modifying the database is required.
I ran into this problem before when I was migrating a site from test to production. Conveniently, MySQL has a string replace function.
Try something like this:
UPDATE wp_posts SET post_content = REPLACE(post_content,"http://localhost","http://www.myblog.com")
I ran into this problem once. Loginto your DB and check your wp_options (if wp_ is your table prefix) and then search for all records and replace your old ip with new.
Possible columns to have the old ip would be 'permalinks' etc.. Sorry I cant see my blog's table structure now otherwise I would have posted the correct column name.
Be careful for the link: https or http !!
in the command line:
mysql -u root -p
in the SQL, set new IP for xxxx
mysql> use wordpress;
mysql> select * from wp_options where option_id=1;
mysql> update wp_options set option_value="http://xxxx" where
option_id=1;
exit
Restart server
Possibly WordPress.org's coverage of this issue was not available at the time the other answers here were written, but as of now I find it more complete and easier to follow.
In my case, the method of modifying wp-config.php was only partially successful. The Relocate method described in the above web page ultimately succeeded.
Here is a synopsis of WordPress.org's coverage:
1 Changing the Site URL
1.1 Edit wp-config.php
1.2 Edit functions.php
1.3 Relocate method
1.3.1 Code function
1.3.2 Steps
1.4 Changing the URL directly in the database
2 Moving Sites
2.1 Altering Table Prefixes
2.2 Changing Template Files
2.3 Changing the Config file
2.4 Verify the Profile
2.5 Changing the .htaccess file
2.6 Additional items of note
2.6.1 Important GUID Note
2.7 Multi-site notes
2.8 wp-cli

Categories