- Posts: 8
 
COMMUNITY FORUM
Facebook Open Graph og:url Bug
- Brian
 - 
				
Topic Author
 - Offline
 - New Member
 
		Less
		More
		
			
	
		
			
	
						12 years 8 months ago				#110544
		by Brian
	
	
		
			
	
			
			 		
													
	
				Facebook Open Graph og:url Bug was created by Brian			
			
				Hello,
The K2 2.6.5 Open Graph Tag for Facebook is rendering a page url that is missing the first forward slash after the top level domain, creating an error in the Facebook Debugger. See below:
<meta property="og:url" content="www.domain.comrunning/articles/your-first-5K-race" />
Is there a bug in the view.html file that is causing this? Any other thoughts?
Thanks!
J-2.5.9
K2 - 2.6.5
					The K2 2.6.5 Open Graph Tag for Facebook is rendering a page url that is missing the first forward slash after the top level domain, creating an error in the Facebook Debugger. See below:
<meta property="og:url" content="www.domain.comrunning/articles/your-first-5K-race" />
Is there a bug in the view.html file that is causing this? Any other thoughts?
Thanks!
J-2.5.9
K2 - 2.6.5
Please Log in or Create an account to join the conversation.
- Brian
 - 
				
Topic Author
 - Offline
 - New Member
 
		Less
		More
		
			
	
		- Posts: 8
 
			
	
						12 years 7 months ago				#110545
		by Brian
	
	
		
			
	
			
			 		
													
	
				Replied by Brian on topic Re: Facebook Open Graph og:url Bug			
			
				Any thoughts on this issue?  Can someone tell me where the og:url meta data is originating?
Thanks!
					Thanks!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
 - 
				
 - Offline
 - Platinum Member
 
		Less
		More
		
			
	
		- Posts: 15920
 
			
	
						12 years 6 months ago				#110546
		by Krikor Boghossian
	
	
		
			
	
			
			 		
													
	
				Replied by Krikor Boghossian on topic Re: Facebook Open Graph og:url Bug			
			
				Hello Brian,
Are you using a 3rd party component or plugin?
I am saying this because OG is working fine on every J!2.5 K2 2.6.x sites I' ve checked,
you can also check the K2 Demo site for this.
And finally you should never hack the core, you can use the setMetaData() function instead.
					Are you using a 3rd party component or plugin?
I am saying this because OG is working fine on every J!2.5 K2 2.6.x sites I' ve checked,
you can also check the K2 Demo site for this.
And finally you should never hack the core, you can use the setMetaData() function instead.
Please Log in or Create an account to join the conversation.
- Brian
 - 
				
Topic Author
 - Offline
 - New Member
 
		Less
		More
		
			
	
		- Posts: 8
 
			
	
						12 years 6 months ago				#110547
		by Brian
	
	
		
			
	
			
			 		
													
	
				Replied by Brian on topic Re: Facebook Open Graph og:url Bug			
			
				Hi Krikor,
The only 3rd part component/module I'm using on the K2 items is JA Comment. I've tried disabling that component but didn't solve the problem.
I'm using JoomlArt JAT3 framework....is it possible that the framework is somehow removing the "/" ...or possibly anything in mod_rewrite or even on the server side?
Thank you!
Brian
					The only 3rd part component/module I'm using on the K2 items is JA Comment. I've tried disabling that component but didn't solve the problem.
I'm using JoomlArt JAT3 framework....is it possible that the framework is somehow removing the "/" ...or possibly anything in mod_rewrite or even on the server side?
Thank you!
Brian
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
 - 
				
 - Offline
 - Platinum Member
 
		Less
		More
		
			
	
		- Posts: 15920
 
			
	
						12 years 6 months ago				#110548
		by Krikor Boghossian
	
	
		
			
	
			
			 		
													
	
				Replied by Krikor Boghossian on topic Re: Facebook Open Graph og:url Bug			
			
				Brian I think that might cause the issue, but I cannot help you with the T3 framework.
I dont' think that it has anything to do with your .htaccess.
If I were you I would ask the T3 developers in this one since it is most likely a template bug.
					I dont' think that it has anything to do with your .htaccess.
If I were you I would ask the T3 developers in this one since it is most likely a template bug.
Please Log in or Create an account to join the conversation.
- Brian
 - 
				
Topic Author
 - Offline
 - New Member
 
		Less
		More
		
			
	
		- Posts: 8
 
			
	
						12 years 6 months ago				#110549
		by Brian
	
	
		
			
	
			
			 		
													
	
				Replied by Brian on topic Re: Facebook Open Graph og:url Bug			
			
				Krikor,
Thank you for your response. Interestingly, I disabled T3 framework, made Beez 2 the default template and disabled all other extensions, but the page source still shows <meta property="og:url" content="www.mysite.comfitness/articles/example" /> with no / after .com.
Can you tell me where line 459 $document->setMetaData('og:url', $uri->toString()); in the view.html file is actually retrieving the URL from? This might help me to track down the problem.
Thanks!
					Thank you for your response. Interestingly, I disabled T3 framework, made Beez 2 the default template and disabled all other extensions, but the page source still shows <meta property="og:url" content="www.mysite.comfitness/articles/example" /> with no / after .com.
Can you tell me where line 459 $document->setMetaData('og:url', $uri->toString()); in the view.html file is actually retrieving the URL from? This might help me to track down the problem.
Thanks!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
 - 
				
 - Offline
 - Platinum Member
 
		Less
		More
		
			
	
		- Posts: 15920
 
			
	
						12 years 6 months ago				#110550
		by Krikor Boghossian
	
	
		
			
	
			
			 		
													
	
				Replied by Krikor Boghossian on topic Re: Facebook Open Graph og:url Bug			
			
				I think there might an error on your configuration.
$uri->toString() all it does is return the url you are currently viewing.
PS. backup and try 2.6.6 or the SVN version.
					$uri->toString() all it does is return the url you are currently viewing.
PS. backup and try 2.6.6 or the SVN version.
Please Log in or Create an account to join the conversation.
- Brian
 - 
				
Topic Author
 - Offline
 - New Member
 
		Less
		More
		
			
	
		- Posts: 8
 
			
	
						12 years 6 months ago				#110551
		by Brian
	
	
		
			
	
			
			 		
													
	
				Replied by Brian on topic Re: Facebook Open Graph og:url Bug			
			
				Hello Krikor,
I've had success with a temporary solution by editing the view.html file and changing:
$document->setMetaData('og:url', $uri->toString());
to
$document->setMetaData('og:url', JURI::current());
I don't think I will need the query or fragment parts of the URI. Do you see any other problems with using JURI::current()?
Thanks!
					I've had success with a temporary solution by editing the view.html file and changing:
$document->setMetaData('og:url', $uri->toString());
to
$document->setMetaData('og:url', JURI::current());
I don't think I will need the query or fragment parts of the URI. Do you see any other problems with using JURI::current()?
Thanks!
Please Log in or Create an account to join the conversation.