Post by N1kko » Wed Mar 16, 2016 8:55 pm

Qphoria wrote:
N1kko wrote:Not working for me, shows Patch 1000 has been applied (1 of 8) and just sits there then pops up with
error undefined
what version were you coming from?
I just tried my changes on 2 more stores (one was 2.0.3.0, one was 1.5.6.4) and it worked flawlessly. Or were you referring to Randem's changes?

My issue turned out to be Cloudflare SSL turned off SSL and changed from https to http in config.php & in admin/config.php and working now but getting this error

Code: Select all

Notice: Error: Could not load template /public_html/admin/view/template/common/header! in /public_html/system/modification/system/engine/loader.php on line 56

User avatar
New member

Posts

Joined
Tue Dec 15, 2009 1:19 am

Post by pm-netti » Wed Mar 16, 2016 9:24 pm

N1kko wrote:
Qphoria wrote:
N1kko wrote:Not working for me, shows Patch 1000 has been applied (1 of 8) and just sits there then pops up with
error undefined
what version were you coming from?
I just tried my changes on 2 more stores (one was 2.0.3.0, one was 1.5.6.4) and it worked flawlessly. Or were you referring to Randem's changes?

My issue turned out to be Cloudflare SSL turned off SSL and changed from https to http in config.php & in admin/config.php and working now but getting this error

Code: Select all

Notice: Error: Could not load template /public_html/admin/view/template/common/header! in /public_html/system/modification/system/engine/loader.php on line 56
Is your same error when sculptex?
engine/loader.php line 56 in version 2.0.0.0:

Code: Select all

trigger_error('Error: Could not load library ' . $file . '!');
engine/loader.php line 45 in version 2.0.1-2.0.3:

Code: Select all

trigger_error('Error: Could not load template ' . $file . '!')

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by N1kko » Wed Mar 16, 2016 9:56 pm

This is engine/loader.php

Code: Select all

<?php
final class Loader {
	protected $registry;

	public function __construct($registry) {
		$this->registry = $registry;
	}
	
	public function controller($route, $data = array()) {
		// Sanitize the call
		$route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route);
		
		// Trigger the pre events
		$result = $this->registry->get('event')->trigger('controller/' . $route . '/before', array(&$route, &$data));
		
		if ($result) {
			return $result;
		}
		
		$action = new Action($route);
		$output = $action->execute($this->registry, array(&$data));
			
		// Trigger the post events
		$result = $this->registry->get('event')->trigger('controller/' . $route . '/after', array(&$route, &$data, &$output));
		
		if (!($output instanceof Exception)) {
			return $output;
		} else {
			return false;
		}
	}
	
	public function model($route) {
		// Sanitize the call
		$route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route);
		
		$file  = DIR_APPLICATION . 'model/' . $route . '.php';
		$class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $route);
		
		if (is_file($file)) {
			include_once($file);
			//echo $class;
			$proxy = new Proxy();

			foreach (get_class_methods($class) as $method) {
				$proxy->{$method} = $this->callback($this->registry, $route . '/' . $method);
			}

			$this->registry->set('model_' . str_replace(array('/', '-', '.'), array('_', '', ''), (string)$route), $proxy);
		} else {
			throw new \Exception('Error: Could not load model ' . $route . '!');
		}
	}

	public function view($route, $data = array()) {
		// Sanitize the call
		$route = str_replace('../', '', (string)$route);
		
		// Trigger the pre events
		$result = $this->registry->get('event')->trigger('view/' . $route . '/before', array(&$route, &$data));
		
		if ($result) {
			return $result;
		}
		
		$template = new Template('basic');
		
		foreach ($data as $key => $value) {
			$template->set($key, $value);
		}
		
		$output = $template->render($route . '.tpl');
		
		// Trigger the post e
		$result = $this->registry->get('event')->trigger('view/' . $route . '/after', array(&$route, &$data, &$output));
		
		if ($result) {
			return $result;
		}
		
		return $output;
	}

	public function library($route) {
		// Sanitize the call
		$route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route);
			
		$file = DIR_SYSTEM . 'library/' . $route . '.php';
		$class = str_replace('/', '\\', $route);

		if (is_file($file)) {
			include_once($file);

			$this->registry->set(basename($route), new $class($this->registry));
		} else {
			throw new \Exception('Error: Could not load library ' . $route . '!');
		}
	}
	
	public function helper($route) {
		$file = DIR_SYSTEM . 'helper/' . str_replace('../', '', (string)$route) . '.php';

		if (is_file($file)) {
			include_once($file);
		} else {
			throw new \Exception('Error: Could not load helper ' . $route . '!');
		}
	}
	
	public function config($route) {
		$this->registry->get('event')->trigger('config/' . $route . '/before', $route);
		
		$this->registry->get('config')->load($route);
		
		$this->registry->get('event')->trigger('config/' . $route . '/after', $route);
	}

	public function language($route) {
		$this->registry->get('event')->trigger('language/' . $route . '/before', $route);
		
		$output = $this->registry->get('language')->load($route);
		
		$this->registry->get('event')->trigger('language/' . $route . '/after', $route);
		
		return $output;
	}
	
	protected function callback($registry, $route) {
		return function($args) use($registry, &$route) {			
			// Trigger the pre events
			$result = $registry->get('event')->trigger('model/' . $route . '/before', array_merge(array(&$route), $args));
			
			if ($result) {
				return $result;
			}
			
			$file = DIR_APPLICATION . 'model/' .  substr($route, 0, strrpos($route, '/')) . '.php';
			$class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', substr($route, 0, strrpos($route, '/')));
			$method = substr($route, strrpos($route, '/') + 1);
	
			if (is_file($file)) {
				include_once($file);
			
				$model = new $class($registry);
			} else {
				throw new \Exception('Error: Could not load model ' . substr($route, 0, strrpos($route, '/')) . '!');
			}
			
			if (method_exists($model, $method)) {
				$output = call_user_func_array(array($model, $method), $args);
			} else {
				throw new \Exception('Error: Could not call model/' . $route . '!');
			}
													
			// Trigger the post events
			$result = $registry->get('event')->trigger('model/' . $route . '/after', array_merge(array(&$route, &$output), $args));
			
			if ($result) {
				return $result;
			}
						
			return $output;
		};
	}	
}

User avatar
New member

Posts

Joined
Tue Dec 15, 2009 1:19 am

Post by pm-netti » Wed Mar 16, 2016 10:23 pm

note:

Code: Select all

admin/view/template/common/header! in /public_html/system/modification/system/engine/loader.php on line 56
You remove file system/modification/system/engine/loader.php or try go to admin > extension > modification and press "refresh".

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by Qphoria » Wed Mar 16, 2016 10:45 pm

OSWorX wrote:
sculptex wrote:okay I increased memory allowance by adding

Code: Select all

ini_set('memory_limit', '2048M');
How many users are allowed to increase the memory to such an abstruse value??
It's doesn't likely need to be that high, but as we discussed above, limiting the creation of multiple variables and select * should improve things for everyone

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by N1kko » Wed Mar 16, 2016 11:32 pm

pm-netti wrote:note:

Code: Select all

admin/view/template/common/header! in /public_html/system/modification/system/engine/loader.php on line 56
You remove file system/modification/system/engine/loader.php or try go to admin > extension > modification and press "refresh".
I can't access the admin as I have the same error. Even if I remove system/modification/system/engine/loader.php I get this errors

Code: Select all

Warning: Parameter 1 to ControllerEventTheme::index() expected to be a reference, value given in /system/modification/system/engine/action.php on line 65Warning: Parameter 1 to ControllerEventTheme::index() expected to be a reference, value given in /system/modification/system/engine/action.php on line 65Warning: Parameter 1 to ControllerEventTheme::index() expected to be a reference, value given in /system/modification/system/engine/action.php on line 65

User avatar
New member

Posts

Joined
Tue Dec 15, 2009 1:19 am

Post by pm-netti » Thu Mar 17, 2016 12:04 am

N1kko wrote:
pm-netti wrote:note:

Code: Select all

admin/view/template/common/header! in /public_html/system/modification/system/engine/loader.php on line 56
You remove file system/modification/system/engine/loader.php or try go to admin > extension > modification and press "refresh".
I can't access the admin as I have the same error. Even if I remove system/modification/system/engine/loader.php I get this errors

Code: Select all

Warning: Parameter 1 to ControllerEventTheme::index() expected to be a reference, value given in /system/modification/system/engine/action.php on line 65Warning: Parameter 1 to ControllerEventTheme::index() expected to be a reference, value given in /system/modification/system/engine/action.php on line 65Warning: Parameter 1 to ControllerEventTheme::index() expected to be a reference, value given in /system/modification/system/engine/action.php on line 65
Can you remove folder system/modification/system?

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by N1kko » Thu Mar 17, 2016 12:14 am

Thanks removed system/modification/system and now working ;D , just have this error now LOL

Notice: unserialize(): Error at offset 0 of 9081 bytes in /system/library/user.php on line 24

User avatar
New member

Posts

Joined
Tue Dec 15, 2009 1:19 am

Post by Qphoria » Thu Mar 17, 2016 12:26 am

Are you sure all files were uploaded? There shouldn't be any calls to "unserialize" now and the user.php file is in
system/library/cart/user.php now so that file path you are referencing is not even valid

I wonder if these are old ocmod modifications left over that are conflicting. I don't use ocmod so I never tested with that. I should add some code to clear all ocmods during upgrade

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by sculptex » Thu Mar 17, 2016 4:32 am

pm-netti wrote:note:
You remove file system/modification/system/engine/loader.php or try go to admin > extension > modification and press "refresh".
yes, cleared that folder, now I can login, many thanks. theres a couple of little errors now like an error box (error undefined) popping up and the admin graphics are messed up too but its probably because of some mod somewhere. Like I say I will try again with a fresh install when I get a chance.

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by KaptinAmerika » Thu Mar 17, 2016 11:46 am

So I attempted a Softaculous upgrade, as Softaculous recommended, from 2.1.0.1 to 2.2.0.0.
Softaculous indicated that I needed to go to my site address with the usual "/upgrade" after the name so I did.
Nothing but white screen.
Of course all I did was restore my backup, learned that lesson a long time ago, but now I am wondering why the white screen.

Newbie

Posts

Joined
Sat Jan 16, 2016 1:11 pm

Post by Randem » Thu Mar 17, 2016 1:04 pm

Hi KaptinAmerika,

Well, the default upgrade scripts do not work...

Try

2.1.0.x to 2.2.0.x Upgrade - http://www.randemsystems.com/support/op ... t-only%29/

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by sculptex » Thu Mar 17, 2016 3:59 pm

Randem wrote:Hi KaptinAmerika,

Well, the default upgrade scripts do not work...

Try

2.1.0.x to 2.2.0.x Upgrade - http://www.randemsystems.com/support/op ... t-only%29/
Randem,

I am sorry to say that I have had much more problems with your upgrade script than QPhorias.

Code: Select all

Error Code(0): Error: Column count doesn't match value count at row 1
Error No: 1136
INSERT INTO `oc_api` VALUES('', 'Default', 'AB...HF', 1, '2015-12-20 00:00:46', '2015-12-20 00:00:46'); in /home/xxx/public_html/system/library/db/mysqli.php on line 40
I think everyone here appreciates the effort you have put in with trying to create an upgrade solution but it is too confusing for people to have multiple upgrade scripts to choose from. I was first to thank you for your initial upgrade script though I did not have time to test it then. QPhoria raised some valid problems with your upgrade script and you did not seem to take it constructively. Also the solutions you are producing are isolated from the community. By using Github, QPhorias solution will benefit everyone. So, why not try and collaborate and see if you can pick holes in QPhorias script and everyone will benefit?

ImageImage


User avatar
Active Member

Posts

Joined
Tue Sep 13, 2011 3:07 am
Location - UK

Post by AllenConquest » Sun Mar 20, 2016 12:51 am

@Qphoria your modifications are great and have enabled me to upgrade my existing 1.5.5.1 store almost flawlessly. I performed the upgrade by creating a new OC folder with the new 2.2.0.0 files (cloned from github), then copied across my old config.php files so that the database connections were correct.

However, I have just come across one issue that is causing a problem. In the new OC 2.2 the default location of images has changed, but the upgrade script does nothing about this and leaves the images in the 1.5.5.1 location. This works fine for viewing the website, so I didn't think it was a problem. But then I went into the admin side and tried to use an image that was located in the old location. The Image Manager window points at the new location and you can't navigate to the old one. I'm not sure if this is a problem because I created a new OC folder and copied my images over, or whether this would be a problem if I had just overwritten my files.

If this makes any sense, I'd be interested in your opinion of the best thing to do. I'm quite capable of updating the database to point at the new location and moving my images to there, but is this something that might trip up other people?

Keep up the great work, and I love the new OC ;D

Allen

New member

Posts

Joined
Tue Sep 06, 2011 9:13 pm

Post by bcfl » Sun Mar 20, 2016 8:45 pm

I am attempting upgrade from 2.1.0.1 to 2.2.0.0 on my local xampp test system. and after installing new files I go to the install directory and am receiving error:

Notice: Error: Could not load template D:/xampp-v5-6-12/htdocs/sStore/install/view/template/common/header! in D:\xampp-v5-6-12\htdocs\sStore\system\storage\modification\system\engine\loader.php on line 86

I downloaded and installed Upgrade_proposal_2.2.0.0-V2 and the error remains, any help would be appreciated.
Thanks, bob

New member

Posts

Joined
Tue Jan 26, 2010 5:34 am

Post by pm-netti » Sun Mar 20, 2016 9:14 pm

bcfl wrote:I am attempting upgrade from 2.1.0.1 to 2.2.0.0 on my local xampp test system. and after installing new files I go to the install directory and am receiving error:

Notice: Error: Could not load template D:/xampp-v5-6-12/htdocs/sStore/install/view/template/common/header! in D:\xampp-v5-6-12\htdocs\sStore\system\storage\modification\system\engine\loader.php on line 86

I downloaded and installed Upgrade_proposal_2.2.0.0-V2 and the error remains, any help would be appreciated.
Thanks, bob
Your need clear folder system/storage/modifiaction

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by AllenConquest » Sun Mar 20, 2016 9:17 pm

I spoke too soon. I just grabbed a latest version of my live database and did a test upgrade on it. I am now getting the following error:

Code: Select all

Error Code(0): Error: Specified key was too long; max key length is 1000 bytes
Error No: 1071
<<query removed because site is blocking it (it is changing the url_alias table) >>
/Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 40
EDIT:
The error is occurring when trying to change the query column to varchar (255). I've just tried this manually in the database and it also fails with the same error.

EDIT (again):
I examined to indexes on my url_alias table. I had multiple indexes for each column (something had messed up!). I dropped all the extra indexes and ran the update again. This time it succeeded. Panic over !

New member

Posts

Joined
Tue Sep 06, 2011 9:13 pm

Post by PhantomMenace » Mon Mar 21, 2016 2:48 am

I just installed 2.2.0.0 on a sub domain and have copied everything manualy (products/images/etc/)

My older cart was on versino 2.0.2.0 is there a way yet to import the orders/costumers/etc to the new database of my new shop?

New member

Posts

Joined
Wed Dec 30, 2015 6:03 am

Post by Qphoria » Mon Mar 21, 2016 1:15 pm

AllenConquest wrote:@Qphoria your modifications are great and have enabled me to upgrade my existing 1.5.5.1 store almost flawlessly. I performed the upgrade by creating a new OC folder with the new 2.2.0.0 files (cloned from github), then copied across my old config.php files so that the database connections were correct.

However, I have just come across one issue that is causing a problem. In the new OC 2.2 the default location of images has changed, but the upgrade script does nothing about this and leaves the images in the 1.5.5.1 location. This works fine for viewing the website, so I didn't think it was a problem. But then I went into the admin side and tried to use an image that was located in the old location. The Image Manager window points at the new location and you can't navigate to the old one. I'm not sure if this is a problem because I created a new OC folder and copied my images over, or whether this would be a problem if I had just overwritten my files.

If this makes any sense, I'd be interested in your opinion of the best thing to do. I'm quite capable of updating the database to point at the new location and moving my images to there, but is this something that might trip up other people?

Keep up the great work, and I love the new OC ;D

Allen
Yea trying to determine the best option for that.
For now I've been editing "admin/controller/common/filemanager.php" and removing all referecnes to catalog
that lets the filemanager see the entire image folder.

Option B is to remove the "image/catalog" folder that comes with 2.2 and rename "data" to "catalog" and cache/data to cache/catalog

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by AllenConquest » Mon Mar 21, 2016 3:21 pm

Qphoria wrote:
AllenConquest wrote:@Qphoria your modifications are great and have enabled me to upgrade my existing 1.5.5.1 store almost flawlessly. I performed the upgrade by creating a new OC folder with the new 2.2.0.0 files (cloned from github), then copied across my old config.php files so that the database connections were correct.

However, I have just come across one issue that is causing a problem. In the new OC 2.2 the default location of images has changed, but the upgrade script does nothing about this and leaves the images in the 1.5.5.1 location. This works fine for viewing the website, so I didn't think it was a problem. But then I went into the admin side and tried to use an image that was located in the old location. The Image Manager window points at the new location and you can't navigate to the old one. I'm not sure if this is a problem because I created a new OC folder and copied my images over, or whether this would be a problem if I had just overwritten my files.

If this makes any sense, I'd be interested in your opinion of the best thing to do. I'm quite capable of updating the database to point at the new location and moving my images to there, but is this something that might trip up other people?

Keep up the great work, and I love the new OC ;D

Allen
Yea trying to determine the best option for that.
For now I've been editing "admin/controller/common/filemanager.php" and removing all referecnes to catalog
that lets the filemanager see the entire image folder.

Option B is to remove the "image/catalog" folder that comes with 2.2 and rename "data" to "catalog" and cache/data to cache/catalog
Personally I think it would be good to migrate the image data to the new directory structure and keep the core code untouched as much as possible. Going forward this would seem to have less chance of causing issues with other 2.2 mods that could assume the new image structure. It might be more of a pain at the point of migration, but at least you expect more work during that sort of transition.

New member

Posts

Joined
Tue Sep 06, 2011 9:13 pm
Who is online

Users browsing this forum: No registered users and 8 guests