Invalid arguments passed in router.php on line 325

Thought I'd put this error in here and how I fixed it. Basically because firstly I don't want to have to create an account on someone else's forum just to post my answer and secondly because my solution is a "cowboy fix" rather than the other intelligent solutions on the web.

The issue was that I was building my first Joomla 1.5 component and getting the below error if I put in a menu:

copyraw
Warning: implode() [function.implode]: Invalid arguments passed in /home/.../public_html/includes/router.php on line 325
  1.  Warning: implode() [function.implode]: Invalid arguments passed in /home/.../public_html/includes/router.php on line 325 

Where "..." is the path on your server.

If you're writing a component, then ask yourself if you really need the router.php file. Mine was generated by "http://www.notwebdesign.com/joomla-component-creator/". I don't need one because although I rely on data submitted through the forms ($_GET array), all the submitted data on the front-end of my component is controlled and not customizable.

I fixed this by removing the reference to router.php within the installation XML file. (<filename>router.php</filename>). I even deleted the router.php file from my installation zip file (I checked that nothing was referring to it).

The reason I've fixed it the way I did is because I don't need a router.php. The router.php file supposedly holds the two functions to:

  1. convert a system URL to a SEF URL
  2. convert a SEF URL back to a system URL

My site has been switched to SEF in the global configuration (where all SEO settings are set to "Yes") and works fine irrespectively.  In time, if I ever learn to use it properly, I may change my opinion but why complicate things...?

Category: Joomla :: Article: 275

Add comment

Your rating:

Submit

Accreditation

Badge - Zoho Creator Certified Developer Associate
Badge - Zoho Deluge Certified Developer
Badge - Certified Zoho CRM Developer

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF

Please publish modules in offcanvas position.