modxcms / fred

The friendly front-end editor for visual, drag-and-drop content building in MODX CMS
https://fred.modx.com
MIT License
57 stars 25 forks source link

PHP Fatal error setTVValue() #461

Closed BigBlockStudios closed 1 year ago

BigBlockStudios commented 1 year ago

After creating new dropzone that uses a TV to store content, rebuilding causes an error in apache logs:

`PHP Fatal error: Uncaught Error: Call to a member function setTVValue() on null in /.../core/components/fred/src/RenderResource.php:241 Stack trace:

0 /.../core/components/fred/src/Processors/Generate/Refresh.php(51): Fred\RenderResource->render()

1 /.../core/src/Revolution/Processors/Processor.php(189): Fred\Processors\Generate\Refresh->process()

2 /.../core/src/Revolution/modX.php(1761): MODX\Revolution\Processors\Processor->run()

3 /.../core/src/Revolution/modConnectorResponse.php(151): MODX\Revolution\modX->runProcessor()

4 /.../core/src/Revolution/modConnectorRequest.php(89): MODX\Revolution\modConnectorResponse->outputContent()

5 /.../core/src/Revolution/modConnectorRequest.php(77): MODX\Revolution\modConnectorRequest->prepareResponse()

6 /var/w in /.../core/components/fred/src/RenderResource.php on line 241, referer: http://bloomfieldpools.local/manager/?a=home&namespace=fred`

The error shown on in the modx manager is:

image

Resources created using these TVs are not created when the package is installed in a new Modx installation

matdave commented 1 year ago

We'll get a new build out, it was a bad copy/paste. Fix is in here if you want to hot patch https://github.com/modxcms/fred/commit/6833abc47043c17d5ddab3c8aadfcd0f964fb3e2