Weird stuff (canonical_url)

Started by Bounty_y2k, January 23, 2015, 01:18:06 PM

Previous topic - Next topic

Bounty_y2k

Something fishy is going on with my forums..
Yesterday I couldn't access any of my website pages since all include ssi.php. It showed up connection to database problem error.
I downloaded repair_settings.php and opened it changed nothing and pressed save or whatever button there is and problem was fixed. O.o
Anyhow, today I remembered to check error log (witch I didn't yesterday) I saw some admin fail logins from not-my IP address.
And since now everything works and logins were fails I emptied the error log and now on every visit on any page of the forum I get this error:
Quote
8: Undefined index: canonical_url

File: /home/site/public_html/forum/Themes/default/languages/Who.english.php (html_above sub template - eval?)
Line: 190

Only this includes canonical_url in my index.template.php

echo '
<meta property="og:url" content="', $context['canonical_url'], '" />'; //this is 190th line

//and this

// Present a canonical url for search engines to prevent duplicate content in their indices.
if (!empty($context['canonical_url']))
echo '
<link rel="canonical" href="', $context['canonical_url'], '" />';


Can you tell me what is the problem here?
Thank you :)

Shambles


Herman's Mixen

what first error pops up in your error log, when you enable the template eval in server settings ?!
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Bounty_y2k

God damn it..I forgot I already opened the topic about this,sorry about that. But this time it started by itself and I cant find a solution :S
And please delete one of these two topics xD

Bounty_y2k

Quote from: Herman's Mixen on January 23, 2015, 01:30:07 PM
what first error pops up in your error log, when you enable the template eval in server settings ?!
All errors are the same as the one I wrote in first post. With evaluation of templates and without it.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Antes

SMF does not provide canonical for every page you enter so its very normal you get that error. Check it like SMF does.

Arantor

As in it should really be:

if (!empty($context['canonical_url']))
echo '
<meta property="og:url" content="', $context['canonical_url'], '" />';

Kindred

in other words -- whatever mod you used to add the og:url property line is incorrect code...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Especially seeing how it's not valid XHTML which is good fun and games, of course.

Bounty_y2k

Oh yeah,i moved that line inside if function and it solved the problem. Thank you :)

Bounty_y2k

Hmm..I have a new problem now.
When I try to post any page of forum on Facebook I get an error I didn't see before.
QuoteCould not post to Wall
The message could not be posted to this Wall.

And when I debug this page in facebook debugging tool all parameters are okay..

Kindred

Well, does it work if you get rid of that of line, completely?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Bounty_y2k

Same thing even when its commented out.....damn it,how can I find out what is causing this? It worked until two days ago..

Kindred

What did you change, 2 days ago?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Bounty_y2k

I wrote in first post what happened. I didn't change anything except the part of canonical url. :S

Bounty_y2k

This is insane..I can post anything as long as it isn't my forum page...can anyone at least point me out where to look for errors?
Facebook debugger shows no errors..

Advertisement: