Open mjsarfatti opened 9 years ago
Hmm the static resource and dashboard widgets are excluded there because the getContent method was returning the output instead of just the "raw" content. Is that the same with Articles?
No it's a different problem, but to be honest I don't completely understand it. The Article/getContent method wants to instantiate it's container (ArticlesContainer) but for some reason it fails, or it ends up instantiating a different class. All I have is that pair of errors above. This is the Article/getContent method:
public function getContent(array $options = array()) {
if ($this->xpdo instanceof modX) {
$settings = $this->getContainerSettings();
if ($this->xpdo->getOption('commentsEnabled',$settings,true)) {
$this->getCommentsCall($settings);
$this->getCommentsReplyCall($settings);
$this->getCommentsCountCall($settings);
$this->xpdo->setPlaceholder('comments_enabled',1);
} else {
$this->xpdo->setPlaceholder('comments_enabled',0);
}
$this->getTagsCall($settings);
/** @var ArticlesContainer $container */
$container = $this->getOne('Container');
if ($container) {
$container->getArchivistCall(); // <= this is line 58 as per above error
$container->getLatestCommentsCall();
$container->getLatestPostsCall();
$container->getTagListerCall();
}
}
$content = parent::getContent($options);
return $content;
}
As you can see for some reason the call $this->getOne('Container')
instantiates modDocument instead of ArticlesContainer.
Due to the way Articles is structured gitify fails to extract their content, with the following error:
A quick solution is to exclude them in Gitify/src/CommandExtractCommand.php around line 264