I can't handle sub-URLs of a CMSMain object

i've just been told to add some text and images to a SilverStripe website. But when i want to add the image, i get this message: "I can't handle sub-URLs of a CMSMain object." I've triede some different fixes around the forum, but all of them 1+ years old, so they aren't quite working. What could be a workaround?

// If we return a RequestHandler, call handleRequest() on that, even if there is no more URL to parse.
// It might have its own handler. However, we only do this if we haven't just parsed an empty rule ourselves,
// to prevent infinite loops
if(!$request->isEmptyPattern($rule) && is_object($result) && $result instanceof RequestHandler) {
$returnValue = $result->handleRequest($request);

// Array results can be used to handle
if(is_array($returnValue)) $returnValue = $this->customise($returnValue);

return $returnValue;

// If we return some other data, and all the URL is parsed, then return that
} else if($request->allParsed()) {
return $result;

// But if we have more content on the URL and we don't know what to do with it, return an error.
} else {
return $this->httpError(404, "I can't handle sub-URLs of a $this->class object.");
}