Page 1 of 1

com_content helpers route.php line 106

Posted: Wed Oct 01, 2008 8:14 pm
by heldrida
Hi,
what this error is about ?
Warning: Invalid argument supplied for foreach() in /home/components/com_content/helpers/route.php on line 106

I've checked the file, so I understood, it could have something to do with items or articles, deleted almost everything, teste only with one or two, deleted menu items, etc

*I've created my own template, but I belive I didnt left any importat JDOC statement behind. I remember I wasnt using the "head" once, but it was solved, and the error was kind a diferent of this one.

This is happening while using "Latest News" module! I started by trying to use a free one called News Show GK, that was giving this error also!

Any help is appreciated!

Re: com_content helpers route.php line 106

Posted: Thu Oct 02, 2008 8:01 am
by heldrida
Solved by doing the following sugestion:

http://joomlacode.org/gf/project/joomla ... m_id=12724

Re: com_content helpers route.php line 106

Posted: Tue Jun 09, 2009 8:42 pm
by CarlitosWay
Hello,

I'm also havin this "com_content/helpers/route.php on line 106" problem. I don't understand the whole "http://joomlacode.org/gf/project/joomla ... m_id=12724" code. Could anyone please help me out in this one? I have just a little idea about writting code, so please give me a non-coder solution.
Thanks in advance.

Re: com_content helpers route.php line 106

Posted: Wed Jun 10, 2009 4:15 am
by ianmac
CarlitosWay wrote:Hello,

I'm also havin this "com_content/helpers/route.php on line 106" problem. I don't understand the whole "http://joomlacode.org/gf/project/joomla ... m_id=12724" code. Could anyone please help me out in this one? I have just a little idea about writting code, so please give me a non-coder solution.
Thanks in advance.
The issue mentioned was fixed last October. The issue you are experiencing, I believe, is a different issue. Can you try creating a menu item that points to an article and see if that fixes the problem?

I believe something has already been filed for this.

Ian

Re: com_content helpers route.php line 106

Posted: Wed Jun 10, 2009 9:38 pm
by CarlitosWay
Wow!!

Problem solved! I have to have an article published as a menu item (not only created). Thats not what I actually wanted, but it's ok. I hope the Joomla developers try to get rid of this issue in the next version.

Thanks a lot!

Charly

Re: com_content helpers route.php line 106

Posted: Mon Oct 11, 2010 6:37 pm
by DannyRitiu
There is a very easy solution for this problem:

- Edit the file components/com_content/helpers/route.php
- Insert a new line between line 99 and line 100
- In the new line write: $items = null;
- Now on line 107, before the statement foreach($items as $item) write: if ($items!=null)

Re: com_content helpers route.php line 106

Posted: Thu Oct 21, 2010 12:43 pm
by guzmanig
thank you, i think i found the final solution to that problem

Re: com_content helpers route.php line 106

Posted: Mon Nov 22, 2010 9:36 am
by opo
works like a dream!

OP

Re: com_content helpers route.php line 106

Posted: Thu Dec 16, 2010 11:57 am
by RustyJoomla
DannyRitiu wrote:There is a very easy solution for this problem:

- Edit the file components/com_content/helpers/route.php
- Insert a new line between line 99 and line 100
- In the new line write: $items = null;
- Now on line 107, before the statement foreach($items as $item) write: if ($items!=null)
Great work! Thank you!

Re: com_content helpers route.php line 106

Posted: Sun Jan 09, 2011 5:10 pm
by hkicenet
DannyRitiu wrote:There is a very easy solution for this problem:

- Edit the file components/com_content/helpers/route.php
- Insert a new line between line 99 and line 100
- In the new line write: $items = null;
- Now on line 107, before the statement foreach($items as $item) write: if ($items!=null)
Done, Thank you :)

Re: com_content helpers route.php line 106

Posted: Thu Mar 03, 2011 4:38 am
by maryswave
I am having the same problem and tried the solution but now I am getting this error:

Parse error: syntax error, unexpected T_VARIABLE in /home2/socialsa/public_html/components/com_content/helpers/route.php on line 101

Re: com_content helpers route.php line 106

Posted: Thu Mar 03, 2011 4:54 am
by maryswave
Ok... I figured out what the problem was, I had a link to the Home page but unpublished it until I finished my front page article and had a different link set to default. I just did not realize it would cause so many problems.

Re: com_content helpers route.php line 106

Posted: Sat Jul 09, 2011 5:29 am
by indigosparcs
DannyRitiu wrote:There is a very easy solution for this problem:

- Edit the file components/com_content/helpers/route.php
- Insert a new line between line 99 and line 100
- In the new line write: $items = null;
- Now on line 107, before the statement foreach($items as $item) write: if ($items!=null)
Thanks alot this saved my day... :)

Re: com_content helpers route.php line 106

Posted: Fri Jan 20, 2012 10:47 am
by b366alive
I know this is an old thread, but
DannyRitiu wrote:
There is a very easy solution for this problem:

- Edit the file components/com_content/helpers/route.php
- Insert a new line between line 99 and line 100
- In the new line write: $items = null;
- Now on line 107, before the statement foreach($items as $item) write: if ($items!=null)
Still works.

Thanks a million,

P.S.Joomla 1.7.3

EDIT: its on line 136 now though.
make it look like this...

Code: Select all

if ($items!=null) foreach ($items as $item)
Peace..............

Re: com_content helpers route.php line 106

Posted: Sat Feb 04, 2012 9:54 pm
by ovcharoff
DannyRitiu wrote:There is a very easy solution for this problem:

- Edit the file components/com_content/helpers/route.php
- Insert a new line between line 99 and line 100
- In the new line write: $items = null;
- Now on line 107, before the statement foreach($items as $item) write: if ($items!=null)
Thank you ! Worked like a charm ! I installed a social plugin (facebook, chrome, tweeter, etc.) for k2 and I had this error. Now everything is OK thanks to you ! :)

Re: com_content helpers route.php line 106

Posted: Sun Feb 26, 2012 2:50 pm
by Renzoku
Works just fine for me too! Thanks! ;D

Re: com_content helpers route.php line 106

Posted: Tue Mar 06, 2012 7:45 pm
by fmgoodwin
Hi. This fix worked for me, too. However, now Facebook doesn't show the item title or text when sharing the stories, or the url's, from the site. Could this be a side-effect of the fix, or is something else causing this problem?

(On Edit): When Facebook renders the url, it just shows my site name as the title and site description where text should show. The images are showing, and the FB links created work for me, but others report that the facebook links aren't working.

Please advise & Thanks.