Fixed ErrorException: Accessed unknown getter 'parentTemplate' on XF:Template[1101] in src\XF\Mvc\Entity\Entity.php at line 175

arms

Well-known member
Affected version
beta 4
I've upgraded to latest beta.

I get "There are manual rebuild jobs awaiting completion. Continue running them."

Then after running get:

ErrorException: Accessed unknown getter 'parentTemplate' on XF:Template[1101] in src\XF\Mvc\Entity\Entity.php at line 175

  1. XF::handlePhpError()
  2. trigger_error() in src\XF\Mvc\Entity\Entity.php at line 175
  3. XF\Mvc\Entity\Entity->get() in src\XF\Mvc\Entity\Entity.php at line 92
  4. XF\Mvc\Entity\Entity->__get() in src\XF\Job\TemplateMerge.php at line71
  5. XF\Job\TemplateMerge->mergeTemplate() insrc\XF\Job\TemplateMerge.php at line 32
  6. XF\Job\TemplateMerge->run() in src\XF\Job\Manager.php at line 241
  7. XF\Job\Manager->runJobInternal() in src\XF\Job\Manager.php at line187
  8. XF\Job\Manager->runJobEntry() in src\XF\Job\Manager.php at line 76
  9. XF\Job\Manager->runQueue() in src\XF\Admin\Controller\Tools.php at line 136
  10. XF\Admin\Controller\Tools->actionRunJob() insrc\XF\Mvc\Dispatcher.php at line 249
  11. XF\Mvc\Dispatcher->dispatchClass() in src\XF\Mvc\Dispatcher.php at line87
  12. XF\Mvc\Dispatcher->dispatchLoop() in src\XF\Mvc\Dispatcher.php at line41
  13. XF\Mvc\Dispatcher->run() in src\XF\App.php at line 1787
  14. XF\App->run() in src\XF.php at line 326
  15. XF::runApp() in admin.php at line 13

Code:
ErrorException: Accessed unknown getter 'parentTemplate' on XF:Template[1101] src\XF\Mvc\Entity\Entity.php:175
Generated by: admin Sep 28, 2017 at 12:50 PM
Stack trace
#0 [internal function]: XF::handlePhpError(512, 'Accessed unknow...', 'D:\\laragon\\www\\...', 175, Array)
#1 src\XF\Mvc\Entity\Entity.php(175): trigger_error('Accessed unknow...', 512)
#2 src\XF\Mvc\Entity\Entity.php(92): XF\Mvc\Entity\Entity->get('parentTemplate')
#3 src\XF\Job\TemplateMerge.php(71): XF\Mvc\Entity\Entity->__get('parentTemplate')
#4 src\XF\Job\TemplateMerge.php(32): XF\Job\TemplateMerge->mergeTemplate(1101)
#5 src\XF\Job\Manager.php(241): XF\Job\TemplateMerge->run(7.9999959468842)
#6 src\XF\Job\Manager.php(187): XF\Job\Manager->runJobInternal(Array, 7.9999959468842)
#7 src\XF\Job\Manager.php(76): XF\Job\Manager->runJobEntry(Array, 7.9999959468842)
#8 src\XF\Admin\Controller\Tools.php(136): XF\Job\Manager->runQueue(true, 8)
#9 src\XF\Mvc\Dispatcher.php(249): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#10 src\XF\Mvc\Dispatcher.php(87): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', 'html', Object(XF\Mvc\ParameterBag), 'tools', Object(XF\Admin\Controller\Tools), NULL)
#11 src\XF\Mvc\Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src\XF\App.php(1787): XF\Mvc\Dispatcher->run()
#13 src\XF.php(326): XF\App->run()
#14 admin.php(13): XF::runApp('XF\\Admin\\App')
#15 {main}
Request state
<pre class='xdebug-var-dump' dir='ltr'>
<small>D:\laragon\www\XF2\src\XF\Debugger.php:28:</small>
<b>array</b> <i>(size=4)</i>
  'url' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'/admin.php?tools/run-job'</font> <i>(length=24)</i>
  'referrer' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'http://xf2.dev/admin.php?tools/run-job'</font> <i>(length=38)</i>
  '_GET' <font color='#888a85'>=&gt;</font>
    <b>array</b> <i>(size=1)</i>
      'tools/run-job' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>''</font> <i>(length=0)</i>
  '_POST' <font color='#888a85'>=&gt;</font>
    <b>array</b> <i>(size=3)</i>
      '_xfRedirect' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'/admin.php'</font> <i>(length=10)</i>
      '_xfToken' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'********'</font> <i>(length=8)</i>
      'only_ids' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>''</font> <i>(length=0)</i>
</pre>
 
Line 71 of src/XF/Job/TemplateMerge.php should be changed from:
PHP:
$parentTemplate = $template->parentTemplate;
To:
PHP:
$parentTemplate = $template->ParentTemplate;
Should be sorted for the next release.
 
Back
Top Bottom