Wrong Metadata on New Module

Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
I'm pretty happy with my new module except it is taking the generic metadata from my network, instead of generating its own OG image and description.

So this page - http://kenrich.me/sales is sharing on Facebook like the attached screenshot.

Given that the whole idea of the module is to allow all saleable items from a profile to be promotable from one page, this is huge issue, since it can't be promoted with the right metadata.
Capturejjjj.JPG.jpg
Capturejjjj.JPG.jpg  •  28KB




--

Ken Rich
indiegospel.net

updated by @ken-rich: 06/26/16 12:36:38AM
michael
@michael
8 years ago
7,717 posts
take a look at the other modules that do provide an og:description, they will all contain a file in the /templates directory that is jrShare_this_??????.tpl make sure your module has that too. Its what the jrShareThis module looks for.
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
No, it wasn't there. So I copied the one from blogs and modified by replacing blog with sales wherever I found it. Then reset cache.

{jrCore_module_url module="xxSales" assign="murl"}
<meta property="og:url" content="{$og_item_url|replace:"http:":"`$method`:"}" />
<meta property="og:see_also" content="{$og_item_url|replace:"http:":"`$method`:"}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{$sales_title|jrCore_entity_string}" />
{if isset($sales_image_size) && $sales_image_size > 100}
<meta property="og:image" content="{$jamroom_url|replace:"http:":"`$method`:"}/{$murl}/image/sales_image/{$_item_id}/xxlarge/_v={$sales_image_time}" />
<meta property="og:image:width" content="512" />
<meta property="og:image:height" content="385" />
{/if}
<meta property="og:description" content="{$sales_text|jrCore_format_string:$profile_quota_id|jrCore_strip_html|jrCore_entity_string|truncate:200}" />
<meta property="og:site_name" content="{$_conf.jrCore_system_name}" />
<meta property="og:updated_time" content="{$_updated}" />

However, as you can see in the attached screenshot, the metadata is still wrong in the Facebook debugger.
metadata.JPG.jpg
metadata.JPG.jpg  •  110KB




--

Ken Rich
indiegospel.net
michael
@michael
8 years ago
7,717 posts
This is the output of the og:stuff on kenrich.me/sales:
</script>
<meta property="og:url" content="http://indiegospel.net/sales" />
<meta property="og:see_also" content="http://kenrich.me" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Ken Rich (@ken-rich)" />
<meta property="og:description" content=" &nbsp; Ken Rich is the creator of the Indie Gospel&nbsp;network, and one of it&#039;s contributing artists. He currently serves as it&#039;s director and webmaster. He is a songwriter, home studio buff, aspiring video producer, and an author who writes on Christian issues. You can reach him..." />
<meta property="og:image" content="http://kenrich.me/profile/image/profile_image/1175/xxlarge" />
<meta property="og:image:width" content="512" />
<meta property="og:image:height" content="385" />
<meta property="og:site_name" content="indiegospel.net" />
<meta property="og:updated_time" content="1459127770" />
</head>

<body>

Its all there, just may need to adjust the template code as desired to get the desired output.
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
I just did a test and I believe this is a cross domain issue. My profile is "mapped" with the domain mapping module.

There is another profile in the same quota (has the new Sales module) that is not mapped and it's proper metadata is showing.

Brian fixed this issue in other modules but I don't know how.


--

Ken Rich
indiegospel.net

updated by @ken-rich: 03/27/16 07:57:16PM