Post by glolar » Mon Oct 11, 2021 5:18 pm

MaxD wrote:
Fri Jun 11, 2021 11:54 am
Nope, there is no any DB mods. To upgrade just overwrite all files except both config.php
I am about to upload your distribution, to update OC 3.0.2.0, but I noticed you have an /install folder in the distribution. I assume I can ignore that folder (i.e., not upload it), since I am doing an UPGRADE from 3.0.2.0 to 3.0.3.7, correct?

User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by Sygate » Mon Oct 11, 2021 9:49 pm

Hi Max,

I got an error, how can i solve this?

PHP Fatal error: Uncaught Error: Cannot use object of type Registry as array in /home/otikbutik/public_html/system/storage/modification/system/library/template/template.php:12

Newbie

Posts

Joined
Fri Nov 22, 2019 1:05 pm

Post by MaxD » Fri Oct 15, 2021 11:48 pm

glolar wrote:
Mon Oct 11, 2021 5:18 pm
I am about to upload your distribution, to update OC 3.0.2.0, but I noticed you have an /install folder in the distribution. I assume I can ignore that folder (i.e., not upload it), since I am doing an UPGRADE from 3.0.2.0 to 3.0.3.7, correct?
You need to ugrade to 3.0.3.7 in regular way (with original Opencart) and after that upload my distribution (withou install folder and config.php and admin/config.php).
Sygate wrote:
Mon Oct 11, 2021 9:49 pm
I got an error, how can i solve this?
PHP Fatal error: Uncaught Error: Cannot use object of type Registry as array in /home/otikbutik/public_html/system/storage/modification/system/library/template/template.php:12
Hard to say, that is some mod issue. Does that mod works on regular Opencart 3.0.3.7?

User avatar
Active Member

Posts

Joined
Fri Jul 06, 2012 6:37 pm


Post by JNeuhoff » Sat Oct 16, 2021 12:37 am

Sygate wrote:
Mon Oct 11, 2021 9:49 pm
Hi Max,

I got an error, how can i solve this?

PHP Fatal error: Uncaught Error: Cannot use object of type Registry as array in /home/otikbutik/public_html/system/storage/modification/system/library/template/template.php:12
Is your website otikbutik.com ? If so, then most likely it won't work with MaxD's version of OC 3.0.3.7 because your are using the Journal3 framework, which is not the same as the OpenCart framework, and which doesn't use a proper standard-compliant web theme.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Sygate » Sat Oct 16, 2021 1:58 pm

MaxD wrote:
Fri Oct 15, 2021 11:48 pm
glolar wrote:
Mon Oct 11, 2021 5:18 pm
I am about to upload your distribution, to update OC 3.0.2.0, but I noticed you have an /install folder in the distribution. I assume I can ignore that folder (i.e., not upload it), since I am doing an UPGRADE from 3.0.2.0 to 3.0.3.7, correct?
You need to ugrade to 3.0.3.7 in regular way (with original Opencart) and after that upload my distribution (withou install folder and config.php and admin/config.php).
Sygate wrote:
Mon Oct 11, 2021 9:49 pm
I got an error, how can i solve this?
PHP Fatal error: Uncaught Error: Cannot use object of type Registry as array in /home/otikbutik/public_html/system/storage/modification/system/library/template/template.php:12
Hard to say, that is some mod issue. Does that mod works on regular Opencart 3.0.3.7?
Yes. Works on regular Opencart 3.0.3.7. My theme Journal 3.1.8, could this be the problem?

JNeuhoff wrote:
Sat Oct 16, 2021 12:37 am
Sygate wrote:
Mon Oct 11, 2021 9:49 pm
Hi Max,

I got an error, how can i solve this?

PHP Fatal error: Uncaught Error: Cannot use object of type Registry as array in /home/otikbutik/public_html/system/storage/modification/system/library/template/template.php:12
Is your website otikbutik.com ? If so, then most likely it won't work with MaxD's version of OC 3.0.3.7 because your are using the Journal3 framework, which is not the same as the OpenCart framework, and which doesn't use a proper standard-compliant web theme.
Ohh yes. My theme is Journal3 3.1.8. Maybe i should try version 3.2. Thank you.

Newbie

Posts

Joined
Fri Nov 22, 2019 1:05 pm

Post by MaxD » Sat Oct 16, 2021 3:47 pm

That is not because of Journal. Can you post that template.php here?

User avatar
Active Member

Posts

Joined
Fri Jul 06, 2012 6:37 pm


Post by Sygate » Sat Oct 16, 2021 3:59 pm

MaxD wrote:
Sat Oct 16, 2021 3:47 pm
That is not because of Journal. Can you post that template.php here?
The original file I downloaded from your site. I didn't make any changes. Just add Turkish language and installed some modules. Here is the code:

Code: Select all

<?php
namespace Template;
final class Template {
	private $data = array();
		
	public function add_data($data = false) {
		if (!$this->data) $this->data = $data;
		else $this->data = array_merge($this->data, $data);
	}
	
	public function set($key, $value) {
		$this->data[$key] = $value;
	}
	
	public function render($template) {
		$file = DIR_TEMPLATE . $template . '.tpl';

		if (is_file($file)) {
			extract($this->data);

			ob_start();

			require($file);

			return ob_get_clean();
		}

		throw new \Exception('Error: Could not load template ' . $file . '!');
		exit();
	}	
}

Newbie

Posts

Joined
Fri Nov 22, 2019 1:05 pm

Post by xxvirusxx » Sat Oct 16, 2021 4:38 pm

Better post the code from here: system/storage/modification/system/library/template/template.php:12

Also more details.
If was clean install or upgrade.

LE.

@MaxD there is some warnings

Code: Select all

2021-10-16 8:49:22 - PHP Unknown:  join(): Passing glue string after array is deprecated. Swap the parameters in \system\storage\cache\twix\journal3_template_journal3_module_master_slider.php on line 113
2021-10-16 8:49:22 - PHP Unknown:  join(): Passing glue string after array is deprecated. Swap the parameters in \system\storage\cache\twix\journal3_template_journal3_module_master_slider.php on line 122
2021-10-16 8:49:28 - PHP Unknown:  join(): Passing glue string after array is deprecated. Swap the parameters in \system\storage\cache\twix\journal3_template_common_header.php on line 30

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Sygate » Sat Oct 16, 2021 5:14 pm

xxvirusxx wrote:
Sat Oct 16, 2021 4:38 pm
Better post the code from here: system/storage/modification/system/library/template/template.php:12

Also more details.
If was clean install or upgrade.

LE.

@MaxD there is some warnings

Code: Select all

2021-10-16 8:49:22 - PHP Unknown:  join(): Passing glue string after array is deprecated. Swap the parameters in \system\storage\cache\twix\journal3_template_journal3_module_master_slider.php on line 113
2021-10-16 8:49:22 - PHP Unknown:  join(): Passing glue string after array is deprecated. Swap the parameters in \system\storage\cache\twix\journal3_template_journal3_module_master_slider.php on line 122
2021-10-16 8:49:28 - PHP Unknown:  join(): Passing glue string after array is deprecated. Swap the parameters in \system\storage\cache\twix\journal3_template_common_header.php on line 30
Hi, It's clean install. I try to made an update and now it gives a language file error: PHP Fatal error: Uncaught Error: Call to undefined method Language::set_all() in /home/otikbutik/public_html/admin/controller/event/language.php:16


system/storage/modification/system/library/template/template.php code is here:

Code: Select all

<?php
namespace Template;
final class Template {
	private $data = array();
		
	public function add_data($data = false) {
		if (!$this->data) $this->data = $data;
		else $this->data = array_merge($this->data, $data);
	}
	
	public function set($key, $value) {
		$this->data[$key] = $value;
	}
	
	public function render($template) {
		$file = DIR_TEMPLATE . $template . '.tpl';

		if (is_file($file)) {
			extract($this->data);

			ob_start();

			require(modification($file));

			return ob_get_clean();
		}

		throw new \Exception('Error: Could not load template ' . $file . '!');
		exit();
	}	
}

Newbie

Posts

Joined
Fri Nov 22, 2019 1:05 pm

Post by xxvirusxx » Sat Oct 16, 2021 5:23 pm

Sygate wrote:
Sat Oct 16, 2021 5:14 pm
Hi, It's clean install.
Clean install work just fine with Journal3.
Sygate wrote:
Sat Oct 16, 2021 5:14 pm
I try to made an update and now it gives a language file error
What update?

Give more details.
Words are free...

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Sygate » Sat Oct 16, 2021 5:32 pm

xxvirusxx wrote:
Sat Oct 16, 2021 5:23 pm
Sygate wrote:
Sat Oct 16, 2021 5:14 pm
Hi, It's clean install.
Clean install work just fine with Journal3.
Sygate wrote:
Sat Oct 16, 2021 5:14 pm
I try to made an update and now it gives a language file error
What update?

Give more details.
Words are free...
Official 3.0.3.7 to Max's distribution. I have installed all files except config files and install folder.

Newbie

Posts

Joined
Fri Nov 22, 2019 1:05 pm

Post by xxvirusxx » Sat Oct 16, 2021 5:44 pm

Sygate wrote:
Sat Oct 16, 2021 5:32 pm
I have installed all files except config files and install folder.
So isn't clean install as you said....

You just copied all files and folders from MaxD version to your current opencart version.

What OC version was before?
Where was storage path before?
What ocmod extension you have?
You have refreshed ocmod modifications and cleaned theme cache, sase cache, jourlna3 cache?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Sygate » Sat Oct 16, 2021 6:01 pm

xxvirusxx wrote:
Sat Oct 16, 2021 5:44 pm
Sygate wrote:
Sat Oct 16, 2021 5:32 pm
I have installed all files except config files and install folder.
So isn't clean install as you said....

You just copied all files and folders from MaxD version to your current opencart version.

What OC version was before?
Where was storage path before?
What ocmod extension you have?
You have refreshed ocmod modifications and cleaned theme cache, sase cache, jourlna3 cache?
No, I tried both clean install and upgrade. I get template.php error on clean install. I also get language error when I upgrade.

What OC version was before? Official 3.0.3.7
Where was storage path before? outside of public_html
What ocmod extension you have? Complete SEO, Quick Order Status Updater, Admin Quick Edit PRO, Universal Import/Export Pro, Product Variants, Facebook Business Extension, InstaStory, Promotions
You have refreshed ocmod modifications and cleaned theme cache, sase cache, jourlna3 cache? Yes

Newbie

Posts

Joined
Fri Nov 22, 2019 1:05 pm

Post by xxvirusxx » Sat Oct 16, 2021 6:08 pm

Sygate wrote:
Sat Oct 16, 2021 6:01 pm
Where was storage path before? outside of public_html
And you have moved all content from MaxD storage version to your storage folder?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Sygate » Sat Oct 16, 2021 6:15 pm

xxvirusxx wrote:
Sat Oct 16, 2021 6:08 pm
Sygate wrote:
Sat Oct 16, 2021 6:01 pm
Where was storage path before? outside of public_html
And you have moved all content from MaxD storage version to your storage folder?
Yes i moved all content from MaxD storage version to my storage folder

For this error: PHP Fatal error: Uncaught Error: Call to undefined method Language::set_all() in /home/otikbutik/public_html/admin/controller/event/language.php:16

My problem was solved when I commented the bottom line in admin/controller/event/language.php and catalog/controller/event/language.php
Now

Code: Select all

<?php
class ControllerEventLanguage extends Controller {
	public function index(&$route, &$args) {
		$args = array_merge($this->language->data, $args);
	}

	// 1. Before controller load store all current loaded language data
	public function before(&$route, &$output) {
		$this->language->set('backup', $this->language->all());
	}

	// 2. After contoller load restore old language data
//	public function after(&$route, &$args, &$output) {
//		$data = $this->language->get('backup');

//		if (is_array($data)) $this->language->set_all($data);
//	}
}

Newbie

Posts

Joined
Fri Nov 22, 2019 1:05 pm

Post by Sygate » Sat Oct 16, 2021 6:50 pm

When I install a new module it still gives the same error. i couldn't solve the problem

Code: Select all

#0 /home/otikbutik/storage/modification/system/library/template.php(40): Template\Template->set('config', Array)
#1 /home/otikbutik/public_html/catalog/model/tool/seo_package.php(271): Template->set('config', Array)
#2 /home/otikbutik/public_html/catalog/model/tool/seo_package.php(171): ModelToolSeoPackage->rich_snippet('opengraph', 'home')
#3 /home/otikbutik/storage/modification/system/engine/loader.php(252): ModelToolSeoPackage->richSnippets()
#4 /home/otikbutik/public_html/system/engine/proxy.php(47): Loader->{closure}(Array, Array)
#5 /home/otikbutik/storage/modification/catalog/controller/common/header.php(9): Proxy->__call('richSnippets', Array)
#6 /home/otikbutik/storage/modification/system/engine/action.php(79): ControllerCommonHeader->index(Array)
#7 /home/otikbutik/storage/modification/system/engine/loader.php(51): Action->execute(Object(Registry),  in /home/otikbutik/storage/modification/system/library/template/template.php on line 12
[16-Oct-2021 13:48:53 Europe/Istanbul] PHP Fatal error:  Uncaught Error: Cannot use object of type Registry as array in /home/otikbutik/storage/modification/system/library/template/template.php:12

Newbie

Posts

Joined
Fri Nov 22, 2019 1:05 pm

Post by JNeuhoff » Sat Oct 16, 2021 7:21 pm

Well, as I said, Journal3 modifies OpenCart core files, including the system/library/template.php, because Journal3 uses its own framework, it's not standard-compliant with OpenCart. Also, the template file you posted appears to be another file anyway, namely the system/library/template/template.php.

Therefore, find out from MaxD whether his version of OpenCart even supports Journal3 at all. And if so, post the correct contents of the template.php here, namely the /home/otikbutik/storage/modification/system/library/template.php !

Or use a proper standard compliant web theme!

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Sygate » Sat Oct 16, 2021 7:43 pm

JNeuhoff wrote:
Sat Oct 16, 2021 7:21 pm
Well, as I said, Journal3 modifies OpenCart core files, including the system/library/template.php, because Journal3 uses its own framework, it's not standard-compliant with OpenCart. Also, the template file you posted appears to be another file anyway, namely the system/library/template/template.php.

Therefore, find out from MaxD whether his version of OpenCart even supports Journal3 at all. And if so, post the correct contents of the template.php here, namely the /home/otikbutik/storage/modification/system/library/template.php !

Or use a proper standard compliant web theme!
Hi, thanks for your reply. Here is /home/otikbutik/storage/modification/system/library/template.php

Code: Select all

<?php
namespace Template;
final class Template {
	private $data = array();
		
	public function add_data($data = false) {
		if (!$this->data) $this->data = $data;
		else $this->data = array_merge($this->data, $data);
	}
	
	public function set($key, $value) {
		$this->data[$key] = $value;
	}
	
	public function render($template) {
		$file = DIR_TEMPLATE . $template . '.tpl';

		if (is_file($file)) {
			extract($this->data);

			ob_start();

			require(modification($file));

			return ob_get_clean();
		}

		throw new \Exception('Error: Could not load template ' . $file . '!');
		exit();
	}	
}

Newbie

Posts

Joined
Fri Nov 22, 2019 1:05 pm

Post by xxvirusxx » Sat Oct 16, 2021 7:46 pm

JNeuhoff wrote:
Sat Oct 16, 2021 7:21 pm
Well, as I said, Journal3 modifies OpenCart core files, including the system/library/template.php
Just this code...

Code: Select all

            // Journal Theme Modification
            if (defined('JOURNAL3_ACTIVE')) {
                $this->adaptor->set('j3', \Journal3::getInstance());
                $this->adaptor->set('j3s', \Journal3::getInstance()->settings);
            }
		    // End Journal Theme Modification
The problem is elsewhere.

Also there are 2 template.php files

https://github.com/opencart/opencart/bl ... mplate.php
https://github.com/opencart/opencart/bl ... mplate.php

@Sygate
If you want, you can send me a temporary Cpanel access and store admin on PM to check for you for free.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by MaxD » Sat Oct 16, 2021 8:44 pm

It seems to me that this issues may happen because after "upgrade" files in modification folder are still based on old code.
Try to delete storage/modification folder contents, enter admin and refresh modifications.

User avatar
Active Member

Posts

Joined
Fri Jul 06, 2012 6:37 pm

Who is online

Users browsing this forum: No registered users and 274 guests