Thursday, May 17, 2012

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:

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...?

Add comment

Please note: all comments are reviewed before being published.


Security code
Refresh

Member Login

Joes Latest Members

A huge WELCOME goes to today's newest members:

  • infonat
Member Signups (Activated)
BeforeCurrentTrend
Day21=
Week105ê
Month11224ê
Year2,265612ê

Member Stats
62 guests are currently online.
1,178 members are still deciding.
There are 5,935 members in total.

Latest Comments

Paypal Donations

Want to support my work? Any donation is a blessing :c)