Joomla 3.8.12 Update - Why is the head.php file suddenly not found

Joomla 3.8.12 Update - Why is the head.php file suddenly not found

Resolved Issue
PS Awite Alex
  • (1 Ratings)

Hello,

"Warning: require_once(/home/xxxxxx/libraries/joomla/document/html/renderer/head.php): failed to open stream: No such file or directory in /home/xxxxxx/templates/ps_awite/error.php on line 29

Fatal error: require_once(): Failed opening required '/home/xxxxxx/libraries/joomla/document/html/renderer/head.php' (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/xxxxxx/templates/ps_awite/error.php on line 29

This error is caused by your template while it's processing another error. To be able to investigate the actual issue we first need to make sure your template is not producing an error anymore.

The error is triggered because /home/xxxxxx/templates/ps_awite/error.php is trying to load /home/xxxxxx/libraries/joomla/document/html/renderer/head.php which doesn't exist.

See: https://github.com/joomla/joomla-cms/tree/3.8.12/libraries/joomla

The file libraries/joomla/document/html/renderer/head.php has been moved in newer versions of Joomla. The facted that this error happens means that the developer of the template is directly loading core joomla file; which is bad practice. It also means that the template hasn't been updated.

We are happy to assist you, but its not possible for us to provide support on sites that are not completely updated or are running older versions of extensions or template that no longer support newer versions of Joomla."

Thanks

Accepted Answer

PCMShaper Accepted Answer

1 year ago #203

Hi Alex,

This error came because of Joomla upgrade with latest version, so please follow below steps for solution...

If you found any line like below in error.php file of your template directory of your Joomla site

require_once(JPATH_LIBRARIES.'/joomla/document/html/renderer/head.php');

then replace that line with

if(!class_exists('JDocumentRendererHead')) {
	$head = JPATH_LIBRARIES . '/joomla/document/html/renderer/head.php';
	if(file_exists($head)) {
		require_once($head);
	}
 }

and then check your site :)

Best Regards
PCMShaper Team

6 Responses

Alex

1 year ago #204

Hi Alex,

This error came because of Joomla upgrade with latest version, so please follow below steps for solution...

If you found any line like below in error.php file of your template directory of your Joomla site

require_once(JPATH_LIBRARIES.'/joomla/document/html/renderer/head.php');

then replace that line with

if(!class_exists('JDocumentRendererHead')) {
	$head = JPATH_LIBRARIES . '/joomla/document/html/renderer/head.php';
	if(file_exists($head)) {
		require_once($head);
	}
 }

and then check your site :)

Best Regards
PCMShaper Team


 Thank you!! It was working fine!!

Matejko34

4 months ago #216

Hi. Just updated joomla to 3.8.12 and than 3.9.14.  Have the same problem as mentioned above. Try to replace the string with one you write down, but it triggers another error :  

1054 Unknown column '' in 'field list'

Can you give me some advice how to solve this one ?

Thank you 

PCMShaper

4 months ago #217

Hi. Just updated joomla to 3.8.12 and than 3.9.14.  Have the same problem as mentioned above. Try to replace the string with one you write down, but it triggers another error :  

1054 Unknown column '' in 'field list'

Can you give me some advice how to solve this one ?

Thank you 


 Hi Matejko34,

Can you send your site details for checking that issue on your site.

Best Regards
PCMShaper Team

Matejko34

4 months ago #218

Hi. Just updated joomla to 3.8.12 and than 3.9.14.  Have the same problem as mentioned above. Try to replace the string with one you write down, but it triggers another error :  

1054 Unknown column '' in 'field list'

Can you give me some advice how to solve this one ?

Thank you 


 Hi Matejko34,

Can you send your site details for checking that issue on your site.

Best Regards
PCMShaper Team

Hi Sure.


site is  www.dfs.slniecko.sk . Problem is on page DFS Slniečko -O nás ( about us) .  Site is in slovak. I  create a sub- page in SPpage builder then add to main menu - but it shows the first error. I solved it with copy paste the lines above but then another error shows.  Strange is , that if i add already created page in SP page builder it works correctly. 

Do you need also acces to the page ? 

Thanks


 

PCMShaper

4 months ago #219

Hi. Just updated joomla to 3.8.12 and than 3.9.14.  Have the same problem as mentioned above. Try to replace the string with one you write down, but it triggers another error :  

1054 Unknown column '' in 'field list'

Can you give me some advice how to solve this one ?

Thank you 


 Hi Matejko34,

Can you send your site details for checking that issue on your site.

Best Regards
PCMShaper Team

Hi Sure.


site is  www.dfs.slniecko.sk . Problem is on page DFS Slniečko -O nás ( about us) .  Site is in slovak. I  create a sub- page in SPpage builder then add to main menu - but it shows the first error. I solved it with copy paste the lines above but then another error shows.  Strange is , that if i add already created page in SP page builder it works correctly. 

Do you need also acces to the page ? 

Thanks

Yes, we need access of your site. Can you send details to our [email protected] mail.

 

Pcmshaperuser

3 weeks ago #220
hi pcmshaper
I got this error after upgrade Joomla to  version 3.9.18.

Warning: require_once(/home/ppbag/test2.ppbag.ir/libraries/joomla/document/html/renderer/head.php): failed to open stream: No such file or directory in /home/ppbag/test2.ppbag.ir/templates/construct/error.php on line 28

Fatal error: require_once(): Failed opening required '/home/ppbag/test2.ppbag.ir/libraries/joomla/document/html/renderer/head.php' (include_path='.:/opt/cpanel/ea-php71/root/usr/share/pear') in /home/ppbag/test2.ppbag.ir/templates/construct/error.php on line 28


I tried to solve this problem with
if(!class_exists('JDocumentRendererHead')) {
	$head = JPATH_LIBRARIES . '/joomla/document/html/renderer/head.php';
	if(file_exists($head)) {
		require_once($head);
	}
 }
but i got 404 error
how can I solve and if you need how can I send my site details for checking that issue???

Submit Your Response