RM 1.2 Undefined class constant 'RESOURCE_CANONICAL'


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

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?

Chris D

XenForo developer
Staff member
This is the particular code that's causing it:
$totalUpdates = $updateModel->countUpdates($conditions);
if (!$totalUpdates)
   return $this->responseRedirect(
      XenForo_Link::buildPublicLink('resources', $resource)

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


I'm not sure what would cause PHP to report otherwise.


Well-known member
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