Fatal Error: Unsupported operand types router.php
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 42
- Joined: Sat Feb 09, 2008 5:45 am
Fatal Error: Unsupported operand types router.php
I have no idea what happened, but I created a new user in my registration screen and went to login as that person (to test the system) and now when I click "Login", whether I enter a username and password or not, I get the following error:
Fatal error: Unsupported operand types in /home/ahuppert/public_html/popchurch/includes/router.php on line 141
Line 141 reads: $vars = $vars + $item->query;
I have looked all through Google and various support sites for Joomla... I'm not sure where to go as no one has posted a fix for this. Any suggestions?
If you want to see the error live, goto https://74.54.176.146/~ahuppert/popchurch/ and click on LOGIN at the bottom LEFT, or simply go to the following link:
https://74.54.176.146/~ahuppert/popchur ... d=usermenu
Andrew
Fatal error: Unsupported operand types in /home/ahuppert/public_html/popchurch/includes/router.php on line 141
Line 141 reads: $vars = $vars + $item->query;
I have looked all through Google and various support sites for Joomla... I'm not sure where to go as no one has posted a fix for this. Any suggestions?
If you want to see the error live, goto https://74.54.176.146/~ahuppert/popchurch/ and click on LOGIN at the bottom LEFT, or simply go to the following link:
https://74.54.176.146/~ahuppert/popchur ... d=usermenu
Andrew
-
- Joomla! Apprentice
- Posts: 42
- Joined: Sat Feb 09, 2008 5:45 am
Re: Fatal Error: Unsupported operand types router.php
SOLUTION:
For anyone else running into this problem, I figured it out on my own. What happened was that in the MOD_LOGIN I had set the login redirect to a menu-item that I had created. The problem was that the menu-item was set to ARTICLE and the actual article it was linked to had been deleted in housekeeping. So, the code is correct, it is simply trying to return a VALUE that does not exist. Instead of returning an error or a 404 not found, it returns the ominous message that an operand type is unsupported.
All I had to do was link that menu item to another article and the code worked like a charm. I hope this helps anyone else looking for a solution to this problem.
I happened to notice that many of the other people with this same problem also used COMMUNITY BUILDER. Check your CB page pointers for once the person logs on correctly or incorrectly... perhaps it is pointing to a menu or an article or a form that simply does not exist..
Andrew
For anyone else running into this problem, I figured it out on my own. What happened was that in the MOD_LOGIN I had set the login redirect to a menu-item that I had created. The problem was that the menu-item was set to ARTICLE and the actual article it was linked to had been deleted in housekeeping. So, the code is correct, it is simply trying to return a VALUE that does not exist. Instead of returning an error or a 404 not found, it returns the ominous message that an operand type is unsupported.
All I had to do was link that menu item to another article and the code worked like a charm. I hope this helps anyone else looking for a solution to this problem.
I happened to notice that many of the other people with this same problem also used COMMUNITY BUILDER. Check your CB page pointers for once the person logs on correctly or incorrectly... perhaps it is pointing to a menu or an article or a form that simply does not exist..
Andrew
-
- Joomla! Enthusiast
- Posts: 245
- Joined: Wed Mar 29, 2006 10:13 am
Re: Fatal Error: Unsupported operand types router.php
I get this type of error when I use the contac form, but only in firefox 2, not in ie7, or opera ior ie6
-
- Joomla! Explorer
- Posts: 267
- Joined: Mon Mar 12, 2007 7:41 pm
Re: Fatal Error: Unsupported operand types router.php
I am getting this error with the contact form also and the browser doesn't matter. I need a contact form. Does anyone have a solution, or even a path to look down? I am not a .php programmer so I am really in the dark on this one.
- BernardE
- Joomla! Apprentice
- Posts: 37
- Joined: Tue May 09, 2006 5:18 pm
- Location: South Africa
- Contact:
Re: Fatal Error: Unsupported operand types router.php
Thanks a lot Andrew, this is just the problem I had. I ever tried to reinstall. Just shows you - check the forum first!
http://www.webflash.co.za - Joomla Web design and development, Template Design
- wadscookin
- Joomla! Apprentice
- Posts: 13
- Joined: Fri Jun 09, 2006 12:02 am
- Location: Northampton, UK
- Contact:
Re: Fatal Error: Unsupported operand types router.php
Hi Andrew, after much frustration I finally Googled the net and found your solution to this error! Many thanks for this and I kick myself for not checking the forums sooner.
If Jesus is your co-pilot, change seats.
- bas123
- Joomla! Intern
- Posts: 67
- Joined: Fri May 09, 2008 2:49 pm
Re: Fatal Error: Unsupported operand types router.php
I just came across this error:
I am not quite sure how I'd resolve this with Andrew's (ahuppert) solution.
Anyone else have a thought?
The only time this happened was when trying to login while the page was showing search results.Fatal error: Unsupported operand types in JROOT/includes/router.php on line 140
I am not quite sure how I'd resolve this with Andrew's (ahuppert) solution.
Anyone else have a thought?
Listen... and Keep to the point!
-
- Joomla! Ace
- Posts: 1384
- Joined: Thu Aug 18, 2005 10:11 pm
- Location: San Juan - Argentina
- Contact:
Re: Fatal Error: Unsupported operand types router.php
Hi bas123
I've also had this error this morning (sent by a client) and then googled and found this thread.
As far I've read in some forums, etc. it seems it is a problem related to SEF. Disable it, or change the way sef urls are generated, and this should solve the problem.
Let us know if this worked (it did for me)
I've also had this error this morning (sent by a client) and then googled and found this thread.
As far I've read in some forums, etc. it seems it is a problem related to SEF. Disable it, or change the way sef urls are generated, and this should solve the problem.
Let us know if this worked (it did for me)
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Oct 06, 2008 1:53 am
Re: Fatal Error: Unsupported operand types router.php
Andrew,
Thanks much. I had the same problem and was able to find the reason with your helpful note.
Thanks for sharing.
-Sreekanth
Thanks much. I had the same problem and was able to find the reason with your helpful note.
Thanks for sharing.
-Sreekanth
- matew
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Sep 27, 2008 10:51 am
Re: Fatal Error: Unsupported operand types router.php
I got the same problem when I tried to send a mail in " Enquiry about the Product", in virtuemart.
As I got many Errors with virtuemart and joomla!, So I used a Patch Package of joomla to upgrade my current joomla.It Helped me to fix alot of bugs.But now again got an error saying that "Fatal error: Unsupported operand types in includes/router.php on line 148". Any Solution......
Thanks In advance.
As I got many Errors with virtuemart and joomla!, So I used a Patch Package of joomla to upgrade my current joomla.It Helped me to fix alot of bugs.But now again got an error saying that "Fatal error: Unsupported operand types in includes/router.php on line 148". Any Solution......
Thanks In advance.
Regards,
Mathew
Mathew
-
- Joomla! Apprentice
- Posts: 33
- Joined: Wed Apr 30, 2008 4:30 pm
Re: Fatal Error: Unsupported operand types router.php
fixed it for me too, thanks very much
-
- Joomla! Intern
- Posts: 75
- Joined: Fri Dec 05, 2008 6:03 pm
- Location: spain
Re: Fatal Error: Unsupported operand types router.php
This really IS cool: finding such a solution (on a silver plate) just when you needed it!!!
Thanks so much Andrew!!
Thanks so much Andrew!!
-
- Joomla! Apprentice
- Posts: 31
- Joined: Sat Nov 22, 2008 7:41 pm
Re: Fatal Error: Unsupported operand types router.php
Great idea Guy !
Same problem and it was a confilct between Community Builder Login module and some other module which remainded after I had uninstalled CB.
Everything works perfect now
Many thanks
Same problem and it was a confilct between Community Builder Login module and some other module which remainded after I had uninstalled CB.
Everything works perfect now
Many thanks
-
- Joomla! Apprentice
- Posts: 9
- Joined: Mon Mar 23, 2009 11:03 am
Re: Fatal Error: Unsupported operand types router.php
Andrew, You are my hero!!! I had this problem and now it is OK ...... Thanks
-
- Joomla! Apprentice
- Posts: 29
- Joined: Sun Feb 08, 2009 5:13 am
- Location: Lafayette, CO USA
Re: Fatal Error: Unsupported operand types router.php
Yep, links issue. Mine was not related to login, but general housekeeping and deleting old articles/menu items/cats/sections. Thanks for a quick point in the right direction for us newbs!
-
- Joomla! Enthusiast
- Posts: 204
- Joined: Mon Oct 27, 2008 6:38 pm
Re: Fatal Error: Unsupported operand types router.php
Hi, can you tell me how to do all this stuff as I'm a noob? I didn't even realised what you're telling here.All I had to do was link that menu item to another article and the code worked like a charm. I hope this helps anyone else looking for a solution to this problem.
I happened to notice that many of the other people with this same problem also used COMMUNITY BUILDER. Check your CB page pointers for once the person logs on correctly or incorrectly... perhaps it is pointing to a menu or an article or a form that simply does not exist..
-
- Joomla! Apprentice
- Posts: 15
- Joined: Tue Mar 27, 2007 2:19 pm
Re: Fatal Error: Unsupported operand types router.php
Andrew, You made my day. Thank you.
Just to add that in my case, the article was there (and published), but the menu item that my login was redirected to, was disabled. Changed that and all is working fine.
Thanks again. This is the true and ideal society, helping each other without return expectations!
/MajicMan
Just to add that in my case, the article was there (and published), but the menu item that my login was redirected to, was disabled. Changed that and all is working fine.
Thanks again. This is the true and ideal society, helping each other without return expectations!
/MajicMan
- dannette
- Joomla! Enthusiast
- Posts: 102
- Joined: Sat Apr 28, 2007 9:47 pm
- Location: Allentown, PA
Re: Fatal Error: Unsupported operand types router.php
For those with the problem and the contact form - I had the problem too but found I couldn't just link to the contact form without it actually being a menu item first.
Building with Joomla! since 2005!
Dannette Voorhis
Dannette Voorhis
-
- Joomla! Fledgling
- Posts: 3
- Joined: Mon Mar 23, 2009 8:12 pm
Re: Fatal Error: Unsupported operand types router.php
ahuppert wrote:SOLUTION:
For anyone else running into this problem, I figured it out on my own. What happened was that in the MOD_LOGIN I had set the login redirect to a menu-item that I had created. The problem was that the menu-item was set to ARTICLE and the actual article it was linked to had been deleted in housekeeping. So, the code is correct, it is simply trying to return a VALUE that does not exist. Instead of returning an error or a 404 not found, it returns the ominous message that an operand type is unsupported.
All I had to do was link that menu item to another article and the code worked like a charm. I hope this helps anyone else looking for a solution to this problem.
I happened to notice that many of the other people with this same problem also used COMMUNITY BUILDER. Check your CB page pointers for once the person logs on correctly or incorrectly... perhaps it is pointing to a menu or an article or a form that simply does not exist..
Andrew
Wow, i had the exact problem.. i was redirecting the login module to the link that was deleted.. thanks for bringing it to notice.. everything is working fine now....
- carterx
- Joomla! Intern
- Posts: 60
- Joined: Sat Jan 24, 2009 8:34 am
Re: Fatal Error: Unsupported operand types router.php
ahuppert wrote:SOLUTION:
For anyone else running into this problem, I figured it out on my own. What happened was that in the MOD_LOGIN I had set the login redirect to a menu-item that I had created. The problem was that the menu-item was set to ARTICLE and the actual article it was linked to had been deleted in housekeeping. So, the code is correct, it is simply trying to return a VALUE that does not exist. Instead of returning an error or a 404 not found, it returns the ominous message that an operand type is unsupported.
All I had to do was link that menu item to another article and the code worked like a charm. I hope this helps anyone else looking for a solution to this problem.
I happened to notice that many of the other people with this same problem also used COMMUNITY BUILDER. Check your CB page pointers for once the person logs on correctly or incorrectly... perhaps it is pointing to a menu or an article or a form that simply does not exist..
Andrew
Thanks, this was my issue.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Jun 16, 2009 7:48 am
Re: Fatal Error: Unsupported operand types router.php
On my site, using JForms I´d unpublished a menu element linked also from a content article, so the form was visible and the visitors could see it (the form was published) but when they submitted the form... got the error.
Thanks.
Thanks.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Mar 25, 2008 1:36 pm
Re: Fatal Error: Unsupported operand types router.php
Thanks for the hint Andrew, but I didn't like your solution as it doesn't fix all cases. I therefore decided to modify the code. Here is the original function.
If you notice above the offending line, the function handles the "empty URL" case that redirects the user to the default menu. By modifying the original code, I tested for a valid object $item. If it is not valid (causing the error) I then redirect to the default page.
Here is the modified code:
I realize this is a core hack, but it solves my problems. Hope it helps
Code: Select all
function _parseRawRoute(&$uri)
{
$vars = array();
$menu =& JSite::getMenu(true);
//Handle an empty URL (special case)
if(!$uri->getVar('Itemid') && !$uri->getVar('option'))
{
$item = $menu->getDefault();
if(!is_object($item)) return $vars; // No default item set
//Set the information in the request
$vars = $item->query;
//Get the itemid
$vars['Itemid'] = $item->id;
// Set the active menu item
$menu->setActive($vars['Itemid']);
return $vars;
}
//Get the variables from the uri
$this->setVars($uri->getQuery(true));
//Get the itemid, if it hasn't been set force it to null
$this->setVar('Itemid', JRequest::getInt('Itemid', null));
//Only an Itemid ? Get the full information from the itemid
if(count($this->getVars()) == 1)
{
$item = $menu->getItem($this->getVar('Itemid'));
ERROR----> $vars = $vars + $item->query;
}
// Set the active menu item
$menu->setActive($this->getVar('Itemid'));
return $vars;
}
Here is the modified code:
Code: Select all
function _parseRawRoute(&$uri)
{
$vars = array();
$menu =& JSite::getMenu(true);
//Handle an empty URL (special case)
if(!$uri->getVar('Itemid') && !$uri->getVar('option'))
{
$item = $menu->getDefault();
if(!is_object($item)) return $vars; // No default item set
//Set the information in the request
$vars = $item->query;
//Get the itemid
$vars['Itemid'] = $item->id;
// Set the active menu item
$menu->setActive($vars['Itemid']);
return $vars;
}
//Get the variables from the uri
$this->setVars($uri->getQuery(true));
//Get the itemid, if it hasn't been set force it to null
$this->setVar('Itemid', JRequest::getInt('Itemid', null));
//Only an Itemid ? Get the full information from the itemid
if(count($this->getVars()) == 1)
{
$item = $menu->getItem($this->getVar('Itemid'));
// --- START OF NEW CODE ---
if(!is_object($item)) {
$item = $menu->getDefault();
if(!is_object($item)) return $vars; // No default item set
//Set the information in the request
$vars = $item->query;
//Get the itemid
$vars['Itemid'] = $item->id;
// Set the active menu item
$menu->setActive($vars['Itemid']);
return $vars;
}
// --- END OF NEW CODE ---
$vars = $vars + $item->query;
}
// Set the active menu item
$menu->setActive($this->getVar('Itemid'));
return $vars;
}
- Webbman66
- Joomla! Fledgling
- Posts: 2
- Joined: Mon Apr 14, 2008 11:56 pm
Re: Fatal Error: Unsupported operand types router.php
Thanks to everyone trying to come up with fixes on this issue. I tried all possible solutions posted here but to no avail.
The only solution that worked for me was farrowz core hack. Thanks everyone!
Using J 1.5.12 with Chronoforms
The only solution that worked for me was farrowz core hack. Thanks everyone!
Using J 1.5.12 with Chronoforms
Cheers,
Steve
"Fail to Plan - Plan to Fail"
Steve
"Fail to Plan - Plan to Fail"
-
- Joomla! Enthusiast
- Posts: 233
- Joined: Fri Oct 12, 2007 7:07 pm
Re: Fatal Error: Unsupported operand types router.php
I am getting the same error message when I try to enter a new event in JCal. I can enter an event from the admin section, but when I try from the front end, I receive that error. Any other thoughts?
Thanks,
CH
Thanks,
CH
-
- Joomla! Intern
- Posts: 64
- Joined: Mon Aug 31, 2009 2:14 am
Re: Fatal Error: Unsupported operand types router.php
I found the same problem ,Kotsolis wrote:Hi, can you tell me how to do all this stuff as I'm a noob? I didn't even realised what you're telling here.All I had to do was link that menu item to another article and the code worked like a charm. I hope this helps anyone else looking for a solution to this problem.
perhaps it is pointing to a menu or an article or a form that simply does not exist..
Fatal error: Unsupported operand types in /home/hearingv/public_html/includes/router.php on line 148
I couldnt understand why, as I had directed it to the forum page which did exist
However When I checked, I found that there was two links for the forum in the menu selection for th log in module. I had clicked on the old one. Once I changed it to the new correct one I was okay.
If is a problem with the login- click Extensions/ then module manager. Click on "Log In Form" ( edit) Look at the Log In redirection setting on the Right hand side. There is one for Log in and one for Log Out. Ensure the menu item it is directed to DOES EXIST. That you havent since moved it or replaced it. Change it to one that does. CLick SAve. Then go and see what happens when you log in/ or out. Hopefully it will work. Mine does
- masoesa
- Joomla! Explorer
- Posts: 300
- Joined: Mon Sep 26, 2005 7:11 pm
- Location: Brooklyn NY
- Contact:
Re: Fatal Error: Unsupported operand types router.php
Thanks! It worked for me.
http://going-natural.com
The site where Natural Beauty Shines
The site where Natural Beauty Shines
-
- Joomla! Fledgling
- Posts: 2
- Joined: Mon Nov 09, 2009 5:22 am
Re: Fatal Error: Unsupported operand types router.php
the best answer
-
- Joomla! Fledgling
- Posts: 2
- Joined: Thu Dec 03, 2009 5:08 am
Re: Fatal Error: Unsupported operand types router.php
This is EXACTLY what I needed! Much thanx
-
- Joomla! Fledgling
- Posts: 1
- Joined: Fri Dec 04, 2009 9:25 pm
- Location: Israel
- Contact:
Re: Fatal Error: Unsupported operand types router.php
I have same problem with $vars = $vars + $item->query;
webmaster tool detect it but unable to find the bug.
webmaster tool detect it but unable to find the bug.
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Apprentice
- Posts: 18
- Joined: Sun Jan 18, 2009 8:18 pm
Re: Fatal Error: Unsupported operand types router.php
I had a similar problem that started like this:
I created a new contact, for a special purpose.
Since I always have a TERRIBLE time figuring out the URL of such pages, I turned SEO OFF so that the real mangled numeric URL was visible.
I had neglected to turn the SEO back on.
When I turned it back on, the email contact form worked.
But it still does not send the Contact Form User to a THANK YOU FOR THE MESSAGE page...
Thanks to all for the expert help!
Regards,
Kent Morrison
I created a new contact, for a special purpose.
Since I always have a TERRIBLE time figuring out the URL of such pages, I turned SEO OFF so that the real mangled numeric URL was visible.
I had neglected to turn the SEO back on.
When I turned it back on, the email contact form worked.
But it still does not send the Contact Form User to a THANK YOU FOR THE MESSAGE page...
Thanks to all for the expert help!
Regards,
Kent Morrison