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:
Warning: implode() [function.implode]: Invalid arguments passed in /home/.../public_html/includes/router.php on line 325
- 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:
- convert a system URL to a SEF URL
- 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...?