404 Page Error in Quickstart Site Topic is solved

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
etpourquelque27
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Oct 12, 2021 9:31 am

404 Page Error in Quickstart Site

Post by etpourquelque27 » Tue Oct 12, 2021 10:13 am

When 404 link menu is displayed and clicked on, warning below is shown below "Component not found" message. In order to replicate such 404 error below, debugging is activated in backend and is set to maximum. Installation is new without any configuration except what is mentioned above. How can this 404 error be fixed?
Thank you in advance.
Platform: helixUltimate-quickstart-j3-v.1.1.2

Call stack
# Function Location

1 () JROOT\libraries\src\Component\ComponentHelper.php:308

2 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\SiteApplication.php:194

3 Joomla\CMS\Application\SiteApplication->dispatch() JROOT\libraries\src\Application\SiteApplication.php:233

4 Joomla\CMS\Application\SiteApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:196

5 Joomla\CMS\Application\CMSApplication->execute() JROOT\index.php:49
Last edited by toivo on Tue Oct 12, 2021 9:44 pm, edited 2 times in total.
Reason: mod note: retitled, moved from 3.x General Questions

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13805
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: 404 Page Error in Quickstart Site

Post by toivo » Tue Oct 12, 2021 11:31 am

Welcome to the Joomla forum!

Which version of Joomla 3.x is this? Is this website live?

Quickstart packages are ok for a quick test of extensions but not recommended for live production sites.

You may want to visit the support forum of the developer and check if this is a known error.
Toivo Talikka, Global Moderator

etpourquelque27
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Oct 12, 2021 9:31 am

Re: 404 Page Error in Quickstart Site

Post by etpourquelque27 » Thu Oct 14, 2021 6:41 pm

Thank you Mr. Talikka for taking the time to respond to my question.

You asked:

1) "Is this website live?"

Answer: Yes, the site is live. Its URL is: https://leslundi.com
It is used as a sandbox. Use the link in the menu bar of the site to replicate the error as follows:
"pages New/404"

2) Which version of Joomla 3.x is this?

Answer: The current Joomla version is 3.9.14
I have purposefully not upgraded to the newest version in order to have a better grasp as to why
such an error has occurred and to find a solution before proceeding. Upgrading to a newer version
means that I will have wrestle with PHP compatibility in the server and deprecated codes.

Thank you again.

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 7243
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: 404 Page Error in Quickstart Site

Post by AMurray » Thu Oct 14, 2021 9:19 pm

That quickstart then is WAY behind. The current 3.x Joomla is 3.10.

I expect Joomshaper (Helix) focus has been on J 4.0 and therefore are probably less concerned about the upkeep of (old) 3.9.x series. At the very least, their I'd have thought their Quickstart package would include Joomla 3.10
Regards - A Murray

etpourquelque27
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Oct 12, 2021 9:31 am

Re: 404 Page Error in Quickstart Site

Post by etpourquelque27 » Sat Oct 16, 2021 2:24 am

Mr Murray,

I understand your "logical" reasoning that is based on "common wisdom" when stating that the focus is to address issues for the new version. Such perspective tends to lead the mind to erroneous conclusion. Your precious adage is "Let's hide old problems under the rug." In fact, regardless of the Joomla version 3.9, 3.10, or 4.0.3, the same 404 error occurs in all of them when link is selected as long as site is set to debugging and maximum. An additional error is generated when latest Joomla version is installed using Quickstart. The new error is: "The installation process failed." That is an anomaly that is resolved with a quick refresh. I don't think suppressing the 404 error by turning off debugging is a solution. It is worth noting that the 404 error is persistent to Standard Joomla Framework version as well (NON QUICKSTART).
Thank you for your understanding and attention.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13805
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: 404 Page Error in Quickstart Site

Post by toivo » Sat Oct 16, 2021 7:41 am

etpourquelque27 wrote:
Thu Oct 14, 2021 6:41 pm
Use the link in the menu bar of the site to replicate the error as follows:
"pages New/404"
Please go to Menus - All Menu Items and find the menu item for the entry 'Pages NEW - 404'. Click '404' in the column Title to see the details of that menu entry. What does the field Link contain?

The variable 'option' in the field Link shows the internal name of the component that this Quickstart installation cannot find. That component may not have been installed at all or it has been uninstalled.

An example of a valid entry in the Link field is 'index.php?option=com_contact&view=categories&id=0', which points to com_contact or the Contact component.

BTW, clicking Pages NEW - Contact generates the following error:
Warning
JUser: :_load: Unable to load user with ID: 871
This means that the user associated with the contact page has been deleted.

etpourquelque27 wrote:
Sat Oct 16, 2021 2:24 am
An additional error is generated when latest Joomla version is installed using Quickstart. The new error is: "The installation process failed."
Please report this error to the developer of this Quickstart package, if you want to continue using the Quickstart approach to testing, rather than downloading the latest, supported version of Joomla from https://downloads.joomla.org.

etpourquelque27 wrote:
Sat Oct 16, 2021 2:24 am
It is worth noting that the 404 error is persistent to Standard Joomla Framework version as well (NON QUICKSTART).
It is not clear what this statement means. A standard Joomla installation, downloaded from https://downloads.joomla.org, does not generate '404 Component not found' errors out-of-the-box, unless the administrator of the website adds an incorrect menu entry after the installation or a visitor types in an invalid URL.
Toivo Talikka, Global Moderator

etpourquelque27
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Oct 12, 2021 9:31 am

Re: 404 Page Error in Quickstart Site

Post by etpourquelque27 » Sat Oct 16, 2021 6:21 pm

Mr. Tovio,

Thank you for taking the time to reflect and contemplate the 404 error issue.

1) You wrote: "Warning JUser: :_load: Unable to load user with ID: 871"

Answer: That is not such a big deal since this can easily be fixed in the database.

2) You wrote: "Please go to Menus - All Menu Items and find the menu item for the entry 'Pages NEW - 404'. Click '404' in the column Title to see the details of that menu entry. What does the field Link contain?"

Answer: The link section contains: "index.php?Itemid=404".

3) You wrote: "The variable 'option' in the field Link shows the internal name of the component that this Quickstart installation cannot find. That component may not have been installed at all or it has been uninstalled."

Answer: You quoted "option" in your comment. Unfortunately, I do not see any "option" in the 404 menu page.

4) You wrote: "It is not clear what this statement means. A standard Joomla installation, downloaded from https://downloads.joomla.org, does not generate '404 Component not found' errors out-of-the-box, unless the administrator of the website adds an incorrect menu entry after the installation or a visitor types in an invalid URL."

Answer: I must admit that I had a bit of difficulty finding the proper key word when using "Standard Joomla Installation". I wanted to say that I installed Joomla 4.0.3 just as is as opposed to installing it from a quickstart package. When I tested both installation, the same 404 error shows up regardless of the version. If there is any doubt about about my observation, let us see what the outcomes are when installing and testing Joomla 4.0.3 out-of-the-box.

There are, in fact, two different error outcomes when a 404 error is generated. They fall under the following categories:

1) Without Htaccess eanbled
2) With Htaccess enabled

A) Let us look how the 404 error is generated when using scenario 1.

In the menu bar the URL https://leslundi.com followed by some nonsense text. For example,

https://leslundi.com/dgsdgsg

The output is:

"Not Found
The requested URL was not found on this server."

B) Now let's use https://leslundi.com/index.php/dgsdgsg

Please note that I have added index.php after the domain name.

The error output is much longer and more elaborated. Here it is:

"The requested page can't be found.
An error has occurred while processing your request.

You may not be able to visit this page because of:

an out-of-date bookmark/favourite
a mistyped address
a search engine that has an out-of-date listing for this site
you have no access to this page
Go to the Home Page

If difficulties persist, please contact the website administrator and report the error below.

404 Page not found
Call stack
# Function Location
1 () JROOT/libraries/src/Router/Router.php:153
2 Joomla\CMS\Router\Router->parse() JROOT/libraries/src/Application/CMSApplication.php:1066
3 Joomla\CMS\Application\CMSApplication->route()
JROOT/libraries/src/Application/SiteApplication.php:822
4 Joomla\CMS\Application\SiteApplication->route()
JROOT/libraries/src/Application/SiteApplication.php:230
5 Joomla\CMS\Application\SiteApplication->doExecute()
JROOT/libraries/src/Application/CMSApplication.php:278
6 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:63
7 require_once() JROOT/index.php:32

Please observe that Page 404 is not found.

Now let us look at scenario 2 that has htaccess enabled.

A) If this URL "https://www.leslundi.com/gdfgdf" without index.php added to the domain is used,
the output is the same in section B as mentioned above.

B) If this URL "https://www.leslundi.com/index.php/gdfgdf" with index.php added to the domain is used,
the output is as expected the same in section B because the page is redirected.


Regards and thank you for your patience

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13805
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: 404 Page Error in Quickstart Site

Post by toivo » Sat Oct 16, 2021 8:02 pm

etpourquelque27 wrote:
Sat Oct 16, 2021 6:21 pm
The link section contains: "index.php?Itemid=404".
That menu item simply refers to a non-existent menu entry. Remove that menu item and the problem is solved, isn't it?

etpourquelque27 wrote:
Sat Oct 16, 2021 6:21 pm
I installed Joomla 4.0.3 just as is as opposed to installing it from a quickstart package. When I tested both installation, the same 404 error shows up regardless of the version.
When Joomla 4.0.3 is installed out-of-the-box, the only menu entry is 'Home' and that entry works all right. There is no menu entry called '404'.

However, if one adds a new menu entry and selects the menu item type System Links - URL and then enters into the field Link either 'Itemid=404' or 'index.php?Itemid=404', Joomla reports an error "404 Page not found", which is expected behaviour. Nothing wrong with that.

True, when the Debug mode is turned on, the error message changes into '404 Component not found'. But what is the point in debugging an obviously erroneous menu entry?
Toivo Talikka, Global Moderator

etpourquelque27
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Oct 12, 2021 9:31 am

Re: 404 Page Error in Quickstart Site

Post by etpourquelque27 » Sun Oct 17, 2021 12:23 am

Sir:

You are absolutely correct when you stated that there is No menu called "404" in Joomla 4.0.3 out-of-the-box. However, if you had carefully read my last comment, you would not find a sentence or even a word from me where I stated to click on, select, or use any menu called 404. That is why I suggested adding a few words after the domain to generate a 404 error. I specifically used that approach so that you would NOT suggest that the error was due to a misconfiguration if a 404 menu was added. Your conclusion is exactly what I was expecting.

Stating that "what is the point in debugging an obviously erroneous menu entry" misses the point that opens unwanted vulnerable avenues. Trust me on that one. Those avenues are called "Hacking". If a 404 page works flawlessly, regardless of how an error is generated, the 404 page SHOULD NOT contain improper additional errors or php codes that disseminate additional information about a site. After some research on the net I must inform you that several individuals have been wrestling with that 404 error issue since 2007 or even earlier than that. Yes, I wrote 2007. This is not a typo error. By the way, you do not have to have a solution if a problem is beyond your capacity to resolve. What is of utmost importance is that you tried. As such you deserve a trophy for being kind enough to respond. Thank you for all your assistance.

P.S You wrote: "However, if one adds a new menu entry and selects the menu item type System Links - URL and then enters into the field Link either 'Itemid=404' or 'index.php?Itemid=404', Joomla reports an error "404 Page not found", which is expected behaviour. Nothing wrong with that."

I have added your 404 menu. Obviously, there is something wrong with the output when the link is clicked on. The error is much more than the "404 Page not found". Please read till the end.

The requested page can't be found.

An error has occurred while processing your request.

You may not be able to visit this page because of:

an out-of-date bookmark/favourite
a mistyped address
a search engine that has an out-of-date listing for this site
you have no access to this page

Go to the Home Page

If difficulties persist, please contact the website administrator and report the error below.

404 Page not found

Call stack
# Function Location
1 () JROOT/libraries/src/Router/Router.php:153
2 Joomla\CMS\Router\Router->parse() JROOT/libraries/src/Application/CMSApplication.php:1066
3 Joomla\CMS\Application\CMSApplication->route() JROOT/libraries/src/Application/SiteApplication.php:822
4 Joomla\CMS\Application\SiteApplication->route() JROOT/libraries/src/Application/SiteApplication.php:230
5 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
6 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:63
7 require_once() JROOT/index.php:32

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13805
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: 404 Page Error in Quickstart Site

Post by toivo » Sun Oct 17, 2021 6:03 am

Turn off the Debug option in Global Configuration to get the error reporting and 404 messages to return to standard behaviour.

It is perfectly normal for a website to report an HTTP status code 404 when a URL is not found. That is what websites do. A missing page is reported as the HTTP status code 404 with the explanation 'Page not found'. When the typed URL is inconsistent, for example pointing to a non-existing menu item, and Joomla is unable to route the URL, the error message may refer to a missing component.

A live website should have the Debug mode on only in a test situation when it is turned on for a user group like Super User. Therefore websites do not display call stack information to everyday visitors. Many webmasters turn off error reporting altogether by changing the level of error reporting in Global Configuration to 'None'.
Toivo Talikka, Global Moderator

etpourquelque27
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Oct 12, 2021 9:31 am

Re: 404 Page Error in Quickstart Site

Post by etpourquelque27 » Sun Oct 17, 2021 3:42 pm

Mr Toivo, Mr. Tovio!

I fully agree with your reasoning and conclusion. However, I beg to differ slightly.

Instead of disabling the debug option as you have rightfully suggested, I have decided to contemplate two other options.

1) The first one is to create a custom 404 page and disable the default one that can be found in “/public_html/joomla/templates/your_template".

I have tried that option by adding the snippet to the new custom error page:

<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
if ($this->error->getCode() == '404') {
header('Location: /MenuItemLink ');
exit;
}
?>

Now create a new article and replace "MenuItemLink" with the new article link. Save and test your new 404 page. The 404 error code should disappear.

However, this option does not resolve the issue because it does NOT tell us what is causing the error output. So, let us look at the second option.

2) Navigate to “/public_html/joomla/templates/your_template". Locate the default "error.php" file to make a backup copy of it.

Open the default error.php file. Go to line #180 more or less which depends on your template version . You should find this snippet:

<?php echo $this->renderBacktrace(); ?>

If it is commented out, the 404 error code should disappear completely with debugging enabled. Et voila!

My only concern is:

Why did a developer want to use a "renderBacktrace" is beyond me. Is it to locate automatically files that are generating 404 errors? I cannot find a logical reason so far.
Another approach is to change "renderBacktrace" to "getBacktrace" in order to spit out additional information about the error code for further debugging.

My adage is: Patience and persistence are virtues that can yield great rewards.

Regards and thank you for your support.

Please close issue.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28305
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: 404 Page Error in Quickstart Site

Post by Per Yngve Berg » Sun Oct 17, 2021 5:54 pm

You set this topic as solved by clicking the hook icon on the post and select this item as an answer.

etpourquelque27
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Oct 12, 2021 9:31 am

Re: 404 Page Error in Quickstart Site

Post by etpourquelque27 » Mon Oct 18, 2021 3:51 am

etpourquelque27 wrote:
Sun Oct 17, 2021 3:42 pm

Line #180 has this snippet:

<?php echo $this->renderBacktrace(); ?>

Please be aware that line # 190 has the same snippet. It is optional to comment the second one out.


Post Reply

Return to “Templates for Joomla! 3.x”