Jump to content

Recommended Posts

Were you using caching? I suggest you turn that off if so. I also have a tut for the opposite, you just have to reverse the procedure: http://nemops.com/prestashop-migration-local-live/#.VSj5XvnQqr0

 

Good to see you're replying, Nemo. I did that one on my first try but it didn't work. Or maybe because I was using not the latest website files with the latest database? (probably the cause of the problem, right?)

 

Where can I check whether I am using caching or no? Advanced Parameters > Performance? The caching is not enable on that part.

Link to comment
Share on other sites

 

Settings.inc.php, check if you have these lines

 

define('_MEDIA_SERVER_1_', '');
define('_MEDIA_SERVER_2_', '');
define('_MEDIA_SERVER_3_', '');

 

 

Hi Nemo, there's no media server defined on Settings.inc.php before, so I add those 3 lines. Now there's no more error appeared when I access the homepage, but it just blank. Is it because I was using SSL (https) on the server before? Because it's automatically redirected to "https".

 

I can access BO, but there is only the very top bar appeared (Name of shop, etc) after I login. The rest is just blank

Link to comment
Share on other sites

Search for "SSL" in the ps_configuration table of the database, set it to 0 and see if it works

 

Hi Nemo, finally the FO is running. But only the homepage, the product pages, even cms page, showing 404 Page is not available.

 

And I can access BO but its only showing the top bar. The rest is black. When I click quick access, it shows this on the drop down:

2i7woio.jpg

Link to comment
Share on other sites

Add this to classes/Link.php
 

public function matchQuickLink($url)
{
$quicklink = $this->getQuickLink($url);
if (isset($quicklink) && $quicklink === ($this->getQuickLink($_SERVER['REQUEST_URI'])))
return true;
else
return false;
}
  • Like 1
Link to comment
Share on other sites

 

Add this to classes/Link.php

 

public function matchQuickLink($url)
{
$quicklink = $this->getQuickLink($url);
if (isset($quicklink) && $quicklink === ($this->getQuickLink($_SERVER['REQUEST_URI'])))
return true;
else
return false;
}

 

 

I put it inside class LinkCore and this is what appears:

11wak4y.jpg

 

Still error & can't open another page except homepage. The other pages are 404

Link to comment
Share on other sites

I guess you also need this:

	public static function getQuickLink($url)
	{
		$parsedUrl = parse_url($url);
		$output = array();
		if (is_array($parsedUrl) && isset($parsedUrl['query']))
		{
			parse_str($parsedUrl['query'], $output);
			unset($output['token'], $output['conf'], $output['id_quick_access']);
		}
		return http_build_query($output);
	}
  • Like 1
Link to comment
Share on other sites

 

I guess you also need this:

	public static function getQuickLink($url)
	{
		$parsedUrl = parse_url($url);
		$output = array();
		if (is_array($parsedUrl) && isset($parsedUrl['query']))
		{
			parse_str($parsedUrl['query'], $output);
			unset($output['token'], $output['conf'], $output['id_quick_access']);
		}
		return http_build_query($output);
	}

 

The BO finally appears! But there are some errors message when I got inside:

Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Undefined index: quick_access_current_link_name

Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Trying to get property of non-object

Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Undefined index: quick_access_current_link_icon

Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Trying to get property of non-object

Anyway, the FO product pages still shown 404

Link to comment
Share on other sites

When I opened the catalog > product, another errors message appears:  :mellow:

Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code
[8] Undefined index: tooltip

Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code
[8] Trying to get property of non-object

Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code
[8] Undefined index: tooltip

Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code
[8] Trying to get property of non-object

Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code
[8] Undefined index: tooltip

Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code
[8] Trying to get property of non-object

Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code
[8] Undefined index: tooltip

Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code
[8] Trying to get property of non-object

Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Undefined index: quick_access_current_link_name

Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Trying to get property of non-object

Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Undefined index: quick_access_current_link_icon

Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Trying to get property of non-object

And what appears after I click 1 of the items:  :mellow:

Warning on line 1150 in file C:\wamp\www\marblecc\classes\Tools.php
[2] preg_replace(): Compilation failed: invalid range in character class at offset 24

Warning on line 1150 in file C:\wamp\www\marblecc\classes\Tools.php
[2] preg_replace(): Compilation failed: invalid range in character class at offset 24

Warning on line 1150 in file C:\wamp\www\marblecc\classes\Tools.php
[2] preg_replace(): Compilation failed: invalid range in character class at offset 24

Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Undefined index: quick_access_current_link_name

Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Trying to get property of non-object

Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Undefined index: quick_access_current_link_icon

Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php
[8] Trying to get property of non-object

Link to comment
Share on other sites

At this point, I would replace all the controllers/ and classes files with fresh ones, just download a prestashop zip and replace ;) It would take ages to fix them all one by one

 

I replace those 2 folders from prestashop 1.6.0.14, this is what appears on BO: (I still have the old controllers & classes in zip just in case they are still needed)

2s8nrcl.jpg

 

On the FO side, it's still the same.

Link to comment
Share on other sites

add that column in the DB as DATETIME type ;) I think it's going to take long anyway, it appears the upgrade failed and missed many areas

 

Oh my.... What if I just try once again download the lastest web files & DB, then following your tutorial & let's see if it's work

Link to comment
Share on other sites

Might be a better pick :D something went wrong, definitely

 

Okay, so I followed thoroughly the tutorial video and here is the screenshots:

 

settings.inc.php

wivjbn.jpg

 

ps_configuration

f36mhc.jpg

 

ps_shop_url

2moz1hy.jpg

 

result

2ex3hv9.jpg

 

Is there any part that I missed?

Link to comment
Share on other sites

Check apache error logs :)

 

[core:alert] [pid 6148:tid 824] [client 127.0.0.1:50604] C:/wamp/www/mcc-complete/.htaccess: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration

Link to comment
Share on other sites

Alright. So the problem is with .htaccess file. I replace .htaccess from my cpanel to .htaccess from original prestashop I already installed as the offline site & do some little changes to line 11 & 53.

RewriteRule . - [E=REWRITEBASE:/change-this-to-current-directory/]
ErrorDocument 404 /change-this-to-current-directory/index.php?controller=404

After that, homepage & BO are working fine, but product pages are 404. So I disable friendly URL & looks like all working fine.  :D

Link to comment
Share on other sites

Oh, sorry, I mean in the prestashop url configuration (and then reach out that one from the browser)

You are using wamp, correct?

 

Yes, I'm using wamp. Do you mean ps_shop_url ?

pqes5.jpg

 

And is there any quick way if I want to update the product list from the online website to localhost?

Edited by Ben90 (see edit history)
Link to comment
Share on other sites

Yeah, it's odd it doesn't work if wamp usually runs at localhost/. Are you sure you cleared out the htaccess file as well? WHat about mod_rewrite? Check it's enabled as well

As for importing, I'd dump some tables straight out of the db, (all products related, features, attributes, categories) and just import them locally

Link to comment
Share on other sites

Yeah, it's odd it doesn't work if wamp usually runs at localhost/. Are you sure you cleared out the htaccess file as well? WHat about mod_rewrite? Check it's enabled as well

 

As for importing, I'd dump some tables straight out of the db, (all products related, features, attributes, categories) and just import them locally

 

What do you mean by cleared out the htaccess file? As for mod_rewrite, it is ON inside htaccess.

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
Link to comment
Share on other sites

I mean erasing the htaccess so it's regenerated. As for mod rewrite, click on wamp's icon, apache, apache modules, and see if rewrite_module has the tick. If not, enable it, then restart apache

 

Brilliant! rewrite_module in WAMP is the key to enable friendly url  :D

 

Anyway, when I deleted .htaccess it's not regenerated automatically. No idea why. So what I did with .htaccess to make it works was on post #23

 

Last thing, I still don't get it how to update all of the products (price & combination) from online to localhost. I think it will be too much if I need to reconfigure whole database by exporting from phpmyadmin & importing in local + resetting everything (well, it's not everything but some configurations in database like we did before).

 

If I export products manually from BO & import it in localhost, I reckon the combination is not included. Do you know a better ways in regard of this?

 

Well, now this thread is like a complete guide moving from server to localhost, including the problem arises with WAMP + backup the products to localhost  :lol:

Hope it's not too much

Edited by Ben90 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...