RM 1.2 Undefined class constant 'RESOURCE_CANONICAL'

Snog

Well-known member
Got this error today and I can recreate it by manually entering the updates URL for a resource...

Code:
ErrorException: Fatal Error: Undefined class constant 'RESOURCE_CANONICAL' - library/XenResource/ControllerPublic/Resource.php:2585
Generated By: Unknown Account, Today at 12:14 PM

#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}

Request State

array(3) {
  ["url"] => string(55) "http://xxx.com/resources/test-resource.2/updates"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

Any ideas what might cause it?
 
This is the particular code that's causing it:
PHP:
$totalUpdates = $updateModel->countUpdates($conditions);
if (!$totalUpdates)
{
   return $this->responseRedirect(
      XenForo_ControllerResponse_Redirect::RESOURCE_CANONICAL,
      XenForo_Link::buildPublicLink('resources', $resource)
   );
}

But there's no reason why RESOURCE_CANONICAL shouldn't work; it does (and should) exist in that class:

upload_2016-11-12_20-43-20.webp

I'm not sure what would cause PHP to report otherwise.
 
I lost too much of my hair trying to figure out odd things like that a long time ago. I stopped trying to figure them out and just go 'OK it works again, I won't lose what little hair I have left'. :D
 
Top Bottom