Post by dockeryz » Mon Jul 22, 2019 3:21 am

The full error is this
Error: Call to a member function get() on string in /var/www/html/ecom/opencart/admin/controller/marketplace/extension.php on line 44
I am on the latest version of OpenCart, as I cloned it on github just yesterday. I've been re-installing this thing over and over again to no avail that will get rid of an annoying chain of errors.

If I go to Admin > Extensions > Extensions, the moment I click on this link, I'm redirected to the good ole error page. It's complaining about line 44 in the file

Code: Select all

Error: Call to a member function get() on string in /var/www/html/ecom/opencart/admin/controller/marketplace/extension.php on line 44
That line looks like this

Code: Select all

39				if ($this->user->hasPermission('access', 'extension/extension/' . $extension)) {
40					$files = glob(DIR_APPLICATION . 'controller/extension/' . $extension . '/*.php', GLOB_BRACE);
41
42					$data['categories'][] = array(
43						'code' => $extension,
44						'text' => $this->language->get('extension')->get('heading_title') . ' (' . count($files) . ')'
45					);
46				}
47
Obviously, it appears that get('extension') is a string, and the code is trying to use a method from it, but... it's a string, and it doesn't have methods like that. So, I change it to be just heading title

Code: Select all

39				if ($this->user->hasPermission('access', 'extension/extension/' . $extension)) {
40					$files = glob(DIR_APPLICATION . 'controller/extension/' . $extension . '/*.php', GLOB_BRACE);
41
42					$data['categories'][] = array(
43						'code' => $extension,
44						'text' => $this->language->get('heading_title') . ' (' . count($files) . ')'
45					);
46				}
47
That gets rid of the error, but now there's the same error for next extension was in the list in that directory. On, and on, until there aren't any leff to execute. When I got them all "fixed", the error disappeared, but there was a new error now. I then thought to myself, there must be some forum out there for asking questions about this software?

Does any one have any idea? Are you able to replicate this? I just want to get the Paypal payment system setup, the Express Checkout or Regular Checkout.
Last edited by straightlight on Mon May 04, 2020 7:57 am, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Thu Nov 13, 2014 9:30 am

Post by letxobnav » Mon Jul 22, 2019 7:43 am

perhaps you should not use the github files but the regular releases.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: No registered users and 148 guests