Comments

gr4phic3r created an issue. See original summary.

ramdas gaikar’s picture

Hello,

Please check if you have any Javascript errors on Browser Console, as I can see this Configuration form uses below Java scripts in which one is external and other are local:

  drupal_add_js('https://ws.sharethis.com/share5x/js/stcommon.js', 'external');  //This is ShareThis's common library - has a serviceList of all the objects that are currently supported.
  drupal_add_js($my_path . '/ShareThisForm.js');
  drupal_add_js($my_path . '/stlib_picker.js');
  drupal_add_css($my_path . '/stlib_picker.css');
mp’s picture

hi. yes got one ...

ReferenceError: _all_services is not defined
jQuery.each(_all_services, function(key, value) {

ramdas gaikar’s picture

Hi,

Make sure you are able to access the below javascript file in your browser.

https://ws.sharethis.com/share5x/js/stcommon.js.

The _all_services Object/Variable is defined in this javascript. So by anymeans like firewall or security, If you are not able to access the above js file, then you will not be able to use sharethis.

Thanks.

mp’s picture

hi

i can access it from my computer, but can i put this adress somewhere in the script so that i can test it from my webspace?

ADrupalUser’s picture

I just started having this same issue as soon as I upgraded to 7.213. I'm getting the following javascript error:

ReferenceError: stlib_picker is not defined sharethis:303:1

naveenvalecha’s picture

Version: 7.x-2.12 » 7.x-2.x-dev

Moving back to 7.x-2.x-dev branch

Rob_Feature’s picture

Priority: Normal » Major

I'm also getting:
sharethis:line 130 Uncaught ReferenceError: stlib_picker is not defined

Marking major since this would prevent proper setup of the module (it seems to retain any previous settings if you're upgrading instead of installing from scratch)

Rob_Feature’s picture

Title: D7 Not able to select services in the configuration page » Unable to select services on the configuration page

Cleaning up issue title.

ADrupalUser’s picture

Just adding more information. Since this issue occurred with the upgrade to 7.213, I already had my desired services selected. After the upgrade, the services also stopped appearing on my node pages.

I've since regained functionality by downgrading to the previous version.

naveenvalecha’s picture

StatusFileSize
new1.77 KB

hHere's the start but its not the whole fix.

naveenvalecha’s picture

Status: Active » Needs work
naveenvalecha’s picture

StatusFileSize
new10.5 KB

With some more changes and progressive patch but the issue still exist. The images are not loading. Anyone wants to pick this up feel free to jump into it.

navneet0693’s picture

Status: Needs work » Needs review
StatusFileSize
new3.31 KB

Patch is independent of the above patches. Please review :)

naveenvalecha’s picture

can you also merge #13 +#14 patch

navneet0693’s picture

Sure :)

navneet0693’s picture

StatusFileSize
new11.93 KB
naveenvalecha’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Looks good.

naveenvalecha’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x-2.x
Will be out in next release.
@gr4phic3r,
Please use the latest release and let us know if this resolved for you.

Seraphemme’s picture

I just tried the latest dev version. Still can't select options. The select boxes are reversed -- the possible social media options are on the right, choices selected on the left. You can highlight an option, but it won't transfer to the services selected.

navneet0693’s picture

StatusFileSize
new73.11 KB

@Seraphemme

Please try clearing cache or enabling disabling module. Also, do check for reports in dblog. I am not facing any such issue on my local. Please refer to screenshot.

Seraphemme’s picture

@navneet0693 Just tried disabling, then enabling and clearing cache. No change. This time I noticed that it's actually not possible to select an option. (During my previous attempt, overzealous clicking made the option appear to be selected.) Hovering highlights options, but clicking doesn't select them. I tried this in Chrome and Firefox. Tried various options. Nothing worked.

navneet0693’s picture

@Seraphemme Quick one, try uninstalling, clearing cache and installing again.

naveenvalecha’s picture

@Seraphemme,
Can you share your settings/steps to reproduce it.

Here are the steps that I quickly followed to test it :
Launched two versions of sharethis on simlytest.me
https://simplytest.me/project/sharethis/7.x-2.12
https://simplytest.me/project/sharethis/7.x-2.x

Go to admin/config/services/sharethis

The services section is working fine on both.

Seraphemme’s picture

@navneet0693 Uninstalling, clearing cache and installing made a difference. There was a default selection of social media buttons set up in the "Selected Options" area, and they were initially satisfactory, so I saved and proceeded to a page. I use Panels and my ShareThis widget area was blank. The title showed, but not the Sharethis buttons. I fiddled around and discovered that if I added ShareThis as a node on my panel, both the node and the widget buttons appeared, disabling the node buttons made the widget disappear again. So, reenabled the node buttons.

I then found that I did not like the Google plus 1 and Facebook Like options or the "show Sharethis on hover" under Advanced options. I unchecked those, returned to my sample page and the buttons had disappeared again. I returned to configure Sharethis and checked all the options I had deselected. I was able to get Facebook Like and Google plus 1 buttons to appear, but all the others were missing. I checked back in with the configuration page, and sure enough, the other social media button options in the selected options list were no gone, and once again, I cannot select the options to add them back to that list.

I'll probably have to uninstall again and reenable again. Also, I'm going to have to replace all of my Sharethis widgets with Sharethis node content in each of my panels. I'd rather not have Facebook Like, Google Plus 1 and Sharethis hover options enabled, but possibly leaving the defaults alone is the only way that the module will function? (Oh, also, I didn't test to see that I could actually use the buttons.)

Rob_Feature’s picture

Status: Fixed » Needs work

I'm seeing this same behavior and I've upgraded (not installed from scratch). Unless I'm not understanding correctly, this is still broken unless you uninstall/reinstall. That's not really an acceptable solution for an upgrade path from previous versions of the module, so I'm reopening this as 'needs work'.

  • naveenvalecha committed 354f2ae on 7.x-2.x
    Revert "Issue #2759221 by naveenvalecha, navneet0693: Unable to select...
naveenvalecha’s picture

I have reverted the patch for now. Leaving it open to fix it in the proper way.

navneet0693’s picture

Status: Needs work » Needs review
StatusFileSize
new3.78 KB

Reverting commit of Issue-#2687179.

navneet0693’s picture

@Seraphemme,

Thanks for explaining about the issue. I believe the issue is due to the #2687179: Markup overrides for st spans feature that got committed before 7.x-2.13. I am working to resolve the issues.

navneet0693’s picture

StatusFileSize
new15.63 KB

Adding code to resolve js issues. Please take this patch for testing.

navneet0693’s picture

@Seraphemme,
Could you use the patch in #32 and test it. Please, let us know if the issue is resolve or not.

graber’s picture

Not working for me..

navneet0693’s picture

@Graber Did you tried patch in #32 ?

graber’s picture

@navneet0693 Yes, it didn't work for me. I just gave up and included sharethis code on relevant node pages in a custom module using hook_node_view. There was no time unfortunately.

anas_maw’s picture

Patch 32 not working for me

nathanlawsn’s picture

I'm also unable to select services on a fresh install of 7.x-2.13.

I'm receiving the following error in the console.

sharethis:145 Uncaught ReferenceError: stlib_picker is not defined

navneet0693’s picture

StatusFileSize
new14.91 KB

Hi Folks,

I am sorry for making it difficult for you all and getting this resolved late. Please apply the patch on latest version of module.

Steps to solve:

1. Apply the patch
2. Run command on terminal in docroot directory : drush pm-disable sharethis -y; drush pmu sharethis -y; drush cc all; drush en sharethis -y; drush cc all;

Note: Only execute the above code after applying the patch. Do not test directly on productions.

fanton’s picture

Patch #39 not working for me

bdevore’s picture

Patch #39 brings back the service providers selection, but the images for the UI are broken, and custom icon options are gone. It looked like a misplaced quote before I patched, as the custom markup form had a double quotation mark before the label name of the service. So "Twitter "Facebook, etc, and when I tried to save the output was sanitizing, so on save it would switch to &quote;Twitter, saving again would do this again, and you would get &quote;Twitter

navneet0693’s picture

StatusFileSize
new83.98 KB

@fanton Did you tried uninstalling and installing again ? Please apply this patch on latest version of module.

@bdevore Did it finally worked ? Please follow the steps the i have mentioned. This seems to be working perfectly at my at end.

Even after applying the patch, if you don't uninstall the module and install it again, variables are stored in variable table with previous values, so it might affect.

dpovshed’s picture

My 2 cents are directly not related to the root of the problem, but might be an acceptable workaround for sitebuilders in despair.

I downgraded to 7.x-2.12 and everything works.

Helice’s picture

Patch #39 fixed it! However I added "Whatsapp" service but it isn't displaying.

Rob_Feature’s picture

I just want to chime in as someone using this on a live site: The suggestion keeps being made to "uninstall and reinstall". That's really not ever an acceptable solution if a module is already active on a production site. Whats the reason for the uninstall? It seems like something should be done so an uninstall/reinstall isn't necessary.

laborouge’s picture

Subscribe.

hockey2112’s picture

Will the fix be committed to the official release soon? Using 7.x-2.13

navneet0693’s picture

@Rob_Feature Uninstall and re-install required to reset the values of variables of sharethis being stored, however carefully removing and adding the value of sharethis_service_option will not require re-installing.

Rob_Feature’s picture

@navneet0693 can't these variables be reset/updated/removed (etc) with an update hook that is run during module update? That seems like the proper way to handle that type of change for existing users.

svenryen’s picture

I had this issue, tried both 7.x-2.13 and 7.x-2.x-dev. Both failed at providing the admin UI. I also tried disabling advagg and tried with different jquery_update settings. The module didn't work. Downgrading to 7.x-2.12 fixed everything.

hayk hayrapetyan’s picture

I had same issue. Downgrading to 7.x-2.12!

voughndutch’s picture

downgraded but page still throwing errors

phpforfree’s picture

downgraded to 7.x-2.11 and everything seems to be working again. The arrows in the admin UI were missing when I downgraded to 7.x-2.12

c.hugot’s picture

I have the same issue.

Drupal 7.50

The only way, I found to resolve the problem is the downgrading of shareThis modules to 7.x-2.12

ergow’s picture

I have the same problem with version 7.x-2.13. I attach screen capture.
Thanks

Rob_Feature’s picture

Status: Needs review » Needs work

marking as needs work since it doesn't seem to be solved for most people.

gnurob’s picture

For what it's worth, after disable, uninstall, delete from sites/all/sharethis, and re-installation of 7.x-2.13 on Drupal 7.51, using Firefox on Mac, the problem persists, however there are some interesting observations and there's a way to make it work, if you're desperate.

  • The Chicklets will appear on a fresh install, but making any saves on admin/config/services/sharethis will remove all icons except those listed under "Extra Services." In my case, I changed the display from Node to Block and broke it again (well, besides Selected Services on the next bullet never did appear).
  • Whatever is referred to in the config page paragraph mentioning "\'Selected Services\' by using the up and down arrows." does not appear on the page, at all. This is probably what @gr4phic3r mentioned in the original bug screen shot, however I don't even see this.

So, as a temporary fix, you can remove Sharethis completely, and not make any changes, and the icons will reappear. Unfortunately I need Node placement. If anyone has a tip on where to change this (there's no ShareThis table), I'd really appreciate the tip.

yogeshchaugule8’s picture

Component: User interface » Code
Status: Needs work » Needs review
StatusFileSize
new5.65 KB

The issue is caused because of major revamp of code of "stlib_picker.js" and "ShareThisForm.js" JS files and other module code. As per new code structure, we've to use window before defining and using variable, check example here. Attached patch has all these required changes.

nandt’s picture

tried patch #58 the same situation exists.
i can;t select available servives from the right hand when you click the service nothing happens.
my console throught the following error.
stlib_picker.js?ofylnp:80 Uncaught TypeError: Cannot read property 'title' of undefined
at Object.stlib_picker.setupPicker

flux423’s picture

I also tested patch #58 and are experiencing a similar response as @nandt. I can now see the services but can not push them from "Possible Services" to "Selected Services".

nandt’s picture

i am tired with this module. sorted out..easy
with adding sdk on html.tlp file
and with social_buttons plug in.
on 29th of octomber they had left their certificate expired and all sorted links were broken.. ->https://www.drupal.org/node/2823654

yogeshchaugule8’s picture

Hi @nandt, @flux423,

I've also received the same error while working on patch and got it working after following steps. Please try below steps, and see if this works for you as well:

  1. Uninstall ShareThis module.
  2. Re-install ShareThis module.
  3. Apply patch (if not applied already).
  4. Go to ShareThis configuration and do necessary changes and click on save configuration.

This is because when configurations are saved earlier, the settings are not properly saved into database, which causes this error. So we first need to clear all saved configurations for ShareThis module. Which can be easily done by uninstalling and installing module.

nandt’s picture

i have done this several times..
by unistalling you mean delete the module ..
as i can;t find anywhere the table on database.
if you know the table please let us know.
thanks

yogeshchaugule8’s picture

No I don't mean completely removing module. I simply mean as disabling module, un-installing module and then installing module again.

Please see the steps below:

  1. Navigate to Modules page, uncheck checkbox next to ShareThis Module.
  2. Click on Save Configration
  3. Navigate to Uninstall Page, check checkbox next to ShareThis Module.
  4. Click on Uninstall and follow steps.
  5. Apply patch from #58 (if not already applied.)
  6. Navigate to Module Page, check checkbox next to ShareThis Module and click on Save Configuration.
  7. Navigate to ShareThis Configuration page.
  8. Do necessary changes and click on Save Configuration.

The reason we need to un-install the module and install again is, if we've saved module configuration when using 7.x-2.13 version of module the configuration are not saved properly in variable table, which throws above error in JavaScript.

Rob_Feature’s picture

Again...all the above about uninstalling-reinstalling may work and may be true...but it's not the correct way to solve this. There should be an update hook that simply removes the old data and rewrites the new data in the new format (preserving any settings). It's never really OK to tell users to uninstall/reinstall your module (losing all their production settings in the process)

Infinitee’s picture

This has been a pain for months now. After poking round and replacing all https with http in the modules css and js files I was able to get the GUI back up but, it still does not function correctly. It definitely has to do with the fact that the AddThis website is no longer serving files via SSL and https. I contacted them about this and will have to wait and see what they say. This is what I sent them...

Drupal ShareThis module not working due to the sharethis site not delivering content via https and SSL.

Error flags:
Mixed Content: The page at 'https://www.infinitee-designs.com/artwork/princess-nattai#overlay=admin/...' was loaded over HTTPS, but requested an insecure script 'http://ws.sharethis.com/share5x/js/stcommon.js'. This request has been blocked; the content must be served over HTTPS.

Mixed Content: The page at 'https://www.infinitee-designs.com/artwork/princess-nattai#overlay=admin/...' was loaded over HTTPS, but requested an insecure image 'http://www.sharethis.com/images/Direction_Icons_Sprite.png'. This content should also be served over HTTPS.

I can now confirm that the patch in #58 does work following these steps:

1. Disabled, the sharethis module
2. Uninstalled the sharethis module
3. Cleared Cache
4. Implemented the patch in #58
5. Enabled the module again

On my production site, the arrows are not displaying but, they still work for adding services and adjusting the positioning.

R:)

EducoWebDesign’s picture

Hi folks, I just wanted to add (and please forgive me if I missed this somewhere in the previous comments) that I was having the exact same problem described and shown in the original screenshot and I went through the whole patch, uninstall, reinstall process and still wasn't getting the ShareThis configuration or block to work...

...then I realized that I was accidentally editing the site in a private window *_*!! I switched to a new window and it immediately worked *facepalm* so I figured I'd put this out there – if nothing else works, make sure that you're not in a private/incognito window or in a browser with an ad blocker enabled.

Good luck!
Chris

commonColby’s picture

Using version 7.2.13

When I visit admin/config/services/sharethis I am also unable to select any services. I am also seeing the following error:
stlib_picker is not defined

I did the following:
1. Disabled, the sharethis module
2. Uninstalled the sharethis module
3. Cleared Cache
4. Implemented the patch in #58
5. Enabled the module again

However I still have a similar issue. I am getting the following error:
Uncaught TypeError: window.stlib_picker.setupPicker is not a function

I am not using Ad Blocker, and the window is not private/incognito. However I am on a development server on a VPN.

This issue is rendering this module unusable. I will look to another module like Service Links, or AddThis for a working solution.

yogeshchaugule8’s picture

StatusFileSize
new104.23 KB

I've just tried applying a patch in #58 in ShareThis (7.x-2.13) module in fresh Drupal (7.52) install and it is working. Please check screenshot.

@EducoWebDesign: Thanks, but it has nothing to do with Normal Window and Incognito, it should work every where.

EducoWebDesign’s picture

StatusFileSize
new444.81 KB

@yogeshchaugule8 I wasn't saying the patch didn't work. I was saying that I applied the patch in #58 and couldn't tell that it worked because I was in an incognito window in Firefox. In my particular case, I wasted extra time that could have been saved if I realized that the patch was fixing the issue but my browser was hiding the fix. As you can see from my attached screenshot, when I open admin/config/services/sharethis in an incognito window in Firefox (tested in Chrome incognito and it works fine) the services disappear.

@commonColby are you running AdvAgg and have you updated to the latest version as per this issue? https://www.drupal.org/node/2274477

ezoulou’s picture

I confirm this worked for me :
1. Disabled, the sharethis module
2. Uninstalled the sharethis module
3. Cleared Cache
4. Implemented the patch in #58
5. Enabled the module again

share this : 7.x-2.13
drupal : 7.53

alphex’s picture

StatusFileSize
new920.22 KB
new171.22 KB

Having problems with this.

Sharethis select

I've...
Disabled the module.
Uninstalled module.
Run the patch on #58
Reenabled module.

And still this...
code

Infinitee’s picture

alphex...

Did you flush all caches?

jenlampton’s picture

Status: Needs review » Needs work

I'm having the same problem with the patch as reported in #72, and yes, all caches have been flushed. The attached patch brings back the picker, but I'm unable to select anything (and the default options are also gone). The error I see in the console is TypeError: _all_services[pickerDefaults[i]] is undefined

The only way, I found to resolve the problem is the downgrading of shareThis modules to 7.x-2.12

I have tried downgrading to 7.x-2.12, but even after downgrading I'm unable to get the module working. I tried to uninstall and reinstall, but the project is also missing a uninstall hook.

navneet0693’s picture

Assigned: Unassigned » navneet0693

@Rob_Feature your suggestion is right. I am picking up this issue again.

navneet0693’s picture

Assigned: navneet0693 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new15.52 KB

Please test this patch. Steps are:

1. Apply the patch
2. Run the command: drush updb

Note: drush updb will remove your old service configurations, so you might to choose them again.

piyuesh23’s picture

Status: Needs review » Needs work

@Navneet,

The patch works as intended. The only thing is as an end-user i would not like my configurations to get wiped off with an updated version of the module. We should try preserving the configuration in the current DB & probably replace the " tags.

gg24’s picture

This patch works for me as intended.

navneet0693’s picture

@alphex @jenlampton Can you check with the patch above ?

manav’s picture

Assigned: Unassigned » manav
manav’s picture

Assigned: manav » Unassigned
StatusFileSize
new80.42 KB

Hi @Navneet,

#76 patch is working fine for me but agreed with #77. we have to find a solution to preserve the configuration in the current DB.
Drupal: 7.x
PHP: 5.6.10
Mysql: 5.5.42

Attaching screen-shot for the same.

navneet0693’s picture

Status: Needs work » Needs review
StatusFileSize
new15.55 KB

@piyuesh23 Implemented suggest in #77.

Steps to do :

1. Apply the patch
2. Run the following command:
drush updb

gg24’s picture

Status: Needs review » Reviewed & tested by the community

Patch brings back the services and we are able to select the services. Please do remember to run "drush updb". That will save your previous configuration. This patch works as intended.

purushotam.rai’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your efforts, I have pushed the code to 7.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

madelyncruz’s picture

Patch #87 is not working with Sharethis 7.x-2.x-dev. I'm using jQuery 1.10

christian deloach’s picture

madelyncruz,

Do you see any JavaScript errors reported in the error console?

berliner’s picture

StatusFileSize
new14.83 KB

Re-rolled against 2.13 if anyone needs it.

digitalfrontiersmedia’s picture

After either downloading the latest dev OR applying the latest patch #90 and running drush updb && drush cc all, I now get the following error in the console:
_all_services is not defined

No services appear. Nothing can be selected.

wheelercreek’s picture

I'm running into the same issue after updating the module. I see the services selection panes, but can't select anything. Unable to click on a service on the right side. Console error: Cannot read property 'title' of undefined at Object.stlib_picker.setupPicker() at sharethis line 104.

I'm using jQuery drupal default version in the Seven theme.

mp’s picture

wheelercreek’s picture

I finally did a complete uninstall & re-install of the latest (dev) version. That fixed it. Just putting in the patch & clearing caches wasn't enough on mine.

digitalfrontiersmedia’s picture

Contrary to my comment #91 9 days ago, I just happened to look today and it was working. The only thing that changed which might have effected it was that I turned off HTTP Basic Authentication to the environment. Maybe it's possible it was blocking some sort of ajax response or something?

lancewig’s picture

The patch is now in the dev download

1. Disabled, the sharethis module
2. Uninstalled the sharethis module
3. If you have the normal version, delete it from the module directory and copy in the dev version
3. Cleare Cache
4. Enabled the module again

localnetwork’s picture

madelyncruz’s picture

It's working with jQuery version 1.8 using the 7.x-2.13+14-dev version, but should be applied to admin pages only.

sceefo’s picture

StatusFileSize
new854 bytes

#90 patch was not working for me and I found out that the selector crashes because bebo is no longer present in _all_services but it is set in stlib_picker.defaultServices therefore the initial load of the picker fails cause trying to find bebo in _all_services. This should be the problem on dev branch as well. I made patch to dev version but it should work on 2.13 as well.