Post by onoriotorti » Thu Jan 10, 2019 4:15 pm

Hi guys,
I'm having an issue when changing the language on any page (except home)
what happens is that this error message appears:

Code: Select all

Notice: Undefined index: path in /public_html/vqmod/vqcache/vq2-catalog_controller_common_language.php on line 64Warning: Cannot modify header information - headers already sent by (output started at  /public_html/catalog/controller/startup/error.php:34) in /public_html/vqmod/vqcache/vq2-system_storage_modification_system_library_response.php on line 12
if I hit the back button on my browser then it goes to the webpage with the correct language but first I see a blank page with the above error.
My website is www.cattex.com I'm using opencart 2.2 with Journal2 as theme.
Any help is highly appreciated.
Thanks,

Onorio.
Last edited by onoriotorti on Wed Jan 23, 2019 8:40 pm, edited 3 times in total.

New member

Posts

Joined
Tue Jun 20, 2017 5:36 pm

Post by OSWorX » Thu Jan 10, 2019 4:28 pm

First of all, always disable the error output!
Only store error messages to fix if some are accourring.

Second, guess you fixed that already, because I cannot see any message - if so mark your first post (title) with [SOLVED]
Third, you are using additional extensions and a custom theme.
Seems to me that one of the used extensions or the theme produce that error (which is a notice btw.)

Forum Rules [en]: viewtopic.php?f=176&t=200480
Forumregeln [de]: viewtopic.php?f=37&t=114208
Commercial Request: viewforum.php?f=88

Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by onoriotorti » Thu Jan 10, 2019 4:51 pm

OSWorX wrote:
Thu Jan 10, 2019 4:28 pm
First of all, always disable the error output!
Only store error messages to fix if some are accourring.

Second, guess you fixed that already, because I cannot see any message - if so mark your first post (title) with [SOLVED]
Third, you are using additional extensions and a custom theme.
Seems to me that one of the used extensions or the theme produce that error (which is a notice btw.)
thanks for the quick reply.

1)display errors in settings is set to "no"

2)I did not fix the issue I'm still seeing the error message when I cange the language.

3)I will try to disable the extensions to see if any are causing the problem.

New member

Posts

Joined
Tue Jun 20, 2017 5:36 pm

Post by onoriotorti » Thu Jan 10, 2019 10:59 pm

ok, disabling ML_seo_keywords.xml fixes the issue
the problem is that by doing that other parts of the site don't work, like for example the product tab on admin is inaccesible.
What do I need to change in this xml file in order to stop the NOTICE.
What does the notice even say?
sorry not very good with this kind of stuff :D
thank you.

New member

Posts

Joined
Tue Jun 20, 2017 5:36 pm

Post by onoriotorti » Thu Jan 10, 2019 11:30 pm

ok I tried reding the lines that the notice was pointing to and ended up removing this code from the xml file

Code: Select all

 <operation >
			<search position="replace" index="1"><![CDATA[$this->response->redirect($this->request->post['redirect']);]]></search>
			<add><![CDATA[			
			$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "language");
			foreach ($query->rows as $language)
				{	
					$this->request->post['redirect'] = str_replace('/'.$language['code'].'/', '/'.$this->request->post['code'].'/', $this->request->post['redirect']);
				}
			$query = $this->db->query("SELECT language_id FROM " . DB_PREFIX . "language WHERE code = '" . $this->request->post['code'] . "'");
			$this->config->set('config_language_id', $query->row['language_id']);
						
			if ((isset($this->session->data['proute']))&&($this->session->data['proute'] == 'product/product')) {$this->response->redirect($this->url->link('product/product', 'product_id=' . $this->session->data['product_id']));}
			elseif ((isset($this->session->data['proute']))&&($this->session->data['proute'] == 'product/category')) {$this->response->redirect($this->url->link('product/category', 'path=' . $this->session->data['path']));}
			elseif ((isset($this->session->data['proute']))&&($this->session->data['proute'] == 'product/manufacturer/info')) {$this->response->redirect($this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->session->data['manufacturer_id']));}
			elseif ((isset($this->session->data['proute']))&&($this->session->data['proute'] == 'information/information')) {$this->response->redirect($this->url->link('information/information', 'information_id=' . $this->session->data['information_id']));}
			elseif (isset($this->session->data['proute'])) {$this->response->redirect($this->url->link($this->session->data['proute']));}
			else {$this->response->redirect($this->request->post['redirect']);}						
			]]></add>
		</operation>
this fixed the issue and everything seems good, but before i mark this as fixed I'd like to know what did that code do
thanks for the help.

New member

Posts

Joined
Tue Jun 20, 2017 5:36 pm
Who is online

Users browsing this forum: No registered users and 21 guests