Skip to content

Commit

Permalink
[Fixed] Fixed an issue with getJsonLD($element)
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jul 27, 2016
1 parent 7a41cb2 commit 2437c82
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Some things to do, and ideas for potential features:
* [Added] Added modified_time and published_time to OpenGraph articles when an SEOmatic Meta FieldType is used
* [Improved] Safeguard against 'Undefined index: seoImageTransform'
* [Fixed] Handle non-posted entries
* [Fixed] Fixed an issue with getJsonLD($element)
* [Improved] Updated the README.md

### 1.1.27 -- 2016.07.26
Expand Down
4 changes: 2 additions & 2 deletions models/Seomatic_MetaFieldModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ public function getJsonLD($element)
{
$entryMeta = craft()->seomatic->getMetaFromElement($element);
if ($entryMeta)
craft()->seomatic->setEntryMeta($entryMeta, $element->url);
$entryMeta = craft()->seomatic->setEntryMeta($entryMeta, $element->url);
}

$metaVars = craft()->seomatic->getGlobals('', $locale);
$result = craft()->seomatic->getMainEntityOfPageJSONLD($entryMeta, $metaVars['seomaticIdentity'], $locale, false);

return rtrim($result);
return $result;
}


Expand Down
3 changes: 2 additions & 1 deletion releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"[Added] Added modified_time and published_time to OpenGraph articles when an SEOmatic Meta FieldType is used",
"[Improved] Safeguard against 'Undefined index: seoImageTransform'",
"[Fixed] Handle non-posted entries",
"[Fixed] Fixed an issue with getJsonLD($element)",
"[Improved] Updated the README.md"
]
},
Expand All @@ -18,7 +19,7 @@
"[Fixed] Fixed a regression with Entry Meta cascade",
"[Fixed] Fixed an issue with SEOmatic FieldTypes on categories",
"[Fixed] Fixed invalid releases.json",
"[Improved] We now strip all control characters (including \n and \r) from the JSON-LD arrays",
"[Improved] We now strip all control characters from the JSON-LD arrays",
"[Improved] Updated the README.md"
]
},
Expand Down
1 change: 1 addition & 0 deletions services/SeomaticService.php
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ public function setEntryMeta($entryMeta, $entryMetaUrl)
$meta['seoMainEntityOfPage'] ="";
}
$this->entryMeta = $meta;
return $meta;
} /* -- setEntryMeta */

/* --------------------------------------------------------------------------------
Expand Down

0 comments on commit 2437c82

Please sign in to comment.