Answer the question
In order to leave comments, you need to log in
Where can the error come from?
When trying to open a non-existent page instead of 404, it gives 500 with this error:
Fatal error: Call to a member function getOne() on null in /core/model/modx/modresponse.class.php on line 68
if (!($this->contentType = $this->modx->resource->getOne('ContentType'))) {
if ($this->modx->getDebug() === true) {
$this->modx->log(modX::LOG_LEVEL_DEBUG, "No valid content type for RESOURCE: " . print_r($this->modx->resource->toArray(), true));
}
$this->modx->log(modX::LOG_LEVEL_FATAL, "The requested resource has no valid content type specified.");
}
Answer the question
In order to leave comments, you need to log in
$this->modx->resource does not have a given getOne method
var_dump($this->modx->resource ); what does it return?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question