Unsupported Operand Types - Bulk URL Aliases
jcfiala - November 8, 2009 - 18:07
| Project: | Link |
| Version: | 6.x-2.8 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | jcfiala |
| Status: | needs review |
Description
Posted by betz:
I updated link module to 2.8 but i still got a error when bulk updating url aliases.
This is the error:Fatal error: Unsupported operand types in /home/drupalcamp/default_www/sites/all/modules/link/link.module on line 368
I wanted to spin this off to it's own ticket, as the last one was getting a little too history-heavy.
That's an unusual thing to have happen. Are you using the value of the link filed as part of your alias?

#1
just like to add I commented the line 368 but still there's another problem line 371
Fatal error: Unsupported operand types in /home/dealback/public_html/sites/all/modules/link/link.module on line 371
#2
That's fine, but what I need to know is what is the url path that you entered into pathauto for that node type, and things along those lines. I'd like to reproduce what you're doing so I can then test it here. (And set it up in simpletest as well!)
Thanks.
#3
I had the same problem here, it looks that the "title" settings went missing. Once set, everything went fine again.
#4
I have the EXACT same error when I don't enter a link title beside the link..
Check this out..
http://justinhileman.info/articles/unsupported-operand-types-in-drupal-6x
it didn't work but there might be some useful info..
#5
Well now I can create a any node containing a link field, even with both titles entered, I get the error when I try to view the link.
#6
Receiving the same error for line 368 after updating the module.
Evidently field['attributes'] cannot always be assumed to already be an array.
A quick test like:
if (!is_array($field['attributes'])) {
$field['attributes'] = array();
}
helps things along. Seems like since this is new changes since 2.6 maybe a little refactoring here would be better.
thanks,
Joe
#7
I have the same problem "Fatal error: Unsupported operand types in /home/drupalcamp/default_www/sites/all/modules/link/link.module on line 368" when i type the name of my site without WWW prefix "mysite.com"? when I type with "www" - "www.mysite.com" - all is working fine.
The problem is with 2.8 and 6.x-2.x-dev 2009-Nov-21.
2.6 version is working without the error.
#8
Hey, my web is down duo to this error so get it fixed ASAP, please. Do not postpone it!
#9
Fortunately, downgrade do 2.6 did help. Apparently, 2.8 is a cul de sac of the link module. C'mon guys, hope you can do it better! ;-)
#10
I had the same problem. It didn't seem to matter what values I entered for the link title or URL. The module seems to be sloppily passing around variables. Examining $field['attributes'] shows that it is actually a string.
This patch fixes the problem for me, but the whole module could probably use some tidying up.
#11
Changing status to critical - this seems to be a pretty major blocker. I'd like to see a new release out soon if possible.
#12