No Code Attached Yet Information Required Frontend Template bug
avatar C-Lodder
C-Lodder
8 Oct 2021

Steps to reproduce the issue

  1. Open layouts/joomla/content/full_image.php
  2. Create a PHP error by removing use Joomla\CMS\HTML\HTMLHelper; from the top.
  3. In the frontend of your site, go to any single article that contains a Full Article Image

Actual result

Whilst the page does show an error, the HTML markup is completely off and invalid.

If you inspect the source code, you'll notice the <head> tags are empty, and all the markup inside the <body> is wrapped inside <div class="com-content-article item-page" itemscope="" itemtype="https://schema.org/Article">

image

image

avatar C-Lodder C-Lodder - open - 8 Oct 2021
avatar joomla-cms-bot joomla-cms-bot - change - 8 Oct 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Oct 2021
avatar C-Lodder C-Lodder - change - 8 Oct 2021
The description was changed
avatar C-Lodder C-Lodder - edited - 8 Oct 2021
avatar brianteeman
brianteeman - comment - 8 Oct 2021

confirmed

avatar C-Lodder C-Lodder - change - 8 Oct 2021
The description was changed
avatar C-Lodder C-Lodder - edited - 8 Oct 2021
avatar chmst chmst - change - 8 Oct 2021
Labels Added: ?
avatar chmst chmst - labeled - 8 Oct 2021
avatar brianteeman
brianteeman - comment - 22 Oct 2021

It's weird. It only happens when the error is in a layout

avatar C-Lodder
C-Lodder - comment - 23 Oct 2021

Yeah, definitely a bizarre one

avatar khu5h1
khu5h1 - comment - 6 Nov 2021

Hey, I am working on this issue for the last 3-4 days and I made a few observations which are as follows:

  1. The origin of the problem is from components\com_content\tmpl\article\default.php .
  2. The reason for this problem is that the default.php file is using LayoutHelper to render components like full_image or info_block.
  3. So what this LayoutHelper does is that It renders the whole error page when there is an error in the component.
  4. As the info_block is executed before the full_image component the info_block comes before the error.
  5. I am trying to figure out the solution to the problem.

@brianteeman if you have any suggestions for a solution, it would be a great help.

Regards

avatar brianteeman
brianteeman - comment - 24 Jun 2022

I dont think its related to the layouthelper as I have just come across the exact same thing with a plugin on the main template

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar Quy
Quy - comment - 23 Mar 2024

I can not reproduce this in v5.1. Please confirm. Thanks.

avatar C-Lodder
C-Lodder - comment - 25 Mar 2024

Haven't tested in 5.x, but just an FYI that I raised this for 4.x, which I see is still in support.

avatar Quy
Quy - comment - 27 Mar 2024

I cannot reproduce in v4.4.4.

Removed use Joomla\CMS\Layout\LayoutHelper; in layouts/joomla/content/full_image.php.

35786

avatar Quy Quy - change - 1 Apr 2024
Labels Added: Information Required Frontend Template
Removed: ?
avatar Quy Quy - labeled - 1 Apr 2024
avatar Hackwar
Hackwar - comment - 4 Apr 2024

I also tested this on a few sites and can't replicate this anymore. I had this issue in the past as well, but since then it seems to have been fixed.

avatar brianteeman
brianteeman - comment - 4 Apr 2024

I could replicate this before but not now

avatar Quy Quy - change - 4 Apr 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-04-04 19:13:37
Closed_By Quy
avatar Quy Quy - close - 4 Apr 2024
avatar Quy
Quy - comment - 4 Apr 2024

Closing as this is no longer reproducible by several people. Thanks.

Add a Comment

Login with GitHub to post a comment