Error in PHPBB3: "PHP Notice: Undefined index: META in forum\cache\ctpl_admin_overall_header.html.php on line 9"

StackOverflow https://stackoverflow.com/questions/19890044

  •  30-07-2022
  •  | 
  •  

سؤال

I just installed the latest version of phpbb and when I'm trying to edit category in the admin panel I'm getting the following error:

PHP Notice: Undefined index: META in forum\cache\ctpl_admin_overall_header.html.php on line 9

and this is line 9 in the specific file:

<?php if ($this->_rootref['META']) {  echo (isset($this->_rootref['META'])) ? $this->_rootref['META'] : ''; } ?>

What should I change to make it work?

هل كانت مفيدة؟

المحلول

I'm not sure what you're trying to do, but this seems to be the most logical:

<?php if(isset($this->_rootref['META'])) { echo $this->_rootref['META']; } ?>

At the moment, you're accessing the META key of $this->_rootref and then checking whether the key exists - the steps are backwards.

نصائح أخرى

You are editing the cache file. Changes to them are not permanent and if the template cache is cleared, you'll lose all of them.

You need to edit the template file in adm/styles/admin_overall_header.tpl, where you should use the phpBB template syntax.

{META}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top