Closed (fixed)
Project:
Service links
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2011 at 20:00 UTC
Updated:
20 Feb 2012 at 18:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
TheCrow commentedUpgraded... so from 1.x to 2.x?
Comment #2
bcobin commentedYou know, I'm not sure - I upgraded via Drush and insofar as 1.x is no longer available, that could have been the case.
Comment #3
kurtismccartney commentedRemove the Blog content type checkmark from services links. Then try to look for the errors in your database (is your Blog still a blog in D7?)
Comment #4
kurtismccartney commentedCorrection. I had to re-enable the general services, print services and printer-friendly pages modules. THen I could enable service links in blog posts.
Comment #5
kurtismccartney commentedAlso, the new service links module has moved the service links types (General, Print, Farsi Etc.) out of the main box in D7.
Subtle error with a simple albeit strange solution. Woo DrupalCon 2012
Comment #6
asb commentedComing from #1303462: Cannot use a scalar value as an array in _service_links_render() and looking for a fix for the D6 version; this discussion seems to target upgrades to the D7 version?
Comment #7
TheCrow commentedi guess is almost the same problem he started from 6.x-1.x to 6.x-2.x, and you started from 6.x-2.0 to 6.x-2.1... then drush forget to do something... have you tried to clean the cache?
Comment #8
asb commentedYes, sure, several times.
Comment #9
greta_drupal commentedLooking to resolve this issue for D7, using latest Services Link update.
Seems related to showing services icons on teaser (links area). When disabling service links for teaser, error disappeared. ...but so do the services links -- even though they are configured to show on full node view.
Comment #10
TheCrow commented@both: what version of Drupal are you using? Made some theme customizations or using the APIs elsewhere?
Comment #11
asb commentedIn my case: Pressflow 6.22, no theme customizations related to service links module, and no useage of it's API.
I can reproduce the warning
WD php: Warning: Cannot use a scalar value as an array in _service_links_render() (line 5xx of /var/www/drupal/sites/all/modules/service_links/service_links.module).on several sites when runningdrush search-index(line 5xx refers to lines 543-558). Maybe you could try to reproduce this? drush 3.3 is even in Debian's repository; running PHP 5.3.3-7+squeeze3 with Suhosin-Patch.Comment #12
TheCrow commentedmade all the tests from scratch and i confirm, the error disappear after cache clean + saving the list of services again
Comment #13
asb commentedConfirming; the procedure from #12 seems to work.
Comment #14
jfine commentedSaving the lists of services worked for me as well.
Site configuration -> Services links -> Services -> Save
Comment #15
lizac commentedJust confirming that #12 and #14 worked for me too!
I simply believe that additional confirmation from someone who has faced the same issue will help validate that the suggested fix is working. Thanks Guys!
Comment #16
reg commentedUnfortunately that didn't work for me but I can shed some light on what's happening.
This return line in the function service_links_get_links() (shown below) has input arrays and a resultant array as attached, hopefully that will give the developer enough to know what's going on.
Essentially, every top level array element ends up with the scalar value of 1 except "google_one_plus" which has a value that's an array. All the non-array values produce the warnings.
Comment #17
reg commentedFurther information...
I just went to the services tab for the first time and Google Plus One was enabled but the rest were disabled.
I then enabled all and saved - errors went away.
I then disabled and saved - errors were still gone.
I then cleared the cache and reloaded a page - errors were still gone.
The conclusion is that somewhere in code it a bug of setting values before any values have been saved in the database.
Here is the $services array at line 403 as it's returned from the function service_links_get_links(), note that all the scalar values are gone (compared to as shown in the attached in the previous post - duplicated below):
Comment #18
shreeni2 commented#14 worked for me too.
Comment #19
TheCrow commentedAdded a patch on dev, for 6.x and 7.x: everytime a module containing some service is disabled the related id is filtered and a message is shown suggesting what to do...