Tuesday, 31 August 2010 02:54

Problem with sh404sef built-in 404 error page - Invalid Argument Warning

Problem: PHP warning messages when visiting the 404 error page in sh404sef

Warning: Invalid argument supplied for foreach() in /components/com_content/helpers/route.php on line 106
Warning: Invalid argument supplied for foreach() in /components/com_content/helpers/route.php on line 106
Warning: Invalid argument supplied for foreach() in /components/com_content/helpers/route.php on line 106

Bad karma : we can't find that page !

You asked for http://www.yoursite.com/page_name/, but despite our computers looking very hard, we could not find it. What happened ?

* the link you clicked to arrive here has a typo in it
* or somehow we removed that page, or gave it another name
* or, quite unlikely for sure, maybe you typed it yourself and there was a little mistake ?

Analysis: It looks like Joomla is giving us this error message because it is looking for an ItemID now for the 404 error page, which is set in the sh404sef configuration.  This gives us additional control over the error page now, as we have specified an ItemID, we can also specify which template and modules are going to show on this page.

Solution: Follow these steps

  1. Edit the "__404__" article (I removed the underscores from the article title and just hit save - this step is probably optional but I don't see the point in the underscores)
  2. Create a menu link to this "404" article (create a "hiddenmenu" if you don't already have one)
  3. Note the ItemID# of the menu link you just created in step 2
  4. Edit the sh404sef Error Page Configuration: Make sure you've chosen the correct "404" page from the drop-down and give the ItemID of your 404 menu link in place of the "0" they provide in the default configuration.
Comments (1)
This comment was minimized by the moderator on the site

Thanks for the post. Worked great.

Snacky
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Suggested Locations

Latest Comments

Got a similar email that seemed suspicious. Ignored it and they even followed up today.
My organization received one of these emails from "Linda," but uses https://www.bestprosintown.com/p...
Hi Nate, I got the same email template from the same email address today and found you through a ...
Just received one today (16 Aug 2022) from "Mailchimp". Thanks for sharing!
Thanks for posting this. I just got one today. I was 99% sure it was a scam, and your post confirmed...


Design & Development

Wordpress, Drupal, Joomla
New custom websites
Bespoke themes and extensions
Redesigns, upgrades, migrations

Web Design & Development


Optimization & SEO

Let us optimize and manage your overall online presence. We offer full service monthly SEO as well as one-time projects.  

Optimization Plans & Pricing


Maintenance, Patching

White glove monthly backups, security updates, maintenance and testing for your Wordpress, Drupal, or Joomla site.

Maintenance Plans & Pricing


Email Newsletter

Bring your web & marketing performance to the next level: monthly blog post roundup via email.  

Stay in Touch!