Skip to content

Instantly share code, notes, and snippets.

@jaygilmore
Forked from pepebe/new_gist_file.php
Last active November 14, 2016 20:05
Show Gist options
  • Save jaygilmore/93c3aa7e9b07f37b8d1b5a4e648353fd to your computer and use it in GitHub Desktop.
Save jaygilmore/93c3aa7e9b07f37b8d1b5a4e648353fd to your computer and use it in GitHub Desktop.
Fix fatal error "Fatal Error: Cannot redeclare class modTemplateVarInputRenderText..."
<?php
/*
Quick fix for this problem until I have the time to look for the cause.
"Fatal Error: Cannot redeclare class modTemplateVarInputRenderText...
...in core/model/modx/processors/element/tv/renders/mgr/input/text.class.php onl line 10"
*/
/**
* @package modx
* @subpackage processors.element.tv.renders.mgr.input
*/
if (! class_exists('modTemplateVarInputRenderText')) {
class modTemplateVarInputRenderText extends modTemplateVarInputRender {
public function getTemplate() {
return 'element/tv/renders/input/textbox.tpl';
}
}
}
return 'modTemplateVarInputRenderText';
@jaygilmore
Copy link
Author

The culprit in the case I was looking at was a TV Extra called "ColorPicker" was no longer registered as a TV input type. Reinstalling Colorpicker seems to have resolved the error on this site. It may be worthwhile reinstalling each Extra (especially those with Custom TV Types).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment