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

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

Related Articles

Joes Revolver Map

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

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
© 2024 Joel Lipman .com. All Rights Reserved.