Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1068

Joomla! 4.x Coding • Re: Error logging truncates the filename where the error is located

$
0
0
#13 [ROOT]/index.php(32): require_once('/home/mysite/...')
This line is executed first, according to the PHP call stack, presented in reverse time sequence, starting from the bottom: line 32 of the file index.php in the main Joomla 4.x folder. The original line looks like this:

Code:

require_once dirname(__FILE__) . '/includes/app.php';
The PHP native function dirname() returns the path of the parent directory, the main Joomla folder, of the current file, index.php.

The error message comes from line #0 of the Stack trace:

2024-08-22T09:11:23+00:00CRITICAL 31.152.243.246errorUncaught Throwable of type ParseError thrown with message "syntax error, unexpected token "("". Stack trace: #0 [ROOT]/libraries/src/MVC/View/HtmlView.php(204): Joomla\CMS\MVC\View\HtmlView->loadTemplate(NULL)
It actually points to the file and line executed just before the error occured. This is how line 204, now line 203 of libraries/src/MVC/View/HtmlView.php of Joomla 4.4.7, loads a view:

Code:

        $result = $this->loadTemplate($tpl);
The following line, line #1 of the PHP call stack then reveals which view was being loaded:

#1 [ROOT]/libraries/src/MVC/View/CategoryView.php(262): Joomla\CMS\MVC\View\HtmlView->display(NULL)
To cut a long story short, the syntax error is reported from one of the Category view override files in the folder templates/your-front-end-template/html/com_content/category.

Statistics: Posted by toivo — Sat Aug 24, 2024 2:08 am



Viewing all articles
Browse latest Browse all 1068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>