Getting the following error when click on "My account" on the footer of our test site:
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /home/customer/www/ xxx /public_html/catalog/controller/account/account.php on line 104
- loooking at that file it appears to relate to public function country() but not sure what this means or how to fix!
As a side note, nothing is showing up in the error logs in system / maintenance
Have tried clearing both SASS & theme cache - but not resolved
Running 3.03.2 with default theme
However, if you go to order history & then log in that way, everything works fine! (but that's not really a solution from a end user point of view!)
Would appreciate some help on this please - thank you in advance
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /home/customer/www/ xxx /public_html/catalog/controller/account/account.php on line 104
- loooking at that file it appears to relate to public function country() but not sure what this means or how to fix!
As a side note, nothing is showing up in the error logs in system / maintenance
Have tried clearing both SASS & theme cache - but not resolved
Running 3.03.2 with default theme
However, if you go to order history & then log in that way, everything works fine! (but that's not really a solution from a end user point of view!)
Would appreciate some help on this please - thank you in advance
Contact the extension developer to resolve this issue. This error message is caused by an installed extension.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
And that section in the php file appears unchanged from the original OC download (albeit possibly a few lines further down the page)
You can look for catalog/controller/account/account.php from the storage/modification directory and see if any modification exists to that file.
It may lead you to the extension or cause of the problem.
--
It may lead you to the extension or cause of the problem.
--
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
One way to fix this is to disable them one by one until the error disappears.ru-lefthanded wrote: ↑Wed Apr 27, 2022 1:21 amI have numerous extensions running & no idea which one might have caused this issue!
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Guru Member
Thanks - there are mods in there for virtually every other aspect but not account itself!
Have removed the line in twig til I can get to the bottom of what's causing this
Thanks Paul - going to be a long job!!!paulfeakins wrote: ↑Wed Apr 27, 2022 5:34 pmOne way to fix this is to disable them one by one until the error disappears.ru-lefthanded wrote: ↑Wed Apr 27, 2022 1:21 amI have numerous extensions running & no idea which one might have caused this issue!
From your path and line number, it doesn't look like a change by a OCMOD. More likely it is a change to that file before line 104. Compare the whole file against the original from a clean download.ru-lefthanded wrote: ↑Wed Apr 27, 2022 1:32 amAnd that section in the php file appears unchanged from the original OC download (albeit possibly a few lines further down the page)
ADD Creative wrote: ↑Wed Apr 27, 2022 6:54 pmFrom your path and line number, it doesn't look like a change by a OCMOD. More likely it is a change to that file before line 104. Compare the whole file against the original from a clean download.ru-lefthanded wrote: ↑Wed Apr 27, 2022 1:32 amAnd that section in the php file appears unchanged from the original OC download (albeit possibly a few lines further down the page)
Only differences that I can see are found in this section (had to compare with 3.0.3.7 original php file as dont have my orig download to hand):
my file:
$this->load->model('account/customer');
if ($this->config->get('config_affiliate_enabled')) {
$data['display_affiliate'] = true;
$this->load->model('account/affiliate');
$affiliate_info = $this->model_account_affiliate->getAffiliate($this->customer->getId());
if (!$affiliate_info) {
$data['affiliate'] = $this->url->link('account/affiliate/add', 'language=' . $this->config->get('config_language'));
} else {
$data['affiliate'] = $this->url->link('account/affiliate/edit', 'language=' . $this->config->get('config_language'));
}
if ($affiliate_info) {
$data['tracking'] = $this->url->link('account/tracking', 'language=' . $this->config->get('config_language'));
} else {
$data['tracking'] = '';
}
} else {
$data['tracking'] = '';
$data['display_affiliate'] = false;
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
$this->response->setOutput($this->load->view('account/account', $data));
}
original:
$this->load->model('account/customer');
$affiliate_info = $this->model_account_customer->getAffiliate($this->customer->getId());
if (!$affiliate_info) {
$data['affiliate'] = $this->url->link('account/affiliate/add', '', true);
} else {
$data['affiliate'] = $this->url->link('account/affiliate/edit', '', true);
}
if ($affiliate_info) {
$data['tracking'] = $this->url->link('account/tracking', '', true);
} else {
$data['tracking'] = '';
}
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
$this->response->setOutput($this->load->view('account/account', $data));
}
Someone has modified that file. I looks like code from later unreleased versions.
At the very least it's missing a }. So try changing.
To.
Could be other things wrong.
At the very least it's missing a }. So try changing.
Code: Select all
$data['display_affiliate'] = false;
Code: Select all
$data['display_affiliate'] = false;
}
Now that the issue has been solved, please add: [SOLVED] at the beginning of the subject line on your post.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 520 guests