Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

seoPro.keywords placeholder is not set when empty #94

Open
jgulledge19 opened this issue May 30, 2019 · 0 comments
Open

seoPro.keywords placeholder is not set when empty #94

jgulledge19 opened this issue May 30, 2019 · 0 comments

Comments

@jgulledge19
Copy link

The [[+seoPro.keywords]] is not set when there are no keywords. Can this always be set?

Issue

When a resource is rendered and their is no value set for the seoPro.keywords, it will not allow caching in Statcache or Stockpile Static Generator

Related code

Starting around line 164

if ($seoKeywords) {
    $keyWords = $seoKeywords->get('keywords');
    $modx->setPlaceholder('seoPro.keywords', $keyWords);
}

Could it be updated to:

$keyWords = '';
if ($seoKeywords) {
    $keyWords = $seoKeywords->get('keywords');
}
// Always set the placeholder even if it is empty
$modx->setPlaceholder('seoPro.keywords', $keyWords);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant