Sorry if this was already dealt with and my search-fu failed. The icons are showing up fine on links that go off-site, but going to admin/config/user-interface/extlink spits up:
Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, string given, called in [...]/includes/theme.inc on line 1515 and defined in drupal_attributes() (line 2222 of [...]/includes/common.inc).
Checked Apache error logs and found nothing relevant.
If there isn't a fix I've managed to miss I'll try to have a crack at it tomorrow, if I can work out where to start looking! :)
It was working fine in alpha7 by the way, just didn't seem to like my beta1.
Comment | File | Size | Author |
---|---|---|---|
#4 | extlink-936816-4.patch | 1.39 KB | loganfsmyth |
Comments
Comment #1
ryivhnn CreditAttribution: ryivhnn commentedOkay, think I fixed it. Well the admin page is popping up again anyway :)
Changed line 46ish in extlink.module from
'#description' => t('Places an !icon icon next to external links.', array('!icon' => theme_image(drupal_get_path('module', 'extlink') .'/extlink.png')))
to
Ditto the mailto below it:
'#description' => t('Places an !icon icon next to mailto links.', array('!icon' => theme_image(drupal_get_path('module', 'extlink') .'/mailto.png'))),
to
Please excuse my dodgy formatting, I was getting confused with the nested arrays :) Also had to set the "attributes" thing to blank, I'm not actually sure what it does but it was complaining about being undefined.
Comment #2
quicksketchThanks, yep this change makes sense to me. In D7 you have to explicitly specify each parameter's name.
Comment #3
yourtube CreditAttribution: yourtube commentedFix worked for me too. Thanks!
Comment #4
loganfsmyth CreditAttribution: loganfsmyth commentedThanks for the fix, ryivhnn! I rolled a patch to make life easier for people.
Comment #5
Christopher Riley CreditAttribution: Christopher Riley commentedThanks for the fix as well as the patch works perfectly.
Comment #6
quicksketchThanks guys, committed. The only difference I made was that 'attributes' should always be an array instead of a string. Not sure why D7 is requiring an empty value at all here, but it works.
Comment #8
Dave ReidActually, this needs to be really fixed as theme functions shouldn't be called directly. See #1004734: Use theme('image', rather than theme_image( for the follow-up.