COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Parameters in URL give Error 0 Using $this when not in object context
Parameters in URL give Error 0 Using $this when not in object context
- Fábio Jordan
- Topic Author
- Offline
- Senior Member
- Nothing like a good coffee to make a better web
Less
More
6 years 1 week ago #170274
by Fábio Jordan
Parameters in URL give Error 0 Using $this when not in object context was created by Fábio Jordan
Hi.
I have noticed that when I add parameters in my URL (and also when a link from other website, like Facebook, insert parameters), my website give me the following error:
0 Using $this when not in object context
Look that:
www.cafecomfilme.com.br/criticas/critica-do-filme-bohemian-rhapsody?fbclid=IwAR1D3F9E6vZvQZrrBYcFMQq9rCUCeBOobHgvIFhsRC9aFz41vW15HD9riCE
The same page works fine if I remove the parameters from Facebook:
www.cafecomfilme.com.br/criticas/critica-do-filme-bohemian-rhapsody
Ok, I can remove the parameters manually, but my user won't have a clue what to do and will leave the website.
So, anyone have a hint to fix this?
Thanks in advance!
Best regards!
I have noticed that when I add parameters in my URL (and also when a link from other website, like Facebook, insert parameters), my website give me the following error:
0 Using $this when not in object context
Look that:
www.cafecomfilme.com.br/criticas/critica-do-filme-bohemian-rhapsody?fbclid=IwAR1D3F9E6vZvQZrrBYcFMQq9rCUCeBOobHgvIFhsRC9aFz41vW15HD9riCE
The same page works fine if I remove the parameters from Facebook:
www.cafecomfilme.com.br/criticas/critica-do-filme-bohemian-rhapsody
Ok, I can remove the parameters manually, but my user won't have a clue what to do and will leave the website.
So, anyone have a hint to fix this?
Thanks in advance!
Best regards!
Please Log in or Create an account to join the conversation.
- Fábio Jordan
- Topic Author
- Offline
- Senior Member
- Nothing like a good coffee to make a better web
6 years 1 week ago #170275
by Fábio Jordan
Replied by Fábio Jordan on topic Parameters in URL give Error 0 Using $this when not in object context
By the way, I'm using:
Joomla 3.8.12
K2 2.9
Modules from K2
K2 BNR
XT Link for K2
Gavick template
Just noticed that this error only happens in articles, in categories, the parameters works fine:
www.cafecomfilme.com.br/criticas?facebook
www.cafecomfilme.com.br/criticas
Is there something to do with a code in my override files?
Thanks again!
Joomla 3.8.12
K2 2.9
Modules from K2
K2 BNR
XT Link for K2
Gavick template
Just noticed that this error only happens in articles, in categories, the parameters works fine:
www.cafecomfilme.com.br/criticas?facebook
www.cafecomfilme.com.br/criticas
Is there something to do with a code in my override files?
Thanks again!
Please Log in or Create an account to join the conversation.
- Fábio Jordan
- Topic Author
- Offline
- Senior Member
- Nothing like a good coffee to make a better web
6 years 1 week ago #170277
by Fábio Jordan
Replied by Fábio Jordan on topic Parameters in URL give Error 0 Using $this when not in object context
Ok, I guess I solved it.
I had this piece of code to avoid duplicate URLs in my website and also to collect only the original URL:
<?php
if ($this->item->link!= JRequest::getURI()) JApplication::redirect($this->item->link,'','' ,true);
?>
It was the first thing in my item.php. I just removed it and now parameters are working.
Well, if anyone has the same problem, there's the solution.
I had this piece of code to avoid duplicate URLs in my website and also to collect only the original URL:
<?php
if ($this->item->link!= JRequest::getURI()) JApplication::redirect($this->item->link,'','' ,true);
?>
It was the first thing in my item.php. I just removed it and now parameters are working.
Well, if anyone has the same problem, there's the solution.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
6 years 1 week ago #170288
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic Parameters in URL give Error 0 Using $this when not in object context
Something's probably changed in the Joomla API calls you use in Joomla 3.9.0.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Parameters in URL give Error 0 Using $this when not in object context